Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Justin T Pryzby <justinp AT norchemlab.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] freetds on solaris 11: symbol scope specifies local binding (same problem)
  • Date: Mon, 23 Sep 2013 15:42:12 -0700

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




Archive powered by MHonArc 2.6.24.

Top of Page