List:MySQL ODBC« Previous MessageNext Message »
From:Brian Panulla Date:March 8 2012 5:44pm
Subject:5.1.10 on Mac OS X 10.7 with unixODBC
View as plain text  
I'm trying to build 5.1.10 on OS X with unixODBC installed via MacPorts,
and the build process can't seem to find the libs when it goes to link
them. I've configured the build like so:

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

MacPorts puts things in an idiosyncratic location: /opt/local. All of the
libodbc* files are in /opt/local/lib.

When I run make things proceed nicely until it tries to access odbcinst:

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

Is the build process failing to propagate the ODBC_LIB_DIR value all the
way through? Should I be using some other flags for unixODBC?

-B

Thread
5.1.10 on Mac OS X 10.7 with unixODBCBrian Panulla8 Mar