Skip to Content.
Sympa Menu

freetds - Re: [freetds] Build problems on AIX

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] Build problems on AIX
  • Date: Thu, 11 Dec 2008 10:41:05 +0100

2008/12/10 Ben Lentz <ben.lentz AT gmail.com>:
> I have encountered (and fixed) the following issues building
> freetds-0.82 on AIX 5.3.0.0 TL6 SP4. unixODBC is installed in
> /opt/local already and causes the first issue.
>
> Issue:
> gcc -Wl,-blibpath:/opt/local/lib:/usr/lib:/lib,-brtl -DHAVE_CONFIG_H
> -I. -I. -I../../include -I../../include -I/opt/local/include
> -D_FREETDS_LIBRARY_SOURCE -DIODBC -D_REENTRANT -D_THREAD_SAFE
> -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes
> -Wno-long-long -D_THREAD_SAFE -I/opt/local/include
> -Wdeclaration-after-statement -MT connectparams.lo -MD -MP -MF
> .deps/connectparams.Tpo -c connectparams.c -DPIC
> connectparams.c:90: error: static declaration of
> 'SQLGetPrivateProfileString' follows non-static declaration
> /opt/local/include/odbcinst.h:468: error: previous declaration of
> 'SQLGetPrivateProfileString' was here
> make[3]: *** [connectparams.lo] Error 1
> make[3]: Leaving directory `/home/blentz/test/test/freetds-0.82/src/odbc'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/blentz/test/test/freetds-0.82/src/odbc'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/blentz/test/test/freetds-0.82/src'
> make: *** [all-recursive] Error 1
>
> Fix:
> env CC="$CC -DHAVE_SQLGETPRIVATEPROFILESTRING" ./configure
>
> Not sure what's up with this. GNU libtool 1.5.26 is installed in
> /opt/local and is first in PATH.
>

Mmm.... did you use --with-unixodbc=/opt/local during configure ?? It
seems configure fails to found SQLPrivateProfileString function in
odbcinst.

> Issue:
> gcc -D_THREAD_SAFE -g -O2 -Wdeclaration-after-statement -o
> .libs/freebcp freebcp.o -L../dblib/.libs -lsybdb -liconv -lpthreads
> -Wl,-blibpath:/usr/local/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/../../..:/usr/lib:/lib
> ld: 0711-317 ERROR: Undefined symbol: .tdsdump_open
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: ld returned 8 exit status
>
> Fix:
> *** src/apps/Makefile Wed Dec 10 16:22:33 2008
> --- src/apps/Makefile Wed Dec 10 16:36:35 2008
> ***************
> *** 287,293 ****
> SUBDIRS = fisql
> DIST_SUBDIRS = $(SUBDIRS)
> dist_bin_SCRIPTS = osql
> ! freebcp_LDADD = ../dblib/libsybdb.la $(NETWORK_LIBS)
> freebcp_SOURCES = freebcp.c freebcp.h
> tsql_LDADD = ../tds/libtds.la \
> ../replacements/libreplacements.la \
> --- 287,293 ----
> SUBDIRS = fisql
> DIST_SUBDIRS = $(SUBDIRS)
> dist_bin_SCRIPTS = osql
> ! freebcp_LDADD = ../dblib/libsybdb.la ../tds/libtds.la
> ../replacements/libreplacements.la $(NETWORK_LIBS)
> freebcp_SOURCES = freebcp.c freebcp.h
> tsql_LDADD = ../tds/libtds.la \
> ../replacements/libreplacements.la \
> ***************
> *** 306,312 ****
> $(NETWORK_LIBS)
>
> datacopy_SOURCES = datacopy.c
> ! datacopy_LDADD = ../dblib/libsybdb.la
> ../replacements/libreplacements.la $(NETWORK_LIBS)
> all: all-recursive
>
> .SUFFIXES:
> --- 306,312 ----
> $(NETWORK_LIBS)
>
> datacopy_SOURCES = datacopy.c
> ! datacopy_LDADD = ../dblib/libsybdb.la ../tds/libtds.la
> ../replacements/libreplacements.la $(NETWORK_LIBS)
> all: all-recursive
>
> .SUFFIXES:

Probably AIX use different link dependency... I'll try with Linux...

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page