[Maria-discuss] [MariaDB 10.2.6] [PHP 7.1.6] error: /usr/bin/ld: cannot find -lmysqlclient | wrong mysql library version or lib not found
Hi, I am compiling MariaDB 10.2.6 and PHP 7.1.6 I'm trying it on Debian 8.8 32x and x64 on DigitalOcean See the script: https://gist.github.com/dertin/8de14e458dd4f0d3acb5f0deff120951 <https://gist.github.com/dertin/8de14e458dd4f0d3acb5f0deff120951> But I have problems compiling PHP with MariaDB / MySQLi. Should I check something at the Mariadb installation? # grep 'mysql’ config.log $ ./configure --prefix=/usr/local/php7 --enable-huge-code-pages --with-config-file-scan-dir=/usr/local/php7/etc/conf.d --without-pear --enable-bcmath --with-bz2 --enable-calendar --enable-intl --enable-exif --enable-dba --enable-ftp --with-gettext --with-gd --with-jpeg-dir --enable-mbstring --with-mcrypt --with-mhash --enable-mysqlnd --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-mysqli=/usr/local/mysql/bin/mariadb_config --with-pdo-mysql=/usr/local/mysql --with-openssl --enable-pcntl --with-pspell --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib --enable-zip --with-readline --with-curl --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data ... configure:52615: result: /var/run/mysqld/mysqld.sock configure:52749: checking for mysql_set_server_option in -lmysqlclient configure:52774: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden -Wl,-rpath,/usr/local/mysql/lib/ -L/usr/local/mysql/lib/ -L/usr/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lmariadb -ldl -lm -lssl -lcrypto conftest.c -lmysqlclient -lmcrypt -lltdl -lstdc++ -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -licui18n -licuuc -licudata -licuio >&5 /usr/bin/ld: cannot find -lmysqlclient | char mysql_set_server_option (); | return mysql_set_server_option (); configure:53081: error: wrong mysql library version or lib not found. Check config.log for more information. ac_cv_lib_mysqlclient___mysql_set_server_option=no Tested with: --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysqli=/usr/local/mysql/bin/mariadb_config related to: https://lists.launchpad.net/maria-discuss/msg04668.html What do you think? Guillermo Céspedes Full Stack Developer
Am 04.07.2017 um 17:37 schrieb Guillermo Cespedes:
I am compiling MariaDB 10.2.6 and PHP 7.1.6
I'm trying it on Debian 8.8 32x and x64 on DigitalOcean
Tested with: --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysqli=/usr/local/mysql/bin/mariadb_config
why in the world do poeple in 2017 still link PHP against libmysql at all and how many of these posts do we get just because of the stupid libmysql to libmariadb rename without compat links? [builduser@testserver:~]$ cat /rpmbuild/SPECS/php.spec | grep mysql %package mysqli Summary: mysqli %description mysqli rm -f TSRM/tsrm_win32.h TSRM/tsrm_config.w32.h Zend/zend_config.w32.h ext/mysqlnd/config-win.h ext/standard/winver.h main/win32_internal_function_disabled.h main/win95nt.h --enable-mysqlnd=shared \ --with-mysql-sock=%{_sharedstatedir}/mysql/mysql.sock \ --with-mysqli=shared,mysqlnd \ --with-pdo-mysql=shared,mysqlnd \
Hi, Reindl I have solved it by deleting the directory of construction and indicate the use of shared library, as you indicate. I also fix a problem with the command "source /etc/profile" Previously he has tried with: --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd And it returned me error when locating mysql_config. for that reason probe indicating its route. Collaboration from PHP: http://news.php.net/php.internals/99746 <http://news.php.net/php.internals/99746> Thanks for the help. Guillermo Céspedes Full Stack Developer
El 4 jul. 2017, a las 12:55, Reindl Harald <h.reindl@thelounge.net> escribió:
Am 04.07.2017 um 17:37 schrieb Guillermo Cespedes:
I am compiling MariaDB 10.2.6 and PHP 7.1.6 I'm trying it on Debian 8.8 32x and x64 on DigitalOcean Tested with: --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysqli=/usr/local/mysql/bin/mariadb_config
why in the world do poeple in 2017 still link PHP against libmysql at all and how many of these posts do we get just because of the stupid libmysql to libmariadb rename without compat links?
[builduser@testserver:~]$ cat /rpmbuild/SPECS/php.spec | grep mysql %package mysqli Summary: mysqli %description mysqli rm -f TSRM/tsrm_win32.h TSRM/tsrm_config.w32.h Zend/zend_config.w32.h ext/mysqlnd/config-win.h ext/standard/winver.h main/win32_internal_function_disabled.h main/win95nt.h --enable-mysqlnd=shared \ --with-mysql-sock=%{_sharedstatedir}/mysql/mysql.sock \ --with-mysqli=shared,mysqlnd \ --with-pdo-mysql=shared,mysqlnd \
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
participants (2)
-
Guillermo Cespedes
-
Reindl Harald