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, 30 Sep 2013 18:13:02 -0700

On Mon, Sep 30, 2013 at 10:44:17AM +1300, Brent Jackson wrote:
> I vaguely recall encountering a similar problem when I compiled
> FreeTDS 0.65 back in 2007.
>
> I think I avoided the problem by setting the FREETDS_LIBGCC variable
> in the dtlib/Makefile to explicitly specify my libgcc.a file, so as
> to use the GCC version of strlen() instead of the Solaris one.

I tried this, it didn't really help; I believe libgcc is a gcc
runtime; there is no solaris libgcc, just solaris libc.

However, in the process of messing around with that idea, I tried
running:
gsed -i 's/strlen/zstrlen/g' src/ctlib/*.c

Which (amazingly) allows the whole thing to compiled (zstrlen is any
random symbol name, not some replacement defined somewhere). That may
not help much, but it does mean the problem is specific to strlen().

After installing, I even succeeded in compiling DBD::Sybase with:
SYBASE=/usr/local perl Makefile.PL &&
make CC='gcc -m64' LD='gcc -m64' OPTIMIZE=-O3 CCCDLFLAGS='-fPIC'

I nuked the TDS src dir for further testing; running James' ld command
without "-lc -lsocket -lnsl" confirms the above: many libc functions
are shown as undefined, but only strlen says "(symbol scope specifies
local binding)".

Justin




Archive powered by MHonArc 2.6.24.

Top of Page