[unixODBC-support] Build Support for 64-bit unixODBC 2.3.0 on AIX

David Ritter David.Ritter at roguewave.com
Tue Jul 26 17:22:50 BST 2011


There seems to be a bunch of things going on here.  As far as I can tell libtool doesn't support shared libraries on AIX.  I'll chalk this up to partially being a libtool problem and partially AIX's weird world view of what a shared library is.

Regardless to resolve that one will need to execute configure with --disable-shared option and use static libraries/shared archives only.

Additionally I have found that for 64-bit builds configure is not correctly characterizing the proper arguments to pass to the ar or nm utilities on AIX.  To address this problem the following environment variables need to be defined:

AR_FLAGS='-X64 cru'
NM='/usr/ccs/bin/nm -B -X64'

(of course if your nm binary is installed elsewhere you will want to change that path).

With those bits of data I believe I can now build libodbc, but the build is now failing with a linker error when it attempts to link the isql executable:

libtool: link: xlC_r -q64 -o isql isql.o  ../DriverManager/.libs/libodbc.a -liconv ../extras/.libs/libodbcextraslc.a -lpthread
ld: 0711-317 ERROR: Undefined symbol: ._odbcinst_SystemINI
ld: 0711-317 ERROR: Undefined symbol: .SQLGetPrivateProfileString
ld: 0711-317 ERROR: Undefined symbol: .SQLSetConfigMode
ld: 0711-317 ERROR: Undefined symbol: ._SQLDriverConnectPrompt
ld: 0711-317 ERROR: Undefined symbol: .SQLReadFileDSN
ld: 0711-317 ERROR: Undefined symbol: .SQLWriteFileDSN
ld: 0711-317 ERROR: Undefined symbol: .iniElement
ld: 0711-317 ERROR: Undefined symbol: .odbcinst_system_file_path
ld: 0711-317 ERROR: Undefined symbol: .odbcinst_system_file_name
ld: 0711-317 ERROR: Undefined symbol: .iniOpen
ld: 0711-317 ERROR: Undefined symbol: .iniObjectSeek
ld: 0711-317 ERROR: Undefined symbol: .iniPropertyFirst
ld: 0711-317 ERROR: Undefined symbol: .iniPropertyEOL
ld: 0711-317 ERROR: Undefined symbol: .iniProperty
ld: 0711-317 ERROR: Undefined symbol: .iniValue
ld: 0711-317 ERROR: Undefined symbol: .iniPropertyNext
ld: 0711-317 ERROR: Undefined symbol: .iniClose
ld: 0711-317 ERROR: Undefined symbol: .lt_dlclose
ld: 0711-317 ERROR: Undefined symbol: .lt_dlopen
ld: 0711-317 ERROR: Undefined symbol: .lt_dlerror
ld: 0711-317 ERROR: Undefined symbol: .lt_dlsym
ld: 0711-317 ERROR: Undefined symbol: .lt_dlinit

To my eye it looks like at least the libtool library is missing from the link line.  I'll need to dig a little further into this linker error and see if I have any more insights.  Any advice or insight on this one would be appreciated as well.

If I have any more success I'll post back what I did for community posterity.

Thanks!
Dave

From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Tuesday, July 26, 2011 9:07 AM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Build Support for 64-bit unixODBC 2.3.0 on AIX

On 26/07/11 15:44, David Ritter wrote:
Hello,

I am attempting to build unixODBC 2.3.0 64-bit binaries on AIX 6.1.  I am seeing the following linker error and I was wondering if anyone else had encountered it and could suggest a workaround or fix:

libtool: link: xlC_r -Wl,-bM:SRE -o .libs/libodbcinst.so.1  .libs/ODBCINSTConstructProperties.o .libs/ODBCINSTDestructProperties.o .libs/ODBCINSTSetProperty.o .libs/ODBCINSTValidateProperties.o .libs/ODBCINSTValidateProperty.o .libs/SQLConfigDataSource.o .libs/SQLConfigDriver.o .libs/SQLCreateDataSource.o .libs/SQLGetAvailableDrivers.o .libs/SQLGetConfigMode.o .libs/SQLGetInstalledDrivers.o .libs/SQLGetPrivateProfileString.o .libs/SQLGetTranslator.o .libs/SQLInstallDriverEx.o .libs/SQLInstallDriverManager.o .libs/SQLInstallTranslatorEx.o .libs/SQLInstallerError.o .libs/SQLManageDataSources.o .libs/SQLPostInstallerError.o .libs/SQLReadFileDSN.o .libs/SQLRemoveDSNFromIni.o .libs/SQLRemoveDriver.o .libs/SQLRemoveDriverManager.o .libs/SQLRemoveTranslator.o .libs/SQLSetConfigMode.o .libs/SQLValidDSN.o .libs/SQLWriteDSNToIni.o .libs/SQLWriteFileDSN.o .libs/SQLWritePrivateProfileString.o .libs/SQLInstallODBC.o .libs/_logging.o .libs/_odbcinst_ConfigModeINI.o .libs/_odbcinst_UserINI.o .libs/_odbcinst_SystemINI.o .libs/_odbcinst_GetSections.o .libs/_odbcinst_GetEntries.o .libs/_SQLGetInstalledDrivers.o .libs/_SQLWriteInstalledDrivers.o .libs/_SQLDriverConnectPrompt.o   ../ini/.libs/libinilc.a ../log/.libs/libloglc.a ../lst/.libs/liblstlc.a ../libltdl/.libs/libltdlc.a  -lpthread -lc -Wl,-bnoentry  -q64   -Wl,-bE:./odbcinst.exp -Wl,-bernotok
ld: 0711-317 ERROR: Undefined symbol: lt_libltdlc_LTX_preloaded_symbols

Clearly there is some symbol that the linker wants that is not being provided by libltdl, but as far as I can see it is defined in the libldtl headers.

I think there is a conflict with libtool somewhere. I have had the same problem building for some embedded targets. One quick workaround is to remove the extern from the definition in libltdl/ltdl.c but I think the real cause (or at least it is in my case) is that configure for libltdl fails to find how to extract symbols from a object file.

What does the libltdl config report?

--
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20110726/78ed1186/attachment-0001.html>


More information about the unixODBC-support mailing list