This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-16. For the latest, interactive version please visit https://mariadb.com/kb/.

MariaDB Client Library for C Compiled error

I have a problem when i Compiled MariaDB Client Library for C

my command list

tar zxvf mariadb-native-client.tar.gz

cd mariadb-native-client

cmake .

make

i receive some error when i use make

cd /root/soft/mariadb-native-client/libmysql && /usr/bin/cmake -E cmake_link_script CMakeFiles/libmariadb.dir/link.txt --verbose=1 /usr/bin/gcc -fPIC -O2 -g -shared -Wl,-soname,libmariadb.so.1 -o libmariadb.so.1 CMakeFiles/libmariadb.dir/array.c.o CMakeFiles/libmariadb.dir/bchange.c.o CMakeFiles/libmariadb.dir/bmove.c.o CMakeFiles/libmariadb.dir/bmove_upp.c.o CMakeFiles/libmariadb.dir/my_charset.c.o CMakeFiles/libmariadb.dir/violite.c.o CMakeFiles/libmariadb.dir/net.c.o CMakeFiles/libmariadb.dir/charset.c.o CMakeFiles/libmariadb.dir/dbug.c.o CMakeFiles/libmariadb.dir/default.c.o CMakeFiles/libmariadb.dir/errmsg.c.o CMakeFiles/libmariadb.dir/my_vsnprintf.c.o CMakeFiles/libmariadb.dir/errors.c.o CMakeFiles/libmariadb.dir/getopt1.c.o CMakeFiles/libmariadb.dir/getopt.c.o CMakeFiles/libmariadb.dir/get_password.c.o CMakeFiles/libmariadb.dir/int2str.c.o CMakeFiles/libmariadb.dir/is_prefix.c.o CMakeFiles/libmariadb.dir/libmysql.c.o CMakeFiles/libmariadb.dir/list.c.o CMakeFiles/libmariadb.dir/llstr.c.o CMakeFiles/libmariadb.dir/longlong2str.c.o CMakeFiles/libmariadb.dir/mf_dirname.c.o CMakeFiles/libmariadb.dir/mf_fn_ext.c.o CMakeFiles/libmariadb.dir/mf_format.c.o CMakeFiles/libmariadb.dir/mf_loadpath.c.o CMakeFiles/libmariadb.dir/mf_pack.c.o CMakeFiles/libmariadb.dir/mf_path.c.o CMakeFiles/libmariadb.dir/mf_tempfile.c.o CMakeFiles/libmariadb.dir/mf_unixpath.c.o CMakeFiles/libmariadb.dir/mf_wcomp.c.o CMakeFiles/libmariadb.dir/mulalloc.c.o CMakeFiles/libmariadb.dir/my_alloc.c.o CMakeFiles/libmariadb.dir/my_compress.c.o CMakeFiles/libmariadb.dir/my_create.c.o CMakeFiles/libmariadb.dir/my_delete.c.o CMakeFiles/libmariadb.dir/my_div.c.o CMakeFiles/libmariadb.dir/my_error.c.o CMakeFiles/libmariadb.dir/my_fopen.c.o CMakeFiles/libmariadb.dir/my_fstream.c.o CMakeFiles/libmariadb.dir/my_gethostbyname.c.o CMakeFiles/libmariadb.dir/my_getwd.c.o CMakeFiles/libmariadb.dir/my_init.c.o CMakeFiles/libmariadb.dir/my_lib.c.o CMakeFiles/libmariadb.dir/my_malloc.c.o CMakeFiles/libmariadb.dir/my_messnc.c.o CMakeFiles/libmariadb.dir/my_net.c.o CMakeFiles/libmariadb.dir/my_once.c.o CMakeFiles/libmariadb.dir/my_open.c.o CMakeFiles/libmariadb.dir/my_port.c.o CMakeFiles/libmariadb.dir/my_pthread.c.o CMakeFiles/libmariadb.dir/my_read.c.o CMakeFiles/libmariadb.dir/my_realloc.c.o CMakeFiles/libmariadb.dir/my_seek.c.o CMakeFiles/libmariadb.dir/my_static.c.o CMakeFiles/libmariadb.dir/my_symlink.c.o CMakeFiles/libmariadb.dir/my_thr_init.c.o CMakeFiles/libmariadb.dir/my_write.c.o CMakeFiles/libmariadb.dir/password.c.o CMakeFiles/libmariadb.dir/safemalloc.c.o CMakeFiles/libmariadb.dir/str2int.c.o CMakeFiles/libmariadb.dir/strcend.c.o CMakeFiles/libmariadb.dir/strcont.c.o CMakeFiles/libmariadb.dir/strend.c.o CMakeFiles/libmariadb.dir/strfill.c.o CMakeFiles/libmariadb.dir/string.c.o CMakeFiles/libmariadb.dir/strinstr.c.o CMakeFiles/libmariadb.dir/strmake.c.o CMakeFiles/libmariadb.dir/strmov.c.o CMakeFiles/libmariadb.dir/strnmov.c.o CMakeFiles/libmariadb.dir/strtoll.c.o CMakeFiles/libmariadb.dir/strtoull.c.o CMakeFiles/libmariadb.dir/strxmov.c.o CMakeFiles/libmariadb.dir/strxnmov.c.o CMakeFiles/libmariadb.dir/thr_mutex.c.o CMakeFiles/libmariadb.dir/typelib.c.o CMakeFiles/libmariadb.dir/sha1.c.o CMakeFiles/libmariadb.dir/my_stmt.c.o CMakeFiles/libmariadb.dir/my_loaddata.c.o CMakeFiles/libmariadb.dir/my_stmt_codec.c.o CMakeFiles/libmariadb.dir/client_plugin.c.o CMakeFiles/libmariadb.dir/my_auth.c.o CMakeFiles/libmariadb.dir/my_secure.c.o -lz -lpthread -ldl -lssl -lm -Wl,--no-undefined -Wl,--version-script=/root/soft/mariadb-native-client/libmysql/version_script.txt CMakeFiles/libmariadb.dir/my_secure.c.o: In function `my_SSL_error': /root/soft/mariadb-native-client/libmysql/my_secure.c:43: undefined reference to `ERR_get_error' /root/soft/mariadb-native-client/libmysql/my_secure.c:54: undefined reference to `ERR_reason_error_string' CMakeFiles/libmariadb.dir/my_secure.c.o: In function `my_ssl_end': /root/soft/mariadb-native-client/libmysql/my_secure.c:174: undefined reference to `CRYPTO_set_locking_callback' /root/soft/mariadb-native-client/libmysql/my_secure.c:175: undefined reference to `CRYPTO_set_id_callback' /root/soft/mariadb-native-client/libmysql/my_secure.c:177: undefined reference to `CRYPTO_num_locks' /root/soft/mariadb-native-client/libmysql/my_secure.c:187: undefined reference to `ERR_free_strings' /root/soft/mariadb-native-client/libmysql/my_secure.c:188: undefined reference to `EVP_cleanup' /root/soft/mariadb-native-client/libmysql/my_secure.c:189: undefined reference to `CONF_modules_unload' /root/soft/mariadb-native-client/libmysql/my_secure.c:190: undefined reference to `CRYPTO_cleanup_all_ex_data' CMakeFiles/libmariadb.dir/my_secure.c.o: In function `my_ssl_start': /root/soft/mariadb-native-client/libmysql/my_secure.c:110: undefined reference to `CRYPTO_num_locks' /root/soft/mariadb-native-client/libmysql/my_secure.c:120: undefined reference to `CRYPTO_num_locks' /root/soft/mariadb-native-client/libmysql/my_secure.c:122: undefined reference to `CRYPTO_set_id_callback' /root/soft/mariadb-native-client/libmysql/my_secure.c:123: undefined reference to `CRYPTO_set_locking_callback' /root/soft/mariadb-native-client/libmysql/my_secure.c:127: undefined reference to `OPENSSL_config' /root/soft/mariadb-native-client/libmysql/my_secure.c:135: undefined reference to `OPENSSL_add_all_algorithms_noconf'

my system have openssl

[root@localhost mariadb-native-client]# rpm -qa|grep openssl openssl-0.9.8e-22.el5_8.4 openssl-devel-0.9.8e-22.el5_8.4 openssl-0.9.8e-22.el5_8.4 openssl-devel-0.9.8e-22.el5_8.4 [root@localhost mariadb-native-client]#

[root@localhost mariadb-native-client]# openssl version -a OpenSSL 0.9.8r 8 Feb 2011 built on: Mon Dec 17 00:42:24 CST 2012 platform: linux-x86_64 options: bn(64,64) md2(int) rc4(1x,char) des(idx,cisc,16,int) idea(int) blowfish(idx) compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM OPENSSLDIR: "/usr/openssl"

Answer Answered by Vladislav Vaintroub in this comment.

It is, very likely, a bug. We use Jira as bugtracking system. Would it be possible for you to file this bug , together with details about your system there https://jira.mariadb.org (use project CONC) ? Thanks!

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.