Re: freetds on solaris 11: symbol scope specifies local binding (same problem)

Justin T Pryzby <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Firstly,

On Mon, Sep 23, 2013 at 05:47:01PM -0400, James K. Lowden wrote:
> (Here I am on the FreeTDS list helping someone use an Oracle product.
> The future is a weird place.)  

Thanks for that :)  I suspect it's a problem with solaris tools, or
GNU tools' support for this solaris version.  My problem (usable
DBD::Sybase for a nagios check) is worked-around by installation of
the binary package, but I'm of the impression this is intended to
work, and I'd still like to get it to compile from source.

> I have such a file on my machine, and it's just a list of public
> ct-lib symbols:
> 
> $ awk -F_  '{print $1}' build/src/ctlib/.libs/libct.exp  | uniq -c 
>   19 blk
>   23 cs
>   32 ct
Same here

> $ head .libs/libct.so.4.0.0.exp 
> { global:
...
Same here

> $ tail .libs/libct.so.4.0.0.exp 
...
> local: *; };
Same here

> It's also not perfectly obvious you need any symbol-management
> shenanigans.  If I were writing my own Makefile, I'd begin with 
I tried that exactly, same error:

~/src/freetds-0.91/src/ctlib$ ld -o .libs/libct.so.4.0.0 .libs/ct.o .libs/cs.o .libs/blk.o .libs/ctutil.o ../tds/.libs/libtds.a ../replacements/.libs/libreplacements.a -lnsl -lsocket -lc  -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

ct.c is compiled like:

justinp@sandy:~/src/freetds-0.91/src/ctlib$ make
Making all in unittests
/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

Thanks again for any help you can provide.

Justin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.