[freetds] freetds on solaris 11: symbol scope specifies local binding

Justin T Pryzby justinp at norchemlab.com
Fri Aug 23 19:54:22 EDT 2013


Hi Everyone,

I'm trying to use DBD::Sybase which depends on freetds, which I'm
trying to compile under solaris 11.

./configure && make ends with:

make[3]: Entering directory `/export/home/justinp/src/freetds-0.91/src/ctlib'
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../include  -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -Wdeclaration-after-statement -MT ct.lo -MD -MP -MF .deps/ct.Tpo -c -o ct.lo ct.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -Wdeclaration-after-statement -MT ct.lo -MD -MP -MF .deps/ct.Tpo -c ct.c  -fPIC -DPIC -o .libs/ct.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -D_FREETDS_LIBRARY_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -D_REENTRANT -pthreads -g -O2 -Wdeclaration-after-statement -MT ct.lo -MD -MP -MF .deps/ct.Tpo -c ct.c -o ct.o >/dev/null 2>&1

[...]

/bin/sh ../../libtool --tag=CC   --mode=link gcc -D_REENTRANT -pthreads -g -O2 -Wdeclaration-after-statement -version-info 4:0:0 -export-symbols-regex '^(cs_|ct_|blk_).*'         -o libct.la -rpath /usr/local/lib ct.lo cs.lo blk.lo ctutil.lo  ../tds/libtds.la ../replacements/libreplacements.la -lnsl -lsocket    
libtool: link: /usr/gnu/bin/nm -B  .libs/ct.o .libs/cs.o .libs/blk.o .libs/ctutil.o   ../tds/.libs/libtds.a ../replacements/.libs/libreplacements.a | sed -n -e 's/^.*[  ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | /usr/gnu/bin/sed 's/.* //' | sort | uniq > .libs/libct.exp
libtool: link: /usr/gnu/bin/grep -E -e "^(cs_|ct_|blk_).*" ".libs/libct.exp" > ".libs/libct.expT"
libtool: link: mv -f ".libs/libct.expT" ".libs/libct.exp"
libtool: link: echo "{ global:" > .libs/libct.so.4.0.0.exp
libtool: link: cat .libs/libct.exp | /usr/gnu/bin/sed -e "s/\(.*\)/\1;/" >> .libs/libct.so.4.0.0.exp
libtool: link: echo "local: *; };" >> .libs/libct.so.4.0.0.exp

libtool: link:  gcc -shared -Wl,-z -Wl,text -Wl,-M -Wl,.libs/libct.so.4.0.0.exp -Wl,-h -Wl,libct.so.4 -o .libs/libct.so.4.0.0  .libs/ct.o .libs/cs.o .libs/blk.o .libs/ctutil.o  -Wl,-z -Wl,allextract ../tds/.libs/libtds.a ../replacements/.libs/libreplacements.a -Wl,-z -Wl,defaultextract  -lnsl -lsocket -lc  -pthreads   -pthreads
Undefined                       first referenced
 symbol                             in file
strlen                              .libs/ct.o  (symbol scope specifies local binding)
ld: fatal: symbol referencing errors. No output written to .libs/libct.so.4.0.0
collect2: ld returned 1 exit status

Any suggestions?  I've tried various things like --disable-shared
(which works, but then causes DBD::Sybase to fail), --disable-rpath
(no effect), nightly development snapshot (no effect) running the link
commands manually, all with no resolution.

Thanks,
Justin


More information about the FreeTDS mailing list