5

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?!

Florent
  • 12,310
  • 10
  • 49
  • 58
michelemarcon
  • 23,277
  • 17
  • 52
  • 68

4 Answers4

1

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

Kumar Sukhani
  • 377
  • 2
  • 8
1

Fount it!

http://sourceforge.net/forum/message.php?msg_id=7193290

michelemarcon
  • 23,277
  • 17
  • 52
  • 68
  • 3
    Yes, as this is the solution for the problem, and no one else has found it. – michelemarcon Apr 27 '10 at 13:52
  • 1
    That said, this breaks the rules for link-only answers on StackOverflow: An answer should copy in enough information from behind any links it uses to still remain useful even if that link breaks. See also the "provide context for links" section in http://stackoverflow.com/help/how-to-answer – Charles Duffy Mar 04 '15 at 01:55
  • 1
    (indeed, reading that thread, I have no idea *which* of the answers proposed, and by which person in the discussion, is the one that solved your problem) – Charles Duffy Mar 04 '15 at 02:27
0

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

0

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)

Community
  • 1
  • 1
Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91