swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] errors compiling jheatbugs bytecode with gcj after javas


From: Tim Howe
Subject: [Swarm-Support] errors compiling jheatbugs bytecode with gcj after javaswarm fails in initSwarm
Date: Tue, 3 Aug 2004 16:29:24 -0700

Greetings ...
 
I get these errors when I try to compile the bytecode for jheatbugs-2001-03-28 using gcj:
 
/Swarm-2.2/lib/libgcj.a(natInflater.o)(.text+0x88): In function `_ZN4java4util3zip8Inflater3endEv':
/usr/src/gcc-3.3.1-3/libjava/java/util/zip/natInflater.cc:53: undefined reference to `_inflateEnd'
/Swarm-2.2/lib/libgcj.a(natInflater.o)(.text+0x4f1): In function `_ZN4java4util3zip8Inflater7inflateEP6JArrayIcEii':
/usr/src/gcc-3.3.1-3/libjava/java/util/zip/natInflater.cc:107: undefined reference to `_inflate'
/Swarm-2.2/lib/libgcj.a(natInflater.o)(.text+0x75b): In function `_ZN4java4util3zip8Inflater5resetEv':
/usr/src/gcc-3.3.1-3/libjava/java/util/zip/natInflater.cc:151: undefined reference to `_inflateReset'
/Swarm-2.2/lib/libgcj.a(natInflater.o)(.text+0x8a7): In function `_ZN4java4util3zip8Inflater13setDictionaryEP6JArrayIcEii':
/usr/src/gcc-3.3.1-3/libjava/gcj/array.h:46: undefined reference to `_inflateSetDictionary'
/Swarm-2.2/lib/libgcj.a(natInflater.o)(.text+0xafc): In function `_ZN4java4util3zip8Inflater4initEb':
/usr/src/gcc-3.3.1-3/libjava/java/util/zip/natInflater.cc:203: undefined reference to `_inflateInit2_'
collect2: ld returned 1 exit status
 
Can you tell me how to fix these errors?
 
Here's how I got to this point: I was able to run Swarm (for example, jheatbugs-2001-03-28) for a long time. Then I upgraded from cygwin.dll 1.5.5-1 to 1.5.10-3. That seemed to kill Swarm; when I invoke jheatbugs through javaswarm, it dies silently in initSwarm(). Next I followed this advice, which I found at http://www.swarm.org/pipermail/support/2004-May/014150.html: 
There is something wrong with the java swarm and the current version of
Cygwin. However, it is easy to get around this. Just follow the steps
below and you should be able to run any java swarm application.
1. Compile your code using javacswarm
2. Compile your bytecode using gcj. The command you have to write to
compile jheatbugs is($ is the prompt):
$CLASSPATH=/Swarm-2.2/share/swarm/swarm.jar gcj --main=StartHeatbugs
*.class /Swarm-2.2/lib/gcj*.o -L/Swarm-2.2/lib -o jheatbugs
3. Run your application by typing:
$LTDL_LIBRARY_PATH=/Swarm-2.2/lib ./jheatbugs

-Vegard
Using that gcj command, I got errors, some of which I eliminated by installing
Devel - gcc-Java and Libs - libiconv. The Cygwin libraries I have installed by
explicit request are now libiconv 1.9.2-1, libpng12 1.2.5-4, and tcltk 20030901-1
(all are the current Cygwin versions as of Aug 3 2004).
 
I use the following script to run gcj. The result is the same (shown at the top of this message)
whether I use -specs=/cygdrive/d/cygwin/lib, or /cygdrive/d/cygwin/lib/mingw,
or Swarm-2.2/lib, or (as in Vegard's posting) no -specs option at all.
 
-------------------------------------------------------------------------

set -e
 
spec=$1
 
case $spec in 1)
gcjlib="/cygdrive/d/cygwin/lib"
;;
2)
gcjlib="/cygdrive/d/cygwin/lib/mingw"
;;
3)
gcjlib="/cygdrive/d/software/4/swarm/Swarm-2.2/lib"
;;
esac
 
if [ "$gcjlib" = "" ]; then1
 echo "Invoking gcj .."
 CLASSPATH="/Swarm-2.2/share/swarm/swarm.jar" gcj --main=StartHeatbugs *.class /Swarm-2.2/lib/gcj*.o -L/Swarm-2.2/lib -o jheatbugs
else
 echo "Here is the specs file:"
 ls -l "$gcjlib/libgcj.spec"
 echo "Invoking gcj with -specs $gcjlib .."
 CLASSPATH="/Swarm-2.2/share/swarm/swarm.jar" gcj --main=StartHeatbugs *.class /Swarm-2.2/lib/gcj*.o -L/Swarm-2.2/lib -specs="$gcjlib" -o jheatbugs
fi
 
echo "Invoking ./jheatbugs .."
 
LTDL_LIBRARY_PATH=/Swarm-2.2/lib /jheatbugs

 
 
 
 
 


 
-------------------------------------------------------------------------
 
Thank you for your help.
 
- Tim Howe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]