0

I am trying to compile a plugin for my game server(more exectly this: click). So, when I am trying to compile the plugin in my linux VM(who uses centos 7+) with make command line, I get these errors:

Compiling plugin..
Compiling plugin SDK..
Linking (dynamic)..
/usr/bin/ld: cannot find -lmysqlclient_r
/usr/bin/ld: skipping incompatible //usr/local/lib/libboost_thread.a when searching for -lboost_thread
/usr/bin/ld: cannot find -lboost_thread
/usr/bin/ld: skipping incompatible //usr/local/lib/libboost_chrono.a when searching for -lboost_chrono
/usr/bin/ld: cannot find -lboost_chrono
/usr/bin/ld: skipping incompatible //usr/local/lib/libboost_date_time.a when searching for -lboost_date_time
/usr/bin/ld: cannot find -lboost_date_time
/usr/bin/ld: skipping incompatible //usr/local/lib/libboost_system.a when searching for -lboost_system
/usr/bin/ld: cannot find -lboost_system
/usr/bin/ld: skipping incompatible //usr/local/lib/libboost_atomic.a when searching for -lboost_atomic
/usr/bin/ld: cannot find -lboost_atomic
collect2: error: ld returned 1 exit status
make: *** [dynamic_link] Error 1

My question is how to avoid these errors? Important note: the tutorial for compiling this plugin(on the main page on github for this plugin) is working for the newer versions for this plugin, but I need the R37 one. The plugin is write in C and it has a makefile inside. Thank you.

IS4
  • 11,945
  • 2
  • 47
  • 86
RaphaAxel
  • 1
  • 1
  • Try building using `make VERBOSE=1` so executed commands are printed into the log and post updated log. Right now it is not clear what is going on during build. Also see [Skipping Incompatible Libraries at compile](https://stackoverflow.com/questions/3119714/skipping-incompatible-libraries-at-compile). – user7860670 Dec 02 '18 at 09:25
  • I compiled with verbose=1 flag and this is the log... https://pastebin.com/mv3V5t4G – RaphaAxel Dec 02 '18 at 18:50

2 Answers2

0

Install the libboost that goes with the distribution. Whatever you have in /usr/local/lib is bad.

nyet
  • 482
  • 2
  • 13
  • I have installed libboosts but still the same... (https://www.boost.org/users/download/ and downloaded boost_1_68_0.zip then installed it) – RaphaAxel Dec 01 '18 at 17:48
  • or should I install on this loacation(/usr/local/lib) these libs? Maybe I don't understand what you say(yeah, I'm newbie at linux and these stuffs..) – RaphaAxel Dec 01 '18 at 17:50
  • You should install libboost supplied by Fedora. `yum install boost-devel` Remove whatever stuff you put in `/usr/local/lib`. Never install anything there unless you can't find what you want provided by `yum`, or you are asking for problems. – nyet Dec 01 '18 at 18:02
0

Makefile uses -m32 compilation option for some reason causing 32 bit executable to be produced. So this executable will require 32 bit libraries. So you should either remove -m32 option or install required 32-bit dependencies.

user7860670
  • 35,849
  • 4
  • 58
  • 84