Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS build on AIX - No shared objects (.so) generated?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS build on AIX - No shared objects (.so) generated?
  • Date: Tue, 15 Sep 2015 19:46:59 +0100

2015-09-15 18:39 GMT+01:00 Worman, Tyler <tworman AT med.umich.edu>:
> Hi,
> Trying to build FreeTDS (stable .95.19) on AIX 7100-03-05-1524. The .so
> files don't generate. Browsed online and tried a few suggested fixes for
> similar problems but no luck so far. Generated my own .so files from the .a
> that builds but it doesn't seem to work. Any advice?
>
> Using the following:
> ./configure --with-unixodbc=/usr/local/ --prefix=/home/tworman/local
> --with-tdsver=7.0
> make
> make install
>
> Appears to complete but no .so files are generated in the directory
> /home/tworman/local/lib. I only get .a and .la files.
> I tested tsql that was built. It worked and connected to my MS SQL Server
> instance fine.
>

tsql always works :)
It use static linking so one less issue to solve!
AIX is quite strange when it comes to shared libraries. The static
library on AIX are not such different from static ones.

> I then generated the .so from the .a with gcc -fpic -g -shared -o
> libtdsodbc.so libtdsodbc.a
> I verified my config using osql. It's fine until it gets to the actual
> connection and invoking isql (Unixodbc 32-bit).

osql do you mean the utility in src/apps, right?

> I tried the exact same .odbc.ini from a Linux box with a build of FreeTDS
> there and it works fine.
>
> The OSQL test:
> ./osql -S TEST -U accthere -P passwordhere
>
> That produces this but no dump.
> [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV
> failed
> [ISQL]ERROR: Could not SQLConnect
> sed: Cannot find or open file /tmp/osql.dump.51511686.
>
> If I do this instead, I still get no dump, and nothing is written to the
> file I specify.
> TDSDUMPCONFIG=stderr TDSDUMP=~/local/bin/temp ./osql -S TEST -U usernamhere
> -P passwordhere
>

could be is not loading the driver so these environment are not used.

> Thanks!
>
> - Tyler
>
>

It would be helpful to see the configure output to understand if
something went wrong.

>
>
>
>
> Semi-unrelated try of 64 bit build (even though UnixODBC is compiled with
> 32bit types).
> export OBJECT_MODE=64
> export CFLAGS=-maix64
> export LIBPATH=/usr/local/lib
> export LD_LIBRARY_PATH=/usr/local/lib
> export AR_FLAGS="-X64 cru"
> export ARFLAGS="-X64 cru"
> ./configure --with-tdsver=7.0 --with-unixodbc=/usr/local
> --prefix=/home/tworman/local
>
> Configure is fine but build of this fails with:
> Making all in .
> CC odbc.lo
> odbc.c: In function '_SQLRowCount':
> odbc.c:4630: warning: visibility attribute not supported in this
> configuration; ignored
> CC connectparams.lo
> connectparams.c:96: error: static declaration of
> 'SQLGetPrivateProfileString' follows non-static declaration
> /usr/local/include/odbcinst.h:210: error: previous declaration of
> 'SQLGetPrivateProfileString' was here

Is quite expected, is finding the declaration but not the function.
Trying to remove the odbcinst.h should make it compile.
Better to have a 64 bit unixODBC !

> make: The error code from the last command is 1.
> Stop.
> make: The error code from the last command is 1.
> Stop.
> make: The error code from the last command is 2.
> Stop.
> make: The error code from the last command is 1.
> Stop.
> make: The error code from the last command is 1.
> Stop.
>
> Not sure if this is really the path I should go down. This seems like I
> just have multiple libraries defining SQLGetPrivateProfileString but I only
> see one in my library path. That is the one from unixodbc at
> /usr/local/include/

If you have autoconf installed in the system you can try with

autoreconf -if

command before configure to see if you can get a working libtool.

Or I can try to make a distribution from a recent system and send to
you to try a new libtool.

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page