MySQL Forums
Forum List  »  Source, Builds, Binaries

Compiling/linking with unixODBC on OS X
Posted by: Brian Panulla
Date: July 25, 2012 01:06PM

I'm trying to install MySQL Connector/ODBC 5.1.11 from source on Mac OS X Lion (10.7) using the unixODBC manager installed via MacPorts. The compilation appears to work until it tries to link to the unixODBC library.

When using MacPorts almost everything interesting is installed under /opt/local. I built the make files with the following command:

cmake -G "Unix Makefiles" \
-DWITH_UNIXODBC=1 \
-DODBC_INCLUDES=/opt/local/include \
-DODBC_LIB_DIR=/opt/local/lib \
-DMYSQL_INCLUDE_DIR=/opt/local/include/percona/mysql/ \
-DMYSQL_LIB_DIR=/opt/local/lib/percona/mysql/ \
-DCMAKE_INSTALL_NAME_DIR=/opt/local/lib

When I issue "make", the build proceeds without issue until it tried to link to unixODBC:

Linking C shared module ../lib/libmyodbc5.so
ld: library not found for -lodbcinst
collect2: ld returned 1 exit status
make[2]: *** [lib/libmyodbc5.so] Error 1
make[1]: *** [driver/CMakeFiles/myodbc5.dir/all] Error 2
make: *** [all] Error 2

My odbcinst lib is at:
/opt/local/lib/libodbcinst.dylib

Is there a configuration flag I'm missing?

Options: ReplyQuote


Subject
Views
Written By
Posted
Compiling/linking with unixODBC on OS X
3614
July 25, 2012 01:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.