0

I'm trying to make a project, but I got that error.

[root@54 Source]# make -j8 -C ./Connector usa
make: se ingresa al directorio `/lc/Source/Connector'
LIB_LOCAL=usa OPT_LANG=-DLC_USA=9 make Connector
make[1]: se ingresa al directorio `/lc/Source/Connector'
ccache g++ -g -m32  -o Connector BillCmdMsg_KOR.o BillCmdMsg_TLD.o BillingClient_KOR.o BillingClient_TLD.o CmdMsg.o ConfigFile.o Connector.o Descriptor.o Log.o ProcConnMsg.o ProcConnMsg_KOR.o ProcConnMsg_TLD.o Server.o ServerRun.o User.o Utils.o WaitPlayerList.o -L../ShareLib -L/usr/local/lib -L/usr/local/apr/lib -L/usr/lib/mysql -lSharelib -lmysqlclient -lboost_thread-gcc44-mt-1_65_1 -lboost_system-gcc44-mt-1_65_1 -llog4cxx -laprutil-1 -lapr-1 -lrt -lstdc++ -lexpat -lz -lpthread -rdynamic -ljsoncpp -ldl -lbotan-1.10
/usr/bin/ld: skipping incompatible /usr/lib64/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld devolvió el estado de salida 1
make[1]: *** [Connector] Error 1
make[1]: se sale del directorio `/lc/Source/Connector'
make: *** [usa] Error 2
make: se sale del directorio `/lc/Source/Connector'

But the file /usr/lib64/libmysqlclient.a exists ...

[root@54 lib64]# ls | grep libmysql
libmysqlclient16
libmysqlclient.a
libmysqlclient_r.a
libmysqlclient_r.so.12
libmysqlclient_r.so.12.0.0
libmysqlclient_r.so.15
libmysqlclient_r.so.15.0.0
libmysqlclient_r.so.16
libmysqlclient_r.so.16.0.0
libmysqlclient.so.12
libmysqlclient.so.12.0.0
libmysqlclient.so.15
libmysqlclient.so.15.0.0
libmysqlclient.so.16
libmysqlclient.so.16.0.0
libmysqld.a
libmysqld.so
libmysqld.so.18
libmysqlservices.a

I'm running on CentOS 6.10 64b

I've already reinstalled MariaDB-devel, but it still don't work

lxlDanilxl
  • 38
  • 6
  • Does this answer your question? [/usr/bin/ld: skipping incompatible foo.so when searching for foo](https://stackoverflow.com/questions/16927885/usr-bin-ld-skipping-incompatible-foo-so-when-searching-for-foo) – jacob Jan 10 '20 at 19:33

1 Answers1

0

On the g++ command line you apparently use -m32, forcing the compiler to produce a 32-bit binary. However, the MySQL library is presumably 64-bit (judging by your operating system). The linker is clever, sees the incompatibility and ignores the available library.

jacob
  • 1,535
  • 1
  • 11
  • 26