Details
Description
An attempt to build e.g MySQL ODBC connector with include files from MariaDB binary tarball ends with a failure:
[elenst@fedora17-64 mysql-connector-odbc-5.2.3-src]$ make
[ 1%] Building C object util/CMakeFiles/myodbc3u.dir/stringutil.c.o
In file included from /data/releases/mariadb-5.5.29-linux-x86_64/include/mysql/my_valgrind.h:18:0,
from /data/releases/mariadb-5.5.29-linux-x86_64/include/mysql/my_sys.h:31,
from /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/util/../MYODBC_MYSQL.h:30,
from /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/util/stringutil.h:37,
from /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/util/stringutil.c:32:
/data/releases/mariadb-5.5.29-linux-x86_64/include/mysql/m_string.h:204:26: fatal error: mysql/plugin.h: No such file or directory
compilation terminated.
make[2]: *** [util/CMakeFiles/myodbc3u.dir/stringutil.c.o] Error 1
make[1]: *** [util/CMakeFiles/myodbc3u.dir/all] Error 2
make: *** [all] Error 2
Indeed, the file structure in the tarball is such that m_string.h and plugin.h are on the same level in include/mysql, while m_string.h wants mysql/plugin.h.
cmake command and log:
[elenst@fedora17-64 mysql-connector-odbc-5.2.3-src]$ ODBC_PATH=/home/elenst/mysql-connector-odbc-5.1.12-src cmake -G "Unix Makefiles" -DWITH_UNIXODBC=1 -DMYSQL_INCLUDE_DIR=/data/releases/mariadb-5.5.25-linux-x86_64/include/ -DMYSQL_INCLUDE_DIR=/data/releases/mariadb-5.5.29-linux-x86_64/include/mysql/ -DMYSQL_LIB_DIR=/data/releases/mariadb-5.5.29-linux-x86_64/lib/ -- Configuring to build Unicode driver -- MySQL Include dir: /data/releases/mariadb-5.5.29-linux-x86_64/include/mysql library dir: /data/releases/mariadb-5.5.29-linux-x86_64/lib/ -- MySQL client libraries: mysqlclient_r;-lpthread -- unixODBC: Found odbc_config in /usr/bin/odbc_config -- Checking if LPCWSTR type is present - TRUE -- Checking if SQLColAttribute last arg is compatible with SQLLEN* - TRUE -- Checking if SQLParamOptions() 2nd and 3rd arg is compatible with SQLULEN - TRUE -- Enabling threads support -- Configuring done -- Generating done -- Build files have been written to: /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src [elenst@fedora17-64 mysql-connector-odbc-5.2.3-src]$ make clean [elenst@fedora17-64 mysql-connector-odbc-5.2.3-src]$ rm CMakeCache.txt [elenst@fedora17-64 mysql-connector-odbc-5.2.3-src]$ ODBC_PATH=/home/elenst/mysql-connector-odbc-5.1.12-src cmake -G "Unix Makefiles" -DWITH_UNIXODBC=1 -DMYSQL_INCLUDE_DIR=/data/releases/mariadb-5.5.25-linux-x86_64/include/ -DMYSQL_INCLUDE_DIR=/data/releases/mariadb-5.5.29-linux-x86_64/include/mysql/ -DMYSQL_LIB_DIR=/data/releases/mariadb-5.5.29-linux-x86_64/lib/ -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring to build Unicode driver -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found. -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- MySQL Include dir: /data/releases/mariadb-5.5.29-linux-x86_64/include/mysql library dir: /data/releases/mariadb-5.5.29-linux-x86_64/lib/ -- MySQL client libraries: mysqlclient_r;-lpthread -- unixODBC: Found odbc_config in /usr/bin/odbc_config -- Checking if LPCWSTR type is present - TRUE -- Looking for dlopen -- Looking for dlopen - not found -- Checking if SQLColAttribute last arg is compatible with SQLLEN* - TRUE -- Checking if SQLParamOptions() 2nd and 3rd arg is compatible with SQLULEN - TRUE -- Enabling threads support -- Configuring done -- Generating done -- Build files have been written to: /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src
The workaround is creating include/mysql/mysql link pointing at include/mysql.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
MariaDB/MySQL clients are supposed to use mysql_config script to get the include paths. Did you try that?