MySQL++

Problem with mysqlclient library
Login

Problem with mysqlclient library

Problem with mysqlclient library

(1) By Dru on 2020-02-18 14:56:52 [link]

Hey Folks,

could you please help me a bit? I'm trying to install MySQL++ on CentOS 7.7. 

This is what I get when running ./configure:

[root@localhost mysql++-3.2.5]# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc accepts -g... yes
checking for /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-ld
checking if the linker (/root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-nm
checking the name lister (/root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-ld option to reload object files... -r
checking for objdump... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-strip
checking for ranlib... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-ranlib
checking for gawk... gawk
checking command to parse /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-nm output from /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc supports -fno-rtti -fno-exceptions... no
checking for /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc option to produce PIC... -fPIC -DPIC
checking if /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc PIC flag -fPIC -DPIC works... yes
checking if /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc static flag -static works... yes
checking if /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc supports -c -o file.o... yes
checking if /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc supports -c -o file.o... (cached) yes
checking whether the /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc linker (/root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc accepts -g... (cached) yes
checking for /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc option to accept ISO C89... (cached) none needed
checking for ANSI C header files... (cached) yes
checking for getopt... yes
checking whether -lm is needed to use C math functions... no
checking whether -lsocket is needed... no
checking whether -lnsl is needed... no
checking for MySQL include directory... /usr/include/mysql
checking for MySQL C API library directory... no joy
configure: error: Didn't find mysqlclient library in '/usr/lib64 /usr/lib /usr/lib64/mysql /usr/lib/mysql /usr/local/lib64 /usr/local/lib /usr/local/lib/mysql /usr/local/mysql/lib /usr/local/mysql/lib/mysql /usr/mysql/lib/mysql /opt/mysql/lib /opt/mysql/lib/mysql /sw/lib /sw/lib/mysql'


I have also tried this:
./configure --with-mysql-lib=/usr/lib64/mysql/

resulting in this:

checking for MySQL C API library directory... no joy
configure: error: Didn't find mysqlclient library in '/usr/lib64/mysql/ /usr/lib64/mysql//lib64 /usr/lib64/mysql//lib /usr/lib64/mysql//lib64/mysql /usr/lib64/mysql//lib/mysql'

#the content of /usr/lib64/mysql/ is
#libmysqlclient_r.so  libmysqlclient.so  libmysqlclient.so.18  libmysqlclient.so.18.0.0  mysql_config  plugin

N.B. I have installed mysql-devel using yum.

Could you please give any hints how I could solve this?

Thank you very much! And have a nice day!

(2) By Warren Young (tangent) on 2020-02-18 15:11:58 in reply to 1 [link]

> checking whether we are using the GNU C compiler... yes  
> checking whether /root/anaconda2/bin/x86_64-conda_cos6-linux-gnu-cc accepts -g... yes

Does the problem clear up if you use the platform compiler?

> the content of `/usr/lib64/mysql/` is ... `libmysqlclient_r.so` ...

Simply finding the library file isn't enough, it also has to link against the definitions provided in the header file.

Search the `config.log` file for similar errors, which should be near the end of that file. They'll probably guide you to the problem without any more help from me, but if not, trim what seems relevant and I'll see what I can see. Do not post the entire file...it'll be huge.

(3) By Dru on 2020-02-18 15:23:37 in reply to 2 [link]

Thanks for this. I'm surely not an IT guy, just a biologist :) One last question - how to use the platform compiler? 

Thank you,

All the best,

(4) By Warren Young (wyetr) on 2020-02-18 15:46:21 in reply to 3

I'm talking about the OS-supplied version of the development tools, as opposed to this "anaconda2" stuff, whatever that is.

This may get you started:

       $ sudo yum group install "Development Tools"

(5) By Dru on 2020-02-19 06:46:01 in reply to 4 [link]

hey wyetr,

thank you for this. I got rid of anaconda and used another compiler. Everything works without any problem. 

All the best,