Subject: | Won't build - SSL_MODE_PREFERRED undefined |
I scanned several systems, but SSL_MODE_PREFERRED is not defined anywhere in /usr/include
$ rpm -qa | grep -i -e mariadb -e mysql | sort
libmariadb3-3.0.2-4.2.x86_64
libmariadb-devel-3.0.2-4.2.x86_64
libmysqlcppconn7-1.1.9-2.2.x86_64
libmysqld19-10.2.12-2.1.x86_64
libQt5Sql5-mysql-5.10.0-2.2.x86_64
libreoffice-base-drivers-mysql-6.0.0.2-2.1.x86_64
mariadb-10.2.12-2.1.x86_64
mariadb-bench-10.2.12-2.1.x86_64
mariadb-client-10.2.12-2.1.x86_64
mariadb-connector-odbc-3.0.2-4.1.x86_64
mariadb-errormessages-10.2.12-2.1.noarch
mariadb-tools-10.2.12-2.1.x86_64
mysql-connector-java-5.1.43-3.1.noarch
perl-DBD-mysql-4.043-3.2.x86_64
php7-mysql-7.2.1-1.1.x86_64
$ rpm -q openssl
openssl-1.1.0g-1.1.noarch
$ mysql --version
mysql Ver 15.1 Distrib 10.2.12-MariaDB, for Linux (x86_64) using readline 5.1
$ perl -v | fgrep 5.2
This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-thread-multi-ld
This machine:
Linux 4.14.15-1-default [openSUSE Tumbleweed 20180129]
HP ZBook 15G3 Core(TM) i7-6820HQ CPU @ 2.70GHz/1079(8 cores) x86_64 15963 Mb
$ perl -MV=DBI
DBI
/pro/lib/perl5/site_perl/5.26.0/x86_64-linux-thread-multi-ld/DBI.pm: 1.640
$ perl Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'merijn' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
Show quoted text
mysql> grant all privileges on test.* to 'merijn'@'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
mysql_config: unrecognized option '--embedded'
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/include/mysql -I/usr/include/mysql/mariadb
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/lib64 -lmariadb -lpthread -ldl -lm -lssl -lcrypto
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = merijn
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if your kit is complete...
Looks good
Using DBI 1.64 (for perl 5.026000 on x86_64-linux-thread-multi-ld) installed in /pro/lib/perl5/site_perl/5.26.0/x86_64-linux-thread-multi-ld/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::mysql
Writing MYMETA.yml and MYMETA.json
$ make
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
Running Mkbootstrap for mysql ()
chmod 644 "mysql.bs"
"/data/pro/bin/perl5.26.0" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644
cc -c -I/pro/lib/perl5/site_perl/5.26.0/x86_64-linux-thread-multi-ld/auto/DBI -I/usr/include/mysql -I/usr/include/mysql/mariadb -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"4.044\" -DXS_VERSION=\"4.044\" -fPIC "-I/pro/lib/perl5/5.26.0/x86_64-linux-thread-multi-ld/CORE" dbdimp.c
dbdimp.c: In function ‘mysql_dr_connect’:
dbdimp.c:1987:22: error: ‘SSL_MODE_PREFERRED’ undeclared (first use in this function); did you mean ‘SO_PEERCRED’?
ssl_mode = SSL_MODE_PREFERRED;
^~~~~~~~~~~~~~~~~~
SO_PEERCRED
dbdimp.c:1987:22: note: each undeclared identifier is reported only once for each function it appears in
dbdimp.c:1989:19: error: ‘SSL_MODE_VERIFY_IDENTITY’ undeclared (first use in this function); did you mean ‘SSL_MODE_PREFERRED’?
ssl_mode = SSL_MODE_VERIFY_IDENTITY;
^~~~~~~~~~~~~~~~~~~~~~~~
SSL_MODE_PREFERRED
dbdimp.c:1991:19: error: ‘SSL_MODE_VERIFY_CA’ undeclared (first use in this function); did you mean ‘SSL_MODE_VERIFY_IDENTITY’?
ssl_mode = SSL_MODE_VERIFY_CA;
^~~~~~~~~~~~~~~~~~
SSL_MODE_VERIFY_IDENTITY
dbdimp.c:1993:19: error: ‘SSL_MODE_REQUIRED’ undeclared (first use in this function); did you mean ‘SSL_MODE_PREFERRED’?
ssl_mode = SSL_MODE_REQUIRED;
^~~~~~~~~~~~~~~~~
SSL_MODE_PREFERRED
dbdimp.c:1994:30: error: ‘MYSQL_OPT_SSL_MODE’ undeclared (first use in this function); did you mean ‘MYSQL_OPT_SSL_CRL’?
if (mysql_options(sock, MYSQL_OPT_SSL_MODE, &ssl_mode) != 0) {
^~~~~~~~~~~~~~~~~~
MYSQL_OPT_SSL_CRL
dbdimp.c:2072:30: error: ‘SSL_MODE_DISABLED’ undeclared (first use in this function); did you mean ‘SSL_MODE_REQUIRED’?
unsigned int ssl_mode = SSL_MODE_DISABLED;
^~~~~~~~~~~~~~~~~
SSL_MODE_REQUIRED
dbdimp.c:2125:13: error: ‘MYSQL {aka struct st_mysql}’ has no member named ‘reconnect’
result->reconnect=0;
^~
dbdimp.c: In function ‘mysql_describe’:
dbdimp.c:3967:22: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
buffer->is_null= (my_bool*) &(fbh->is_null);
^
dbdimp.c:3968:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
buffer->error= (my_bool*) &(fbh->error);
^
make: *** [Makefile:353: dbdimp.o] Error 1