Menu

#468 rvm does not build on Mac OS X

closed
build (65)
9
2012-09-21
2005-02-24
No

Submitted on dW by godmar@gmail.com on 02/17/05 19:32
as bug # 4171.

Original Submission:

A few comments: - documentation is confusing, it says
it would automatically download classpath if I don't
have it - it did no such thing. I overcame that by
downloading classpath as described and commenting out
the export CLASSPATH_ROOT line in the config file. -
the next problem was that jikes relied on +no-shadow,
which precluded the use of jikes 1.18 on my system.
Fixed by installing jikes 1.22 - now the classpath
(0.13) build fails with: cd ../../../classpath &&
scripts/check_jni_methods.sh Found a problem with the
JNI methods declared and implemented. (-) missing in
implementation, (+) missing in header files
+Java_gnu_java_awt_peer_gtk_GThreadNativeMethodRunner_nativeRun
+Java_gnu_java_awt_peer_gtk_GdkFontMetrics_getPeerFontMetrics
+Java_gnu_java_awt_peer_gtk_GdkFontMetrics_getPeerTextMetrics
+Java_gnu_java_awt_peer_gtk_GdkFontPeer_dispose
+Java_gnu_java_awt_peer_gtk_GdkFontPeer_initState
+Java_gnu_java_awt_peer_gtk_GdkFontPeer_initStaticState
+Java_gnu_java_awt_peer_gtk_GdkFontPeer_setFont
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_allInkExtents
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_allLogicalExtents
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_dispose
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphCharIndex
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphCode
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphInkExtents
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphIsHorizontal
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphLogicalExtents
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_initState
+Java_gnu_java_awt_peer_gtk_GdkGlyphVector_initStaticState
and so on until:
+Java_java_nio_VMDirectByteBuffer_shiftDown
+Java_java_nio_channels_Channels_newInputStream (JNIEnv
env, +Java_java_nio_channels_Channels_newOutputStream
(JNIEnv
env,
+Java_java_util_VMTimeZone_getSystemTimeZoneId(JNIEnv
*env, make[3]: [all-local] Error 1 make[2]:
[all-recursive] Error 1 make[1]: [all-recursive]
Error 1 make:
[all-recursive] Error 1
jBuildClasspathJar: Aborted due to a command exiting
with error status (2) jbuild:171: some command we just
ran (probably with a final argument of "--check")
exited with status 2, jbuild: Aborting execution.
jbuild: Exiting unexpectedly with status 2. jbuild:
Cleaning up... jbuild: ...no cleanup was needed.
jbuild:1: some command we just ran (probably with a
final argument of "unexpected_exit") exited with status
2, jbuild: Aborting execution.

Followups

Comment Date By
Please re-post this bug report at
http://sourceforge.net/tracker/?func=add&group_id=128805&atid=712768

since we have migrated to sourceforge.net.

You'll get improved features, such as the ability to create
your own account and watch all of the bugs you're
tracking, and we'll make sure that we don't lose track
of this problem. I could repost it for you, but then
we'd lose the ability to keep you notified automatically
of progress on it.

And thank you for caring enough about the system to post
this report. 02/19/05 08:54 augart-oss
wait. I can't roll back to jikes 1.19 because classpath
0.13 requires a version of jikes that support
+no-shadow. According to jikes's Changelog, this was
introduced only in recent versions.

So I rolled classpath back to 0.12 instead. This fails
with:
/usr/bin/gcc -w -O -o .libs/libjavalang.0.0.0.so
-bundle .libs/java_lang_VMSystem.o
.libs/java_lang_Object.o .libs/java_lang_VMFloat.o
.libs/java_lang_Double.o .libs/java_lang_VMDouble.o
.libs/java_lang_Math.o .libs/java_lang_VMProcess.o
../../../native/fdlibm/.libs/dtoa.o
../../../native/fdlibm/.libs/e_acos.o
../../../native/fdlibm/.libs/e_asin.o
../../../native/fdlibm/.libs/e_atan2.o
../../../native/fdlibm/.libs/e_exp.o
../../../native/fdlibm/.libs/e_fmod.o
../../../native/fdlibm/.libs/e_log.o
../../../native/fdlibm/.libs/e_pow.o
../../../native/fdlibm/.libs/e_rem_pio2.o
../../../native/fdlibm/.libs/e_remainder.o
../../../native/fdlibm/.libs/e_scalb.o
../../../native/fdlibm/.libs/e_sqrt.o
../../../native/fdlibm/.libs/k_cos.o
../../../native/fdlibm/.libs/k_rem_pio2.o
../../../native/fdlibm/.libs/k_sin.o
../../../native/fdlibm/.libs/k_tan.o
../../../native/fdlibm/.libs/mprec.o
../../../native/fdlibm/.libs/s_atan.o
../../../native/fdlibm/.libs/s_ceil.o
../../../native/fdlibm/.libs/s_copysign.o
../../../native/fdlibm/.libs/s_cos.o
../../../native/fdlibm/.libs/s_fabs.o
../../../native/fdlibm/.libs/s_floor.o
../../../native/fdlibm/.libs/s_rint.o
../../../native/fdlibm/.libs/s_scalbn.o
../../../native/fdlibm/.libs/s_sin.o
../../../native/fdlibm/.libs/s_tan.o
../../../native/fdlibm/.libs/sf_fabs.o
../../../native/fdlibm/.libs/sf_rint.o
../../../native/fdlibm/.libs/strtod.o
../../../native/fdlibm/.libs/w_acos.o
../../../native/fdlibm/.libs/w_asin.o
../../../native/fdlibm/.libs/w_atan2.o
../../../native/fdlibm/.libs/w_exp.o
../../../native/fdlibm/.libs/w_fmod.o
../../../native/fdlibm/.libs/w_log.o
../../../native/fdlibm/.libs/w_pow.o
../../../native/fdlibm/.libs/w_remainder.o
../../../native/fdlibm/.libs/w_sqrt.o
../../../native/jni/classpath/.libs/jcl.o
../../../native/fdlibm/.libs/w_sqrt.o definition of
_sqrt in section (TEXT,text)
/usr/lib/libSystem.dylib(sqrt970.o) definition of _sqrt
ld: Undefined symbols:
_environ
make[3]: [libjavalang.la] Error 1
make[2]:
[all-recursive] Error 1
make[1]: [all-recursive] Error 1
make:
[all-recursive] Error 1

Is there any known combination of jikes/classpath that
works with rvmjikes2.3.4 on Mac OS X 10.3?
02/17/05 21:02 None
I got rid of most of those by using GNU sed as opposed
to the BSD version Mac OS comes with.

This left me with missing symbols that have digits in
them. I traced those down to the use of \w in
check_jni_methods.sh. info sed says it includes digits,
but it apparently doesn't in sed 4.0.5?

I applied this patch:

../classpath/classpath/scripts/check_jni_methods.sh.virgin
Thu Feb 17 20:20:43 2005
+++ ../classpath/classpath/scripts/check_jni_methods.sh
Thu Feb 17 20:27:11 2005
@@ -7,13 +7,13 @@

Find all methods defined in the header files generated

from the java source files.

grep -h '^JNIEXPORT . Java_' include/.h | \ - sed -e 's,^JNIEXPORT . JNICALL (Java_\w)
(.$,\1,' | \ + sed -e 's,^JNIEXPORT . JNICALL
(Java_[A-Za-z0-9_]) (.$,\1,' | \ sort > $TMPFILE

Find all methods in the JNI C source files.

find native/jni -name *.c | \ xargs grep -h '^Java_' | \ - sed -e 's,^(Java_\w) (.$,\1,' \ + sed -e 's,^(Java_[A-Za-z0-9_]) (.$,\1,' \ | sort > $TMPFILE2

Write temporary ignore file.

Then classpath builds to completion.

The next failure is:

Building
/Users/gback/Projects/jikesrvm-2.3.4/support/lib/classpathsrc.jar
(classpath.jar copied) jbuild.expand: (templates
cleaned) 110 s
jbuild.copy: (sources cleaned) 111 s
jbuild.compile: (cleaning .class files... classes
cleaned ) 111 s
jbuild.interfaceDeclarations: (interface cleaned) 111 s
jbuild.linkImage: (primordials cleaned) (bootimage
cleaned) 111 s
jbuild.linkBooter: (booter cleaned) 111 s
jbuild.expand: (classloader templates expanded) 112 s
jbuild.copy: (set up jbuild.prep.host) 120 s
jbuild.compile: (compiling classes... symbol.h:1110:
failed assertion `(! IsLocal() && ! Anonymous()) ||
(IsNested() && ! ACC_STATIC())'
Abort trap
compilation FAILED) jbuild.compile: The Jikes compiler
exited with status 134 while we were building the
source file(s): Dummy.java
jbuild.compile: We invoked the Jikes compiler in the
directory
/Users/gback/Projects/jikesrvm-2.3.4/rvmBuild/RVM.classes
jbuild.compile: With the command-line: /sw/bin/jikes
-nowarn -g +U -classpath .:rvmrt.jar Dummy.java
jbuild.compile: Exiting unexpectedly with status 134.
jbuild.compile: Cleaning up...
jbuild.compile: ...no cleanup was needed.
jbuild.compile:5: some command we just ran (probably with a
final argument of "unexpected_exit") exited with status
134,

jbuild.compile: The command was killed by signal # 6
jbuild.compile: Aborting execution.
120 s
jbuild: Trouble while running "./jbuild.compile " (exit
status
134); aborting execution

This looks like a problem in jikes. I'll try rolling
back to jikes 1.19 next.

Discussion

  • Dave Grove

    Dave Grove - 2005-03-13

    Logged In: YES
    user_id=1215435

    Building problems on OSX are blocking 2.3.5 release.

     
  • Dave Grove

    Dave Grove - 2005-06-24

    Logged In: YES
    user_id=1215435

    This may now be resolved in cvs head of jikes rvm. Will
    defer closing until OS X regressions start running on a
    regular basis again and confirm that it is really working.

     
  • Steve Blackburn

    Steve Blackburn - 2005-07-01

    Logged In: YES
    user_id=1215444

    The combination of Dave's fix and some cleanups I did mean
    that it will build out of the box on a vanilla OS X 10.4 box
    (with Xcode Tools). It will also build out of the box with
    10.3 provided that a new version of the jikes compiler
    exists and the powerpc-unknown-osx-gnu config file points to
    this version (the latest versions of classpath seem to want
    jikes 1.22, which ships with 10.4, but not 10.3).

     

Log in to post a comment.