[freetds] libraries linked with a static path

Wolfgang Gruen wgruen at caci.com
Tue Jan 31 16:30:28 EST 2006


It looks like I am building with the gnu  compiler, but not linking with 
the gnu linker.  I assume I need to install gnu binutils?

I would appreciate if somebody could point me to the proper linker to use 
and where I can download it .

Thanks
Wolfgang




configure:2322: gcc --version </dev/null >&5
gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

configure:2325: $? = 0


configure:2541: checking whether we are using the GNU C compiler
configure:2566: gcc -c   -D_XOPEN_SOURCE_EXTENDED 
-D_FREETDS_LIBRARY_SOURCE conftest.c >&5
configure:2569: $? = 0
configure:2572: test -s conftest.o
configure:2575: $? = 0
configure:2588: result: yes


Linker is noto gnu linker:
configure:3411: checking for ld used by gcc
configure:3478: result: /usr/ccs/bin/ld
configure:3487: checking if the linker (/usr/ccs/bin/ld) is GNU ld
configure:3502: result: no


-bash-3.00$ ld -V
92453-07 linker command s800.sgs ld PA64 B.11.40 REL 040528
ld: 92453-07 linker linker ld B.11.40 040530
ld: Usage:  ld [options] [flags] files





"James K. Lowden" <jklowden at freetds.org> 
Sent by: freetds-bounces at lists.ibiblio.org
01/31/2006 12:23 AM
Please respond to
FreeTDS Development Group <freetds at lists.ibiblio.org>


To
FreeTDS Development Group <freetds at lists.ibiblio.org>
cc

Subject
Re: [freetds] libraries linked with a static path






Wolfgang Gruen wrote:
> I am building the libraries on HP with unixODBC and two libraries get 
> added as libraries with a static path to the library libtdsodbc.sl in
> the  ODBC component. When the loader tries to resolved the libraries, it
> will  ignore the environment variable SHLIB_PATH, since the library is
> added  with a static path. 
> 
>  Does somebody know why this is happening? I see it being added with the
> 
> -l parameter in the Makefile  and couldn't figure out where we add the 
> entire path.
...
> gcc -shared -fPIC -Wl,+h -Wl,libtdsodbc.sl.0 -Wl,+b 
> -Wl,/home/i3build/freetds/lib -o .libs/libtdsodbc.sl.0.0  .libs/odbc.o 
> .libs/connectparams XXXXX 
> -L/home/i3build/unixODBC/lib  /home/i3build/unixODBC/lib/libodbcinst.sl 
> /usr/local/lib/libiconv.sl  -lc -lc  -Wl,-Bsymbolic

I can sort of almost tell you?  I don't know anything about HP/UX. 

gcc passes options that follow '-Wl' to the linker, but I suspect you're
not using the GNU linker because I don't recognize "-Wl,+h ... -Wl,+b" as
GNU linker options.  I would guess, though, that
"-Wl,/home/i3build/freetds/" is passing the unwanted path information to
the linker, which installs it in the ELF header (assuming HP/UX uses ELF
binaries). 

If you have GNU binutils installed and use ELF binaries, you can use
'readelf -d' to look at the rpath information.  I think this is what you
mean by "static path". 

HTH.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




More information about the FreeTDS mailing list