[kaffe] Question on cross compiling with static libraries

Kim, Seong Beom sbkim at mail.marusys.com
Fri Jan 3 20:30:30 PST 2003


Dear Kaffe members,

I'm using Kaffe CVS source and trying to cross-compile it with the following configuration,

Host: i386-linux (RedHat 7.3)
Target: mips-linux (RedHat 7.1)
Configuration command:
CC=mips-linux-gcc CXX=mips-linux-c++ ./configure --with-engine=intrp --target=mips-pc-linux-gnu --host=mips-pc-linux-gnu --build=mips-pc-linux-gnu --with-includes=/usr/mips-linux/include --with-libraries=/usr/mips-linux/lib --with-awt=qt --with-qtdir=/home/sbkim/work/qte-3.0.6 --with-jikes=/home/sbkim/bin/jikes --disable-debug --with-staticlib


After the configuration, I tried the 'make' but faced the following linker errors.

mips-linux-gcc -g -O2 -fno-omit-frame-pointer -o kaffe-bin main.o version.o .libs/kaffe-binS.o -Wl,--export-dynamic  ../../libraries/clib/native/.libs/libnative.a -L/home/sbkim/work/qte-3.0.6/lib ../../libraries/clib/net/.libs/libnet.a ../../libraries/clib/io/.libs/libio.a ../../libraries/clib/zip/.libs/libzip.a -L/usr/mips-linux/lib -lz ../../libraries/clib/math/.libs/libmath.a -lgmp ../../libraries/clib/management/.libs/libmanagement.a ../../libraries/clib/security/.libs/libsecurity.a ../../libraries/extensions/microsoft/clib/.libs/libmicrosoft.a ../../libraries/clib/awt/qt/.libs/libawt.a ../kaffevm/.libs/libkaffevm.a -ldl -lm -lqte-mt -Wl,--rpath -Wl,/usr/mips-linux/lib
/home/sbkim/work/qte-3.0.6/lib/libqte-mt.a(qthread_unix.o): In function `thread_sleep(timespec *)':
kernel/qthread_unix.cpp(.text+0x854): undefined reference to `pthread_cond_timedwait'
/home/sbkim/work/qte-3.0.6/lib/libqte-mt.a(qthread_unix.o): In function `QThread::start(void)':
kernel/qthread_unix.cpp(.text+0x10a0): undefined reference to `pthread_create'
/home/sbkim/work/qte-3.0.6/lib/libqte-mt.a(libmng_jpeg.o): In function `mngjpeg_cleanup':
3rdparty/libmng/libmng_jpeg.c(.text+0x45c): undefined reference to `jpeg_destroy_decompress'
3rdparty/libmng/libmng_jpeg.c(.text+0x48c): undefined reference to `jpeg_destroy_decompress'
/home/sbkim/work/qte-3.0.6/lib/libqte-mt.a(libmng_jpeg.o): In function `mngjpeg_decompressinit':
3rdparty/libmng/libmng_jpeg.c(.text+0x768): undefined reference to `jpeg_std_error'
3rdparty/libmng/libmng_jpeg.c(.text+0x7ec): undefined reference to `jpeg_CreateDecompress'
3rdparty/libmng/libmng_jpeg.c(.text+0x828): undefined reference to `jpeg_resync_to_restart'
/home/sbkim/work/qte-3.0.6/lib/libqte-mt.a(libmng_jpeg.o): In function `mngjpeg_decompressdata':
3rdparty/libmng/libmng_jpeg.c(.text+0xb9c): undefined reference to `jpeg_read_header'
3rdparty/libmng/libmng_jpeg.c(.text+0xc98): undefined reference to `jpeg_has_multiple_scans'
3rdparty/libmng/libmng_jpeg.c(.text+0xdd4): undefined reference to `jpeg_start_decompress'
3rdparty/libmng/libmng_jpeg.c(.text+0xe60): undefined reference to `jpeg_input_complete'
3rdparty/libmng/libmng_jpeg.c(.text+0xf18): undefined reference to `jpeg_start_output'
3rdparty/libmng/libmng_jpeg.c(.text+0xf50): undefined reference to `jpeg_read_scanlines'
3rdparty/libmng/libmng_jpeg.c(.text+0x102c): undefined reference to `jpeg_finish_output'
3rdparty/libmng/libmng_jpeg.c(.text+0x1058): undefined reference to `jpeg_input_complete'
3rdparty/libmng/libmng_jpeg.c(.text+0x10a0): undefined reference to `jpeg_input_complete'
3rdparty/libmng/libmng_jpeg.c(.text+0x10e0): undefined reference to `jpeg_finish_decompress'
/home/sbkim/work/qte-3.0.6/lib/libqte-mt.a(libmng_jpeg.o): In function `mngjpeg_decompressfree':
3rdparty/libmng/libmng_jpeg.c(.text+0x1250): undefined reference to `jpeg_destroy_decompress'

Because libqte-mt.a refers functions in libpthread.a and libjpeg.a, those errors are natural and can easily be avoided only if I can specify proper libraries.
The question I have is how to do it elegantly. ;-)
Of course, I can hack configure and configure.in file to my taste but I would like to know a better way.

Please let me know the tips.
Thanks in advance.

Best Regards.
Kim, Seong Beom


-----------------------------------
Seong-beom Kim
Research Engineer
Marusys, Co. Ltd.
Seoul, Korea
+82-2-3445-3999 (117)


More information about the kaffe mailing list