New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error: MYSQL_LIB #40

Closed
utdrmac opened this Issue Dec 13, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@utdrmac

utdrmac commented Dec 13, 2017

Fresh CentOS7 install.

    1  yum -y install tbb tbb-devel cmake boost boost-devel gcc gcc-c++ git
    2  yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
    4  yum install Percona-Server-client-57 Percona-Server-devel-57.x86_64 -y
[root@vimeo-mysql-test-3 build_dir]# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   system
--   thread
--   regex
--   program_options
--   chrono
Processing plugin error_report
Processing plugin full_report
Processing plugin general_log
Processing plugin mysql_client
Processing plugin null_dbclient
Processing plugin query_log
Processing plugin simple_report
Processing plugin thread_per_connection
Processing plugin thread_pool
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
MYSQL_LIB
    linked by target "mysql_client" in directory /root/query-playback/percona_playback/mysql_client
@utdrmac

This comment has been minimized.

Show comment
Hide comment
@utdrmac

utdrmac Dec 13, 2017

[root@vimeo-mysql-test-3 build_dir]# find /usr -name "*mysqlclient*"
/usr/lib64/pkgconfig/mysqlclient.pc
/usr/lib64/mysql/libmysqlclient.so.18.1.0
/usr/lib64/mysql/libmysqlclient_r.so.18.1.0
/usr/lib64/mysql/libmysqlclient_r.so.18.0.0
/usr/lib64/mysql/libmysqlclient_r.so.18
/usr/lib64/mysql/libmysqlclient.so.20
/usr/lib64/mysql/libmysqlclient.so.20.3.6
/usr/lib64/mysql/libmysqlclient.so.18
/usr/lib64/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient.so

utdrmac commented Dec 13, 2017

[root@vimeo-mysql-test-3 build_dir]# find /usr -name "*mysqlclient*"
/usr/lib64/pkgconfig/mysqlclient.pc
/usr/lib64/mysql/libmysqlclient.so.18.1.0
/usr/lib64/mysql/libmysqlclient_r.so.18.1.0
/usr/lib64/mysql/libmysqlclient_r.so.18.0.0
/usr/lib64/mysql/libmysqlclient_r.so.18
/usr/lib64/mysql/libmysqlclient.so.20
/usr/lib64/mysql/libmysqlclient.so.20.3.6
/usr/lib64/mysql/libmysqlclient.so.18
/usr/lib64/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient.so
@utdrmac

This comment has been minimized.

Show comment
Hide comment
@utdrmac

utdrmac Dec 13, 2017

Removing "_r" allowed this to compile. IIRC, _r libs were removed a while back no?

find_library(MYSQL_LIB "mysqlclient" PATH_SUFFIXES "mysql")

utdrmac commented Dec 13, 2017

Removing "_r" allowed this to compile. IIRC, _r libs were removed a while back no?

find_library(MYSQL_LIB "mysqlclient" PATH_SUFFIXES "mysql")
@Trashtravis

This comment has been minimized.

Show comment
Hide comment
@Trashtravis

Trashtravis May 17, 2018

Hitting the exactly same error to compile.

Hi @utdrmac ,

Removing the /usr/lib64/mysql/libmysqlclient_r.* libs didn't solve for me. Could you share what did you do in more detail if possible? It's been a wreck to debug that I may be missing something.

Thank you.

Trashtravis commented May 17, 2018

Hitting the exactly same error to compile.

Hi @utdrmac ,

Removing the /usr/lib64/mysql/libmysqlclient_r.* libs didn't solve for me. Could you share what did you do in more detail if possible? It's been a wreck to debug that I may be missing something.

Thank you.

@utdrmac

This comment has been minimized.

Show comment
Hide comment
@utdrmac

utdrmac May 17, 2018

@Trashtravis As I understand it, this project is officially dead. You may want to look at ProxySQL's query mirroring functionality as a replacement. I haven't touched query-playback since last dec when I posted this.

It's not about removing the _r libs from the path. It's about editing the Cmake files and finding that line (find_library) and editing it to remove the "_r" so that the line reads as I pasted in the above comment.

utdrmac commented May 17, 2018

@Trashtravis As I understand it, this project is officially dead. You may want to look at ProxySQL's query mirroring functionality as a replacement. I haven't touched query-playback since last dec when I posted this.

It's not about removing the _r libs from the path. It's about editing the Cmake files and finding that line (find_library) and editing it to remove the "_r" so that the line reads as I pasted in the above comment.

@utdrmac utdrmac closed this May 17, 2018

@stefanproell

This comment has been minimized.

Show comment
Hide comment
@stefanproell

stefanproell Sep 27, 2018

The comment from @utdrmac helped in my case. I could compile and install Percona Query Playback as follows under Ubuntu:

sudo apt-get install libtbb-dev libmysqlclient-dev libboost-program-options-dev libboost-thread-dev libboost-regex-dev libboost-system-dev libboost-chrono-dev pkg-config cmake  libssl-dev
git clone https://github.com/Percona-Lab/query-playback.git

Then edit the file ~/git/query-playback/percona_playback/mysql_client/CMakeLists.txt
and remove the suffix as described. Make sure to have this line here

find_library(MYSQL_LIB "mysqlclient" PATH_SUFFIXES "mysql")

and proceed with

cd ~/git/query-playback/build_dir
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make
sudo make install

stefanproell commented Sep 27, 2018

The comment from @utdrmac helped in my case. I could compile and install Percona Query Playback as follows under Ubuntu:

sudo apt-get install libtbb-dev libmysqlclient-dev libboost-program-options-dev libboost-thread-dev libboost-regex-dev libboost-system-dev libboost-chrono-dev pkg-config cmake  libssl-dev
git clone https://github.com/Percona-Lab/query-playback.git

Then edit the file ~/git/query-playback/percona_playback/mysql_client/CMakeLists.txt
and remove the suffix as described. Make sure to have this line here

find_library(MYSQL_LIB "mysqlclient" PATH_SUFFIXES "mysql")

and proceed with

cd ~/git/query-playback/build_dir
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment