我正在尝试编译MariaDB Connector v1.0.5和/或Mysql Connection v 5.3.4。
我已经在Slackware服务器上安装了MariaDB服务器v.10.0.21。我只需要让一个MYSQL连接器工作,不管是哪一个。
还应用了Is there compatible ODBC driver with Mariadb 10 on Linux?中提到的补丁
当我编译MariaDB连接器时,我得到一个错误,说“找不到MariaDB”。
编译Mysql连接器时,出现以下错误:
CMake错误:此项目中使用了以下变量,但它们被设置为NOTFOUND。
请设置它们或确保在CMake文件中正确设置和测试它们:
MYSQL库
由目录/downloads/mysql-connector-odbc-5.3.4-src/driver中的目标“myodbc5a”链接
由目录/downloads/mysql-connector-odbc-5.3.4-src/driver中的目标“myodbc5w”链接
由目录/downloads/mysql-connector-odbc-5.3.4-src/setupgui中的目标“myodbc5S”链接
由目录/downloads/mysql-connector-odbc-5.3.4-src/installer中的目标“myodbc installer”链接
从错误文件输出
确定pthRead创建是否存在于p螺纹中,输出失败:
更改目录/downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/CMakeTmp
运行Build命令/usr/bin/gmake“cmTryCompileExec3523358880/fast”
/usr/bin/gmake-f CMakeFiles/cmTryCompileExec3523358880.dir/build.make CMakeFiles/cmTryCompileExec3523358880.dir/build
gmake1:输入目录/downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3523358880.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec3523358880.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunct ionExists.c Linking C executable cmTryCompileExec3523358880 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3523358880.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec3523358880.dir/CheckFunctionExists.c.o -o cmTryCompileExec3523358880 -rdynamic -lpth reads /usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec3523358880] Error 1 gmake[1]: Leaving directory
/downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/cmakemp'
gmake:**[cmTryCompileExec3523358880/fast]错误2
确定函数DLOPEN是否存在,输出失败:
更改目录/downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/CMakeTmp
运行Build命令/usr/bin/gmake“cmTryCompileExec1888052970/fast”
/usr/bin/gmake-f CMakeFiles/cmTryCompileExec1888052970.dir/build.make CMakeFiles/cmTryCompileExec1888052970.dir/build
gmake1:输入目录/downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /downloads/mysql-connector-odbc-5.3.4-src/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1888052970.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=dlopen -o CMakeFiles/cmTryCompileExec1888052970.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunctionExist s.c Linking C executable cmTryCompileExec1888052970 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1888052970.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=dlopen CMakeFiles/cmTryCompileExec1888052970.dir/CheckFunctionExists.c.o -o cmTryCompileExec1888052970 -rdynamic CMakeFiles/cmTryCompileExec1888052970.dir/CheckFunctionExists.c.o: In function
main':
CuffTealWorks.c:(.text +0x15):未定义引用到dlopen' collect2: error: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec1888052970] Error 1 gmake[1]: Leaving directory
下载/ MySQL连接器-OBC-5.3.4-SRC/CMACHOMENSO/cMAKEMP
gmake:**[cmTryCompileExec1888052970/fast]错误2
块引用
最佳答案
只需使用预编译版本。将库复制到lib并包含目录。