Percona-QA/pquery

pquery build failure : Makefile:149: recipe for target 'all' failed

rameshvs02 opened this issue · 7 comments

Hi Alexey,

I could not build pquery due to below error.

OS : Ubuntu : 16.04

ramesh@qaserver-05:~/pquery$ cmake . -DPERCONASERVER=ON -DBASEDIR=/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug
-- The C compiler identification is GNU 5.4.1
-- The CXX compiler identification is GNU 5.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.7.4")
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Architecture is x86_64
-- Found OpenSSL: /usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so (found version "1.1.0f")
-- Looking for pthread.h
-- Looking for 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
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- * BASEDIR is set, looking for Percona Server in /qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug
-- * Found Percona Server library: /qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a
-- * Found Percona Server include directory: /qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/include
-- * PQuery revision is: 3800fd4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ramesh/pquery
ramesh@qaserver-05:~/pquery$
ramesh@qaserver-05:~/pquery$ make
Scanning dependencies of target inih++
[ 50%] Building C object src/third_party/inih++/lib/CMakeFiles/inih++.dir/ini.c.o
[ 50%] Building CXX object src/third_party/inih++/lib/CMakeFiles/inih++.dir/INIReader.cpp.o
[ 50%] Linking CXX static library libinih++.a
[ 50%] Built target inih++
Scanning dependencies of target pquery2-ps
[ 50%] Building CXX object src/CMakeFiles/pquery2-ps.dir/pquery.cpp.o
[ 50%] Building CXX object src/CMakeFiles/pquery2-ps.dir/help.cpp.o
[ 50%] Building CXX object src/CMakeFiles/pquery2-ps.dir/node.cpp.o
[ 50%] Building CXX object src/CMakeFiles/pquery2-ps.dir/thread.cpp.o
[ 50%] Linking CXX executable pquery2-ps
/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a(client.c.o): In function `ssl_verify_server_cert':
/qa/work/PS-5.7-trunk_dbg/sql-common/client.c:2917: undefined reference to `ASN1_STRING_get0_data'
/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a(viossl.c.o): In function `ssl_do':
/qa/work/PS-5.7-trunk_dbg/vio/viossl.c:405: undefined reference to `SSL_set_options'
/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a(viosslfactories.c.o): In function `get_dh2048':
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:131: undefined reference to `DH_set0_pqg'
/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a(viosslfactories.c.o): In function `ssl_start':
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:436: undefined reference to `OPENSSL_init_ssl'
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:437: undefined reference to `OPENSSL_init_crypto'
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:438: undefined reference to `OPENSSL_init_ssl'
/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a(viosslfactories.c.o): In function `new_VioSSLFd':
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:549: undefined reference to `TLS_client_method'
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:549: undefined reference to `TLS_server_method'
/qa/work/PS-5.7-trunk_dbg/vio/viosslfactories.c:560: undefined reference to `SSL_CTX_set_options'
/qa/work/PS061217-percona-server-5.7.20-18-linux-x86_64-debug/lib/libperconaserverclient.a(my_aes_openssl.cc.o): In function `my_aes_decrypt':
/qa/work/PS-5.7-trunk_dbg/mysys_ssl/my_aes_openssl.cc:212: undefined reference to `EVP_CIPHER_CTX_reset'
collect2: error: ld returned 1 exit status
src/CMakeFiles/pquery2-ps.dir/build.make:174: recipe for target 'src/pquery2-ps' failed
make[2]: *** [src/pquery2-ps] Error 1
CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/pquery2-ps.dir/all' failed
make[1]: *** [src/CMakeFiles/pquery2-ps.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
ramesh@qaserver-05:~/pquery$````

It requires OpenSSL dev package installed. Please check for that


WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libcurl4-openssl-dev/xenial-security,xenial-updates,now 7.47.0-1ubuntu2.5 amd64 [installed]
libgnutls-openssl27/xenial-security,now 3.4.10-4ubuntu1.3 amd64 [installed,upgradable to: 3.4.10-4ubuntu1.4]
openssl/now 1.0.2g-1ubuntu4.8 amd64 [installed,upgradable to: 1.0.2g-1ubuntu4.9]
ramesh@qaserver-05:~$

yes, reproduced. it looks like your PS061217-percona-server-5.7.20-18-linux-x86_64-debug is built with different OpenSSL version, perhaps v1.1.0. on xenial only 1.0.0 is available. could you please check this?

and you have different OpenSSL in /usr/local which will be picked first on ubuntu

@rameshvs02 could you check please?

it's just broken system, compiles fine on other Ubuntu 16.04

@rameshvs02 closing ftm, please re-open if still an issue now (code has been updated in some ways)