problems compiling under IRIX

James K. Lowden jklowden at speakeasy.org
Thu Jul 4 01:52:31 EDT 2002


On Wed, 3 Jul 2002 18:39:14 -0700 (PDT), "David Nahman"
<vanyadog at yahoo.com> wrote:
> I've downloaded the latest cvs snapshot, and am having
> some strange problems building under IRIX 6.5 with gcc
> 2.95.2.  If I run autogen.sh with the no options, I am
> able to build fine.  If I feed it the options that I
> need for my project, namely --disable-shared, the
> build chokes when I get to freebcp.  My error messages
> are:
[...]
> ld32: ERROR 33: Unresolved text symbol
> "tds_get_locale" -- 1st referenced by
> ../dblib/.libs/libsybdb.a(dblib.o).
>         Use linker option -v to see when and which
> objects, archives and dsos are loaded.  
> ld32: INFO 152: Output file removed because of error.
> collect2: ld returned 2 exit status
> make[2]: *** [freebcp] Error 1

David, 

I don't know the answer, and I could not reproduce your results.  How's
that for help?  

$ nm ../dblib/.libs/libsybdb.a |perl -ne'$o = $_ if /\.o:/; $o{$o} .= $_
if /tds_get_locale/; END{foreach $k (keys %o){ print $k, $o{$k}; }}'

dblib.o:
         U _tds_get_locale
locale.o:
0000005c T _tds_get_locale

What that says is, libsybdb.a contains the symbol "tds_get_locale" twice:

1.	in dblib.o (undefined) 
2.	in locale.o (defined)

Do you see the same on your system?  

I have:

$ libtool --version
ltmain.sh (GNU libtool) 1.4a (1.641.2.255 2001/05/22 10:39:30)

I did:

$ ./autogen.sh
$ ./configure  --with-tdsver=7.0 --disable-shared
$ make

and got just what you did with freebcp, except no errors:

gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include     -g -O2
-DTDS70 -
c freebcp.c
/bin/sh ../../libtool --mode=link gcc  -g -O2 -DTDS70  -o freebcp 
freebcp.o ../
dblib/libsybdb.la 
gcc -g -O2 -DTDS70 -o freebcp freebcp.o  ../dblib/.libs/libsybdb.a

You can work around it, of course, with "make || touch src/apps/freebcp;
make install".  You won't get a working freebcp executable, but you'll
have the libraries.  

Regards, 

--jkl



More information about the FreeTDS mailing list