Error while compiling Bacula 9.0.6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error while compiling Bacula 9.0.6

fbafkis
Hi everybody!

I'm compiling bacula 9.0.6 from source on CentOS 7, after having configured it for my needings with:


./configure --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/usr/libexec/bacula/ --with-working-dir=/var/spool/bacula/ --with-logdir=/var/log --enable-smartalloc --with-mysql --with-job-email=myemail@gmail.com --with-hostname=192.168.0.4


Then I try to run:

make -j8


but after a while, I get this error:

/bacula-9.0.6/libtool --silent --tag=CXX --mode=link /usr/bin/g++    -o libbaccats-mysql.la mysql.lo -export-dynamic -rpath /usr/lib64 -release 9.0.6 \
                     -soname libbaccats-9.0.6.so -L/usr/lib64/ -lmariadb -lnsl -lz -ldl -lm -lpthread -lssl -lcrypto
/usr/bin/ld: cannot find -lmariadb
collect2: error: ld returned 1 exit status
make[1]: *** [libbaccats-mysql.la] Error 1
make[1]: Leaving directory `/bacula-9.0.6/src/cats'


  ====== Error in /bacula-9.0.6/src/cats ======


I don't understand why. I have last version of MariaDB (mysql) installed, included mariadb-devel. I tried to search for that library (searching the internet somebody suggested to create a symbolic link between the location of the library and the /lib/ directory) but I didn't find anything. I'm not an expert in MySql, and I didn't found anything helpful on the web. So I ask you: how can I resolve this error while compiling the source?

Thank you a lot in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling Bacula 9.0.6

fbafkis
Solved! I found out that was enough to create a copy of /usr/lib64/mariadbclient.a in the same location but named mariadb.a . It's important to make a copy, not rename directly the file, naturally. At first I tough it was enough to delete the name of the library from the Makefile in /baculasrc/src/cats but after the installation some components were missing in the bacula environment. Definitively it was a problem about the name-upgrade of some libraries in the last versions of MariaDB. Alternatively you can create a symlink to the original library file.