[freetds] unresolved symbols with freetds-0.63.dev.20040418

Rolf Loudon rolf at ses.tas.gov.au
Mon Apr 19 21:48:29 EDT 2004


On Solaris (2.6 - yes its old, but its necessary) I have unixODBC version 
2.2.8 installed.

Is this compatible with freetds-0.63.dev.20040418?

If so, read on.

I have had several problems compiling this version of freetds.

Firstly bsqldb in src/apps fails :

bsqldb.c: In function `print_results':
bsqldb.c:438: warning: implicit declaration of function `asprintf'
/bin/ksh ../../libtool --mode=link gcc  -g -O2   -L/usr/local/unixODBC/lib 
-o bsqldb  bsqldb.o ../dblib/libsybdb.la -lnsl -lsocket
gcc -g -O2 -o .libs/bsqldb bsqldb.o  -L/usr/local/unixODBC/lib 
../dblib/.libs/libsybdb.so -lnsl -lsocket -R/usr/local/freetds/lib
Undefined			first referenced
  symbol  			    in file
asprintf                            bsqldb.o
ld: fatal: Symbol referencing errors. No output written to .libs/bsqldb
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `bsqldb'

As I only really want the driver I re-ran configure with --disable-apps 
which got rid of that problem

But then it failed unable to make the documentation, doxygen not found.

No big deal I thought so proceeded with make install to get the library 
into /usr/local/freetds/lib and all the rest.

setting up the driver file and the datasource name from templates all 
worked ok so then I tried the example test:

isql -v servername sa password

and I get

ld.so.1: isql: fatal: relocation error: file 
/usr/local/freetds/lib/libtdsodbc.so: symbol __eprintf: referenced symbol 
not found

looking back through the compile of freetds I found this:

mv -f ".libs/libtdsodbc.expT" ".libs/libtdsodbc.exp"
/usr/ucb/echo "{ global:" > .libs/libtdsodbc.so.0.0.exp
cat .libs/libtdsodbc.exp | sed -e "s/\(.*\)/\1;/" >> 
/usr/ucb/echo "local: *; };" >> .libs/libtdsodbc.so.0.0.exp
  /usr/ccs/bin/ld -G -M .libs/libtdsodbc.so.0.0.exp -h libtdsodbc.so.0 -o 
.libs/libtdsodbc.so.0.0  .libs/odbc.o .libs/connectparams.o 
.libs/convert_tds2sql.o .libs/descriptor.o .libs/prepare_query.o 
.libs/odbc_util.o .libs/native.o .libs/sql2tds.o .libs/error.o 
.libs/odbc_checks.o -z allextract ../tds/.libs/libtds_objects.a 
../replacements/.libs/libreplacements.a -z 
defaultextract  -R/usr/local/unixODBC/lib 
-R/usr/local/unixODBC/lib  -L/usr/local/unixODBC/lib 
../tds/.libs/libtds_objects.a /usr/local/unixODBC/lib/libodbcinst.so -lnsl 
-lsocket ../replacements/.libs/libreplacements.a   -lc  -Bsymbolic
Undefined			first referenced
  symbol  			    in file
__floatdisf                         ../tds/.libs/libtds_objects.a(convert.o)
__floatdidf                         ../tds/.libs/libtds_objects.a(convert.o)
__eprintf                           .libs/odbc.o
ld: warning: Symbol referencing errors

Any help would be gratefully received.



More information about the FreeTDS mailing list