我正在尝试编译MariaDB Connector v1.0.5和/或Mysql Connection v 5.3.4。
我在Slackware服务器上安装了MariaDB Server v.10.0.21。我只需要让一个MYSQL连接器正常工作,无论哪一个。
同时应用了Is there compatible ODBC driver with Mariadb 10 on Linux?
中提到的补丁当我编译MariaDB连接器时,我收到一条错误消息“MariaDB not found”。
编译Mysql Connector时出现以下错误:
- CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND。
- 请设置它们或确保它们在CMake文件中正确设置和测试: MYSQL_LIB 由目录“myodbc5a”链接到目录/downloads/mysql-connector-odbc-5.3.4-src/driver 由目录“myodbc5w”链接到目录/downloads/mysql-connector-odbc-5.3.4-src/driver 由目标“myodbc5S”链接到目录/downloads/mysql-connector-odbc-5.3.4-src/setupgui 由目标“myodbc-installer”链接到目录/downloads/mysql-connector-odbc-5.3.4-src/installer
使用以下输出确定pthreads中是否存在pthread_create函数失败: 改变目录:/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 gmake 1:输入目录
/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 / CMakeTmp' 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 gmake 1:输入目录
/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': CheckFunctionExists.c :(。text + 0x15):对dlopen' collect2: error: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec1888052970] Error 1 gmake[1]: Leaving directory
/ downloads / mysql-connector-odbc-5.3.4-src / CMakeFiles / CMakeTmp'的未定义引用 gmake:*** [cmTryCompileExec1888052970 / fast]错误2块引用
答案 0 :(得分:1)
只需使用预编译版本即可。将库复制到lib并包含目录。