[freetds] libraries linked with a static path

Wolfgang Gruen wgruen at caci.com
Mon Jan 30 17:37:35 EST 2006


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.

I would appreciate if somebody could let me know how to add theses dynamic 
libraries without the static path.
Thanks
Wolfgang


1)The libraries are 
-lodbcinst.sl
-libiconv.sl

2) The build log:
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

3) Makefile :
Makefile:ODBCINSTLIB = -lodbcinst

4) Output of chatr
# chatr +l /home/i3build/unixODBC/lib/libodbcinst.sl.1  libtdsodbc.sl.0.0
libtdsodbc.sl.0.0:
   current values:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     enabled   second
             embedded path  disabled  first  /home/i3build/freetds/lib
         internal name:
             libtdsodbc.sl.0
         shared library list:
             static    /home/i3build/unixODBC/lib/libodbcinst.sl.1
             static    /usr/local/lib/libiconv.sl
             dynamic   /usr/lib/libc.2
         shared vtable support disabled
         explicit unloading enabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references enabled
   new values:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     enabled   second
             embedded path  disabled  first  /home/i3build/freetds/lib
         internal name:
             libtdsodbc.sl.0
         shared library list:
             static    /home/i3build/unixODBC/lib/libodbcinst.sl.1
             static    /usr/local/lib/libiconv.sl
             dynamic   /usr/lib/libc.2
         shared vtable support disabled
         explicit unloading enabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references enabled




More information about the FreeTDS mailing list