/usr/bin/ld: cannot find -lmariadb

Issue #1076 resolved
Gio created an issue

When trying to execute the make command I ending up with the following error:

Making all in src
make[1]: Entering directory /usr/src/piler-1.3.8/src' gcc -std=c99 -O2 -fPIC -Wall -Wextra -Wuninitialized -Wno-format-truncation -g -I. -I.. -I/usr/include/mysql -I/usr/include/mysql/mysql -D_GNU_SOURCE -DHAVE_TRE -DNEED_MYSQL -o piler piler.c -lpiler -lz -lm -ldl -lcrypto -lssl -ltre -lzip -lwrap -lnsl -L/usr/lib64/ -lmariadb -L. /usr/bin/ld: cannot find -lmariadb collect2: error: ld returned 1 exit status make[1]: *** [piler] Error 1 make[1]: Leaving directory/usr/src/piler-1.3.8/src'
make: *** [all-recursive] Error 1

I’m using 10.4.13-MariaDB

What am I doing wrong. This is the first time that I’m installing Piler. It is installed on CentOS Linux release 7.8.2003 (Core)

When I run ./configure --localstatedir=/var --with-database=mysql it doesn’t show an error

checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
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 sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking for unistd.h... (cached) yes
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking for hosts_access in -lwrap... yes
checking for hosts_access in -lwrap... (cached) yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for fabs in -lm... no
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
checking for SHA256_Init in -lcrypto... yes
checking for SHA256_Init in -lcrypto... (cached) yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking for SSL_write in -lssl... yes
checking for SSL_write in -lssl... (cached) yes
checking tre/tre.h usability... yes
checking tre/tre.h presence... yes
checking for tre/tre.h... yes
checking for main in -ltre... yes
checking for regcomp in -ltre... yes
checking zip.h usability... yes
checking zip.h presence... yes
checking for zip.h... yes
checking for main in -lzip... yes
checking for zip_open in -lzip... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for main in -lz... yes
checking for compress in -lz... yes
checking for mysql_config... yes
checking for main in -lguide... no

run as user: piler
piler data directory: /var/piler
link mode: dynamic

database: mysql
tre library: yes
zip library: yes
tcpwrappers support: yes

pdftotext: /usr/bin/pdftotext
catdoc: /usr/bin/catdoc
catppt: /usr/bin/catppt
ppthtml: /usr/local/bin/ppthtml
xls2csv: /usr/bin/xls2csv
unrtf: /usr/bin/unrtf
tnef: /usr/bin/tnef

configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating etc/Makefile
config.status: creating util/Makefile
config.status: creating init.d/Makefile
config.status: creating systemd/Makefile
config.status: creating unit_tests/Makefile
config.status: creating webui/Makefile
config.status: creating contrib/imap/Makefile
config.status: creating piler-config.h
config.status: piler-config.h is unchanged

IMPORTANT! If you upgrade, be sure to read http://www.mailpiler.org/wiki/current:upgrade

What is going wrong? If you need more information please let me know.

Regards,

Gio

Comments (5)

  1. Janos SUTO repo owner

    Figure out which package ships /usr/lib/x86_64-linux-gnu/libmariadb.so for your distro, then try installing it.

  2. Gio reporter

    Hi Janos,

    As I’m using MariaDB 10.4.13 I found that I was able to install the libmariadb.so with the following command:

    'yum install MariaDB-shared'

    After installation I was able to complete 'make' and perform a 'make install'

    Thanks for pointing me in the right direction!

    Regards,

    Gio

  3. Gio reporter

    Hi Janos,

    As I mentioned above I was able to perform a ‘make install’. This went perfectly well and didn’t gave any errors. After that I followed http://www.mailpiler.org/wiki/current:installation and did a ldconfig (also no error)

    As the manual say’s I would like to perform a ‘make postinstall’ but that doesn’t work. I get the following message:

    [root@piler piler-1.3.8]# make postinstall
    make: *** [postinstall] Error 1

    I did a search on the server and found a postinstall.sh at:
    ./proc/26135/task/26135/cwd/util/
    ./usr/local/libexec/piler/
    I’m trying to install piler version 1.3.8

    When I perform a ls in the piler-1.3.8 folder then I get the following:

    [root@piler piler-1.3.8]# ls
    aclocal.m4 config.status CREDITS install-sh mkinstalldirs piler-config.h.in stamp-h1 unit_tests
    bitbucket-pipelines.yml configure docker LICENSE params.h README systemd util
    config.log configure.in etc Makefile phpunit.xml RELEASE_NOTES test_files VERSION
    config.php.in contrib init.d Makefile.in piler-config.h src tests webui

    I was expecting to find the postinstall.sh script here.

    I tried to run the postinstall.sh script which I found at ./usr/local/libexec/piler/ but that gives the following message:
    [root@piler piler]# make postinstall
    cat postinstall.sh >postinstall
    chmod a+x postinstall

    Am I doing something wrong?

    Regards,

    Gio

  4. Janos SUTO repo owner

    Possible. What does execute the “cat postinstall >postinstall” stuff?

    ‘make postinstall' should run 'bash util/postinstall.sh’. Try running this command.

  5. Log in to comment