I'm sending this to sqlite-users@sqlite.org in the hope someone can 
help, but are copying it to sage-de...@googlegroups.com so there is a 
record there. I'll post a summary to the latter list later.

I'm helping out on the GPL'ed open-source mathematics program Sage

http://www.sagemath.org/

to get Sage to build properly on Solaris 10 with gcc-4.4.0. Sage makes 
use of sqlite (not the latest version), but the issue we have on Solaris 
can be seen on the latest version of sqlite, so I'm just showing it for 
the latest release of sqlite.

The machine used for this is a Sun T5240 UltraSPARC server with 128 
cores. (This was kindly either donated, or heavily discounted by Sun for 
the Sage project - I'm not sure which)

The problem (full details below) is a link error

./.libs/libsqlite3.so: undefined reference to `dler...@sunw_1.22'
./.libs/libsqlite3.so: undefined reference to `dlo...@sunw_1.22'
./.libs/libsqlite3.so: undefined reference to `dl...@sunw_1.22'
./.libs/libsqlite3.so: undefined reference to `dlcl...@sunw_1.22'

A Google on these 'undefined reference' to functions which have '@SUNW' 
in its name is neither new to gcc-4.4.0, or only seen on sqlite. Apache 
is particular has suffered the same type of error message in the past, 
with some reports as early as 2005.

What is common to most/all open-source software showing this error is 
the use of 'libtool' which sqlite makes use of. These undefined 
functions should be in the libc library on Solaris.

Has anyone any idea what might cause this? I should state sqlite builds 
OK on this same machine with  gcc 3.4.3, but not the latest gcc (4.4.0). 
We have a particular need to get this to build on gcc-4.4.0

Has anyone any ideas how we might fix this? I believe sqlite is using 
version 1.5.24 of libtool, which is about 3 years old. The latest 
(libtool-2.2.6a) was released in September 2008. Given I believe the 
problem is possibly related to libtool, I'd use that if I knew how to 
change it.

Professor Stein, the leader of the Sage project has agreed that any of 
the sqlite developers that would like to try to fix this, would be 
granted access to this machine at the University of Washington.

I have put below the contents of the output of the configure script 
(which reported no errors) and the make command. All GNU tools were used 
for this (GNU compiler, assembler, make etc, NOT the Sun ones. Since 
most open-source software is developed on Linux, most programs build 
with less hassle with the GNU tools).

I have submitted this is a bug id 3905 to the sqlite project's bug database.

Any help would be very much appreciated.

kir...@t2:~/sqlite-3.6.14.2$ ./configure
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for ranlib... ranlib
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for ld used by gcc... /home/kirkby/bin/ld
checking if the linker (/home/kirkby/bin/ld) is GNU ld... yes
checking for /home/kirkby/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /home/kirkby/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f77 accepts -g... yes
checking the maximum length of command line arguments... 262144
checking command to parse /home/kirkby/bin/nm -B output from gcc 
object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/home/kirkby/bin/ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /home/kirkby/bin/ld
checking if the linker (/home/kirkby/bin/ld) is GNU ld... yes
checking whether the g++ linker (/home/kirkby/bin/ld) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/home/kirkby/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f77 option to produce PIC... -fPIC
checking if f77 PIC flag -fPIC works... yes
checking if f77 static flag -static works... no
checking if f77 supports -c -o file.o... yes
checking whether the f77 linker (/home/kirkby/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking for fdatasync... no
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking for library containing tgetent... -lcurses
checking for library containing readline... no
checking for readline... no
checking for library containing pthread_create... none required
checking for library containing dlopen... none required
checking for whether to support dynamic extensions... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands


kir...@t2:~/sqlite-3.6.14.2$ make
if /bin/bash ./libtool --tag=CC --mode=compile gcc 
-DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" 
-DPACKAGE_VERSION=\"3.6.14.2\" -DPACKAGE_STRING=\"sqlite\ 3.6.14.2\" 
-DPACKAGE_BUGREPORT=\"http://www.sqlite.org\"; -DPACKAGE=\"sqlite\" 
-DVERSION=\"3.6.14.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -I. -I. 
-DSQLITE_THREADSAFE=1  -g -O2 -MT sqlite3.lo -MD -MP -MF 
".deps/sqlite3.Tpo" -c -o sqlite3.lo sqlite3.c; \
then mv -f ".deps/sqlite3.Tpo" ".deps/sqlite3.Plo"; else rm -f 
".deps/sqlite3.Tpo"; exit 1; fi
mkdir .libs
  gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" 
-DPACKAGE_VERSION=\"3.6.14.2\" "-DPACKAGE_STRING=\"sqlite 3.6.14.2\"" 
-DPACKAGE_BUGREPORT=\"http://www.sqlite.org\"; -DPACKAGE=\"sqlite\" 
-DVERSION=\"3.6.14.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -I. -I. 
-DSQLITE_THREADSAFE=1 -g -O2 -MT sqlite3.lo -MD -MP -MF 
.deps/sqlite3.Tpo -c sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
  gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" 
-DPACKAGE_VERSION=\"3.6.14.2\" "-DPACKAGE_STRING=\"sqlite 3.6.14.2\"" 
-DPACKAGE_BUGREPORT=\"http://www.sqlite.org\"; -DPACKAGE=\"sqlite\" 
-DVERSION=\"3.6.14.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -I. -I. 
-DSQLITE_THREADSAFE=1 -g -O2 -MT sqlite3.lo -MD -MP -MF 
.deps/sqlite3.Tpo -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
/bin/bash ./libtool --tag=CC --mode=link gcc -DSQLITE_THREADSAFE=1  -g 
-O2   -o libsqlite3.la -rpath /usr/local/lib -no-undefined -version-info 
8:6:8 sqlite3.lo
gcc -shared  .libs/sqlite3.o  -lc  -Wl,-soname -Wl,libsqlite3.so.0 -o 
.libs/libsqlite3.so.0.8.6
(cd .libs && rm -f libsqlite3.so.0 && ln -s libsqlite3.so.0.8.6 
libsqlite3.so.0)(cd .libs && rm -f libsqlite3.so && ln -s 
libsqlite3.so.0.8.6 libsqlite3.so)
ar cru .libs/libsqlite3.a  sqlite3.o
ranlib .libs/libsqlite3.a
creating libsqlite3.la
(cd .libs && rm -f libsqlite3.la && ln -s ../libsqlite3.la libsqlite3.la)
if gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" 
-DPACKAGE_VERSION=\"3.6.14.2\" -DPACKAGE_STRING=\"sqlite\ 3.6.14.2\" 
-DPACKAGE_BUGREPORT=\"http://www.sqlite.org\"; -DPACKAGE=\"sqlite\" 
-DVERSION=\"3.6.14.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -I. -I. 
-DSQLITE_THREADSAFE=1  -g -O2 -MT shell.o -MD -MP -MF ".deps/shell.Tpo" 
-c -o shell.o shell.c; \
then mv -f ".deps/shell.Tpo" ".deps/shell.Po"; else rm -f 
".deps/shell.Tpo"; exit 1; fi
/bin/bash ./libtool --tag=CC --mode=link gcc -DSQLITE_THREADSAFE=1  -g 
-O2   -o sqlite3  shell.o ./libsqlite3.la -lcurses
gcc -DSQLITE_THREADSAFE=1 -g -O2 -o .libs/sqlite3 shell.o 
./.libs/libsqlite3.so -lcurses  -Wl,--rpath -Wl,/usr/local/lib
./.libs/libsqlite3.so: undefined reference to `dler...@sunw_1.22'
./.libs/libsqlite3.so: undefined reference to `dlo...@sunw_1.22'
./.libs/libsqlite3.so: undefined reference to `dl...@sunw_1.22'
./.libs/libsqlite3.so: undefined reference to `dlcl...@sunw_1.22'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1
kir...@t2:~/sqlite-3.6.14.2$

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to