Date: Thu, 1 Sep 2005 16:21:01 -0400 (EDT) From: "Brian A. Seklecki" <lavalamp@spiritual-machines.org> To: mdbtools-dev@lists.sourceforge.net, ports@freebsd.org Subject: Re: [mdb-dev] databases/mbdtools + unixODBC Message-ID: <20050901154111.I52162@arbitor.digitalfreaks.org> In-Reply-To: <20050901141351.V52162@arbitor.digitalfreaks.org> References: <20050901141351.V52162@arbitor.digitalfreaks.org>
next in thread | previous in thread | raw e-mail | index | archive | help
0.5 is indeed dated 2003-01-18 16:00, and the latest tarball is a "pre release", which is itself 14 months old; that combined with the lack of a Port maintainer explains the lack of updates. Anyway.... If you simply add CONFIGURE_ARGS+= --with-unixodbc=/usr/local ...to the Makefile, it bombs out when it descends into src/odbc/ with: Making all in odbc Error expanding embedded variable. *** Error code 1 Stop in /usr/ports/databases/mdbtools/work/mdbtools-0.5/src. *** Error code 1 Stop in /usr/ports/databases/mdbtools/work/mdbtools-0.5. *** Error code 1 Stop in /usr/ports/databases/mdbtools. ...which is actually it failing on a GNU gmake(1) specific trap. If I manually gmake(1) in that dir: $ cd /usr/ports/databases/mdbtools/work/mdbtools-0.5/src/odbc/ && sudo gmake source='odbc.c' object='odbc.lo' libtool=yes \ depfile='.deps/odbc.Plo' tmpdepfile='.deps/odbc.TPlo' \ depmode=gcc3 /bin/sh ../../depcomp \ /bin/sh /usr/local/bin/libtool15 --mode=compile cc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"mdbtools\" -DVERSION=\"0.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I. -I ../../include `glib-config --cflags` -O -pipe -march=pentium3 -DSQL -DUNIXODBC -c -o odbc.lo `test -f 'odbc.c' || echo './'`odbc.c mkdir .libs cc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"mdbtools\" -DVERSION=\"0.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I. -I ../../include -I/usr/local/include/glib12 -O -pipe -march=pentium3 -DSQL -DUNIXODBC -c odbc.c -MT odbc.lo -MD -MP -MF .deps/odbc.TPlo -fPIC -DPIC -o .libs/odbc.o odbc.c:21:17: sql.h: No such file or directory odbc.c:22:20: sqlext.h: No such file or directory odbc.c:39: error: syntax error before "_odbc_get_client_type" odbc.c:39: warning: data definition has no type or storage class odbc.c:43: error: syntax error before "SQL_API" odbc.c:43: error: syntax error before "henv" odbc.c:43: warning: data definition has no type or storage class odbc.c:44: error: syntax error before "SQL_API" ...which is obviously a result of it not properly #include'ing /usr/local/include/sql.h Anyway, when I fetch mdbtools-0.6pre1.tar.gz, from last year, and manually roll it with ./configure --prefix=/opt --with-unixodbc=/usr/local, it compiles /opt/lib/libmdbodbc.0, which I would normally expect to be a *.so lrwxr-xr-x 1 root wheel 12 Sep 1 14:44 libmdbodbc@ -> libmdbodbc.0 -rwxr-xr-x 1 root wheel 276986 Sep 1 14:44 libmdbodbc.0* -rw-r--r-- 1 root wheel 407048 Sep 1 14:44 libmdbodbc.a -rwxr-xr-x 1 root wheel 836 Sep 1 14:44 libmdbodbc.la* $ ldd /opt/lib/libmdbodbc.0 /opt/lib/libmdbodbc.0: libglib-2.0.so.600 => /usr/local/lib/libglib-2.0.so.600 (0x2818d000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28214000) libodbcinst.so.1 => /usr/local/lib/libodbcinst.so.1 (0x28304000) libintl.so.6 => /usr/local/lib/libintl.so.6 (0x28316000) The solution is to upgrade the port to 0.6pre1 (0.6 will hopefully be out soon). Then add a conditional check for OBDC linkage such as that in the ports/databases/postgresql-odbc/Makefile : .if ${DRIVER_MANAGER} == "unixodbc" PKGNAMESUFFIX= -unixodbc CONFIGURE_ARGS+= --with-unixodbc LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC .else # assume we're using iodbc LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+= --with-iodbc --with-odbcinst=${LOCALBASE}/etc/libiodbc .endif ....or: .if defined(WITH_IODBC) CONFIGURE_ARGS+= --with-iodbc=${PREFIX} LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc .endif .if defined(WITH_UNIXODBC) LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+=--with-unixodbc=${PREFIX} .endif .if defined(WITH_UNIXODBC) && defined(WITH_IODBC) .error "iOnly one ODBC driver supported." .endif ... ~BAS On Thu, 1 Sep 2005, Brian A. Seklecki wrote: > > For whatever reason, FreeBSD's ports/mdbtools isn't linking (or even offering > to link) against unixODBC or iODBC. > > I was browsing the list archives and someone hinted that v0.5 is "several > years" old, but thanks to sf.net's anti-spam measures on list archives, I > don't have that contact's e-mail. > > Anyway, the port lacks a maintainer and if there hasn't been an official > release in that period, that may explain a great many things. > > Anyway, It's hard to believe I'm the first person to try > > php->apache->unixODBC->mdbtools(libmdbodbc)->access database on FreeBSD. > > Looking into this now. I'll open a send-pr(1) as well. > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > mdbtools-dev mailing list > mdbtools-dev@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev > l8* -lava x.25 - minix - bitnet - plan9 - 110 bps - ASR 33 - base8
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050901154111.I52162>