Just for the thrill of it, I'm attempting to install gcc-4.0.2 on
Solaris 2.11 beta (using GNU ld and as).
When compiling awt and using xlib peer, I got some interesting linker
errors. Just wondering if anybody else already did this and if there's
some quick workaround (other then disabling awt).
Looking at what linker barked at, it complained about things such as
undefined reference to `pthread_attr_setstackaddr@xxxxxxxx'. The man
page for pthread_attr_setstackaddr says libpthread.so is where this
function resides, and it is included in the link command (see bellow).
Not sure what "@SUNW_0.9" part is (my guess is that is the part that
confused the linker?).
The configure line looked like this:
$ configure --with-cpu=ultrasparc --with-tune=ultrasparc \
--disable-nls --with-gmp=/usr/local --with-mpfr=/usr/local \
--with-gnu-ld --with-gnu-as --with-ld=/usr/local/bin/ld \
--with-as=/usr/local/bin/as --enable-java-awt=xlib --with-x \
--enable-languages=c,ada,c++,f95,java,objc
The compilation failed at (I've inserted some empty lines for readability):
creating lib-gnu-awt-xlib.la
(cd .libs && rm -f lib-gnu-awt-xlib.la && ln -s ../lib-gnu-awt-xlib.la
lib-gnu-awt-xlib.la)
/bin/sh ./libtool --tag=GCJ --mode=link /usr/local/tmp/gcc/gcc/gcj
-B/usr/local/tmp/gcc/gcc/ -B/usr/local/sparc-sun-solaris2.11/bin/
-B/usr/local/sparc-sun-solaris2.11/lib/ -isystem
/usr/local/sparc-sun-solaris2.11/include -isystem
/usr/local/sparc-sun-solaris2.11/sys-include -m64
-L/usr/local/tmp/gcc/sparc-sun-solaris2.11/sparcv9/libjava -g -O2 -m64
-m64 -o jv-convert --main=gnu.gcj.convert.Convert -rpath
/usr/local/lib/sparcv9 -R /usr/local/lib/sparcv9 -shared-libgcc
-L/usr/local/tmp/gcc/sparc-sun-solaris2.11/sparcv9/libjava/.libs
libgcj.la
/usr/local/tmp/gcc/gcc/gcj -B/usr/local/tmp/gcc/gcc/
-B/usr/local/sparc-sun-solaris2.11/bin/
-B/usr/local/sparc-sun-solaris2.11/lib/ -isystem
/usr/local/sparc-sun-solaris2.11/include -isystem
/usr/local/sparc-sun-solaris2.11/sys-include -m64 -g -O2 -m64 -m64 -o
.libs/jv-convert --main=gnu.gcj.convert.Convert -shared-libgcc
-L/usr/local/tmp/gcc/sparc-sun-solaris2.11/sparcv9/libjava
-L/usr/local/tmp/gcc/sparc-sun-solaris2.11/sparcv9/libjava/.libs
./.libs/libgcj.so
-L/usr/local/tmp/gcc/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/src
-L/usr/local/tmp/gcc/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/src/.libs
-L/usr/local/tmp/gcc/gcc/sparcv9 -L/usr/local/tmp/gcc/gcc
-L/usr/local/sparc-sun-solaris2.11/bin
-L/usr/local/sparc-sun-solaris2.11/lib
-L/usr/local/lib/../sparc-sun-solaris2.11/lib -L/usr/ccs/bin/sparcv9
-L/usr/ccs/bin -L/usr/ccs/lib/sparcv9 -L/usr/ccs/lib -L/usr/local/lib
-L/lib/sparcv9 -L/usr/lib/sparcv9 -lgcc_s -lgcc_s -lpthread -lrt -ldl
-lgcc_s -lgcc_s -Wl,--rpath -Wl,/usr/local/lib/sparcv9
./.libs/libgcj.so: undefined reference to `pthread_attr_setstackaddr@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `dlopen@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `dlclose@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_setschedparam@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `thr_join@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `sigsetjmp@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `thr_setprio@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_setschedparam@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_setstacksize@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_key_create@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `mutex_unlock@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `write@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_setinheritsched@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_getscope@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_create@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_setspecific@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `cond_destroy@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_kill@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `open@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `thr_self@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `thr_continue@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `waitpid@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `sigprocmask@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `fcntl@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `mutex_lock@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `dlsym@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_getstackaddr@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `select@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_getinheritsched@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `cond_signal@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_destroy@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `dlerror@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_sigmask@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `cond_broadcast@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `dladdr@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_init@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `cond_wait@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `close@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_setschedpolicy@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `siglongjmp@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_getdetachstate@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `sigsuspend@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `read@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `msync@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_getspecific@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_setdetachstate@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_getschedpolicy@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `thr_create@xxxxxxxx'
./.libs/libgcj.so: undefined reference to
`pthread_attr_getschedparam@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_self@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `cond_init@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `fork@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `thr_suspend@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_getstacksize@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `pthread_attr_setscope@xxxxxxxx'
./.libs/libgcj.so: undefined reference to `sigaction@xxxxxxxx'
collect2: ld returned 1 exit status
BTW, just as a reference, in my first build attempt (the above was
second) build failed when doing gtk peer for awt (there's no 64-bit
version of libart_lgpl library, only 32-bit -- hopefully something to
be addressed by the time 2.11 is released). This is no fault of gcc.
I could try compiling my own gtk with all the needed libs (both 32-bit
and 64-bit), or I could wait if Sun is going to do that ;-)
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.