Question

I'm trying to build GNU Classpath 0.98 and JamVM 1.5.2.
Following the JamVM readme, I did 'configure; make; make install' on the jamVM, and it worked.

I then added jamvm and Sun javac to the path.
Then with GNU Classpath I did this:

./configure --enable-jni --disable-gtk-peer --disable-gconf-peer --disable-plugin

I got this error:

The javac failed (see config.log)

On the config.log, I see that javac can't find VMStackWalker (which is jamvm-specific) I added the jamvm classes to the CLASSPATH, then I got this error:

The Java VM jamvm failed (see config.log)

On the config.log, I see that jamvm cannot find java.lang.Class.

What's wrong?!

Was it helpful?

OTHER TIPS

Steps to compiling GNU Classpath for Ubuntu12.04: https://groups.google.com/forum/#!topic/jruby-gsoc/-fnKnP7zxbI

Steps to compiling JamVM for Ubuntu 12.04: https://groups.google.com/forum/#!topic/jruby-gsoc/uJ6RlVvHR-0

try ecj,classpath need a java compiler ,and sun sdk seems to be no good here

My Mac OS X 10.11 adventures:

JamVM

built with make clean && CFLAGS="-m32" ./configure.

GNU Classpath

took a bit more:

# If you already made an attempt
make clean

## If you don't --disable-tools. I didn't have antlr, so I downloaded it.
#curl -O http://www.antlr.org/download/antlr-4.5.1-complete.jar

./configure --disable-gtk-peer --disable-gconf-peer \
    --disable-tools # for tools: --with-antlr-jar=antlr-4.5.1-complete.jar

If you make now, compilation fails with java_io_VMConsole.c:80:19: error: use of undeclared identifier 'IUCLC'. I ended up googling what that symbol is - it's an octal 01000, and added it right to the source:

vim ./native/jni/java-io/java_io_VMConsole.c
# add this line in the beginning of the file: #define IUCLC   0001000

After that, ./configure keeps complaining about your javac not being GCJ. It looks like an old bug of GNU Classpath, I've found mentions of similar problems. As you see below, ./configure is broken and won't work with any javac other than gcj.

I ended up just editing ./configure:

  • in the beginning, I added a line export JAVAC=$(which javac)
  • I replaced conditional assignment with JAVAC_IS_GCJ=no

Now, ./configure should pass, but make won't.

I grepped all the Makefiles that ./configure generated for -fsource=, and then either commented out lines with -fsource (it's a gcj-specific flag) if there was an alternate lines with -source argument, or just replaced fsource with source.

Last step, I had to edit top-level Makefile and delete $(EXAMPLESDIR) from SUBDIRS = ... line - it didn't compile with an error:

./gnu/classpath/examples/CORBA/NamingService/Demo.java:99: error: 
    package gnu.classpath.tools.tnameserv does not exist
      gnu.classpath.tools.tnameserv.Main.main(args);"

It built!

I got errors running it, but that's a totally different story...

$ DYLD_FALLBACK_LIBRARY_PATH=/usr/local/classpath/lib/classpath \
  /usr/local/jamvm/bin/jamvm -verbose:class -verbose:jni Test
...
Failed to open library /usr/local/classpath/lib/classpath/libjavanio:
dlopen(/usr/local/classpath/lib/classpath/libjavanio.so, 
1): image not found]
...
Exception occurred while printing exception (java/lang/NoClassDefFoundError)...
Original exception was java/lang/UnsatisfiedLinkError

(I'll update the answer if I manage to run it)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top