#468 rvm does not build on Mac OS X

build (65)

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
and so on until:
+Java_java_nio_channels_Channels_newInputStream (JNIEnv
env, +Java_java_nio_channels_Channels_newOutputStream
*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.


Comment Date By
Please re-post this bug report at

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
/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/w_sqrt.o definition of
_sqrt in section (TEXT,text)
/usr/lib/libSystem.dylib(sqrt970.o) definition of _sqrt
ld: Undefined symbols:
make[3]: [libjavalang.la] Error 1
[all-recursive] Error 1
make[1]: [all-recursive] Error 1
[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:

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:

(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
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

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

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


  • Dave Grove

    Dave Grove - 2005-03-13

    Logged In: YES

    Building problems on OSX are blocking 2.3.5 release.

  • Dave Grove

    Dave Grove - 2005-06-24

    Logged In: YES

    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

    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.