I did installed myodbc, setup odbc.ini adn tried to connect to a DSN source but always when I try, what I get is a claim about undefined symbol. Following a previous bug report of myodbc, I've tried to compile myodbc with "--with-libtool" but the same problem still occurring. Reproducible: Always Steps to Reproduce: 1. iodbctest 2. DSN=ldap Actual Results: 1: [iODBC][Driver Manager]/usr/lib/libmyodbc3.so: undefined symbol: lt_dlclose (0), SQLSTATE=00000 2: [iODBC][Driver Manager]Specified driver could not be loaded (0), SQLSTATE=IM003 Expected Results: give me a sql prompt. Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1, 2.6.11-gentoo-r6 i686) ================================================================= System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.arcticnetwork.ca/ http://gentoo.binarycompass.org http://gentoo.blueyonder.co.uk http://gentoo.ccccom.com http://gentoo.channelx.biz/ http://gentoo.chem.wisc.edu/gentoo/ " PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 alsa apache2 apm arts avi berkdb bitmap-fonts crypt cups eds emboss encode foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 imap imlib jpeg kde ldap libg++ libwww mad mikmod motif mp3 mpeg mysql ncurses nls odbc ogg oggvorbis opengl oss pam pdflib perl png postgres python quicktime readline samba sdl snmp spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts vhosts vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Please have look at Bug #102026, specifically comment 9. Make sure, the following line is added to your ebuild script as stated in named comment: --with-libtool \ With the additional CFLAG: -lltdl in your make.conf as stated in comment 4, a simple reemerge fixes this problem (at least for me, that is).
I'm also having this problem. Adding -lltdl to my make.conf and re-emerging myodbc per bug #102026 fixes the problem, but then libmysql3S.so still has problems: ----------------------------------------------------------------------------- proxyone ~ # ldd -r /usr/lib/libmyodbc3S-3.51.11.so linux-gate.so.1 => (0xffffe000) libqt-mt.so.3 => /usr/qt/3/lib/libqt-mt.so.3 (0xb7680000) libXext.so.6 => /usr/lib/libXext.so.6 (0xb766f000) libX11.so.6 => /usr/lib/libX11.so.6 (0xb758a000) libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7581000) libdl.so.2 => /lib/libdl.so.2 (0xb757d000) libpthread.so.0 => /lib/libpthread.so.0 (0xb756b000) libz.so.1 => /lib/libz.so.1 (0xb7558000) libodbcinst.so.1 => /usr/lib/libodbcinst.so.1 (0xb7548000) libstdc++.so.5 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.so.5 (0xb7493000) libm.so.6 => /lib/libm.so.6 (0xb7471000) libc.so.6 => /lib/libc.so.6 (0xb735e000) libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libgcc_s.so.1 (0xb7352000) libmng.so.1 => /usr/lib/libmng.so.1 (0xb72e3000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb72c5000) libpng.so.3 => /usr/lib/libpng.so.3 (0xb728c000) libXi.so.6 => /usr/lib/libXi.so.6 (0xb7282000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7278000) libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7273000) libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7266000) libXft.so.2 => /usr/lib/libXft.so.2 (0xb7250000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb71c8000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb719a000) libSM.so.6 => /usr/lib/libSM.so.6 (0xb7190000) libICE.so.6 => /usr/lib/libICE.so.6 (0xb7175000) /lib/ld-linux.so.2 (0x80000000) libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb714d000) undefined symbol: SQLTables (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLFreeHandle (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLDriverConnect (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLGetDiagRec (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLSetEnvAttr (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLBindCol (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLFetch (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLAllocHandle (/usr/lib/libmyodbc3S-3.51.11.so) undefined symbol: SQLDisconnect (/usr/lib/libmyodbc3S-3.51.11.so) proxyone ~ # ----------------------------------------------------------------------------- This prevents iodbc from working, as far as I can determine. Which leaves me without OpenLDAP/backsql 2.2.28-r4. My myodbc was originally emerged on Jan 19th, but I didn't have this problem until I updated OpenLDAP yesterday. I think it was using unixODBC before instead of iodbc, so this problem didn't show up. Slapd was locking up though after a random time period and had to be killed (though it wasn't using any cpu, it just didn't respond). I can't say whether that was related to this problem or not, but I know it was hanging upon opening or trying to open the odbc connection from slapd logs. Maybe these unresolved symbols aren't a problem though, as ldd -r brings up a lot of unresolved symbols on other libraries as well on both Gentoo systems I have here -- revdep-rebuild doesn't seem to mind these.
I have the same problem here, adding -lltdl to CFLAGS solves it for me. (I have the same unresolved symbols left as Wes, but it does not seem to prevent myodbc from working, at least for me. But I noticed, that switching to a vanilla gcc (i686-pc-linux-gnu-3.4.6-vanilla) instead of one using hardened specs (I am using the hardened profile and hardened toolchain.) also helps. Don't know why linking with the vanilla specs for gcc works and linking with hardened specs requires -lltdl in CFLAGS for myodbc to work.
myodbc-3.51.12 is in the tree may worth a try.
Problem seems to be solved for me, I don't need -lltdl while using the hardened gcc with myodbc-3.51.12 anymore.