Re: separate compilation on libjava and bootclasspath

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

 



Hi,
   I have been trying to compile libjava (gcc 3.4.6) separately and
use this library as an alternative bootclasspath. However, I haven't
been able to get libjava to compile out of the gcc tree. gcc itself
builds fine (its the same gcc installed on the system).
   I understand that libjava has quite a few dependencies. I am also
building libjava and its dependencies in a separate build directory. I
have the following setup:

~/tmp/gcc-3.4.6/ contains the source tree,
~/tmp/build/ is where I build all the stuff.
~/tmp/install/ where the installs happen.

I was able to successfully build the sub-components boehm-gc fastjar
libffi libiberty and zlib in ~/tmp/build/<sub-component> by doing the
following for each of these:

cd ~/tmp/build/<sub-component>
../gcc-3.4.6/<sub-component>/configure --prefix=/home/ritesh/tmp/install
make

However, when I do the same (hopefully not having any further
dependencies) for libjava I am hit by the following error:

....
Making all in gcj
make[1]: Entering directory `/home/ritesh/tmp/build/libjava/gcj'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ritesh/tmp/build/libjava/gcj'
Making all in include
make[1]: Entering directory `/home/ritesh/tmp/build/libjava/include'
make[1]: Leaving directory `/home/ritesh/tmp/build/libjava/include'
make[1]: Entering directory `/home/ritesh/tmp/build/libjava'
/bin/sh ./libtool --tag=GCJ --mode=link gcj
-B/home/ritesh/tmp/build/libjava/ -L/home/ritesh/tmp/build/libjava
-ffloat-store -g -O2  -o jv-convert --main= gnu.gcj.convert.Convert
-rpath /home/ritesh/tmp/install/lib -shared-libgcc
-L/home/ritesh/tmp/build/libjava/.libs libgcj.la
gcj -B/home/ritesh/tmp/build/libjava/ -ffloat-store -g -O2 -o
.libs/jv-convert --main= gnu.gcj.convert.Convert -shared-libgcc
-L/home/ritesh/tmp/build/libjava
-L/home/ritesh/tmp/build/libjava/.libs ./.libs/libgcj.so -lpthread
-ldl -L/usr/lib/gcc/i686-pc-linux-gnu/3.4.6
-L/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/lib
-L/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so -lm
-L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -lgcc_s -lc
-lm -lgcc_s -lc -lgcc_s -Wl,--rpath -Wl,/home/ritesh/tmp/install/lib
-Wl,--rpath -Wl,/usr/lib/gcc/i686-pc-linux-gnu/3.4.6
./.libs/libgcj.so: undefined reference to `deflate'
./.libs/libgcj.so: undefined reference to `inflate'
./.libs/libgcj.so: undefined reference to `deflateSetDictionary'
./.libs/libgcj.so: undefined reference to `deflateInit2_'
./.libs/libgcj.so: undefined reference to `inflateReset'
./.libs/libgcj.so: undefined reference to `deflateReset'
./.libs/libgcj.so: undefined reference to `deflateParams'
./.libs/libgcj.so: undefined reference to `inflateSetDictionary'
./.libs/libgcj.so: undefined reference to `inflateEnd'
./.libs/libgcj.so: undefined reference to `inflateInit2_'
./.libs/libgcj.so: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make[1]: *** [jv-convert] Error 1
make[1]: Leaving directory `/home/ritesh/tmp/build/libjava'
make: *** [all-recursive] Error 1

It looks like the last gcj invocation couldn't find zlib. However, I
already have zlib build in ~/tmp/build/zlib before this. Can somebody
tell me what am I doing wrong?

Also, any pointers on compiling libjava separately and using it as
bootclasspath will be appreciated.

Thanks,
Ritesh

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux