Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBD-mysql-5.001 - build failures #371

Closed
rshingleton opened this issue Oct 10, 2023 · 9 comments
Closed

DBD-mysql-5.001 - build failures #371

rshingleton opened this issue Oct 10, 2023 · 9 comments

Comments

@rshingleton
Copy link

First Case:
OS: Alpine - Perl 5.36.0
Dockerbuild:

#8 89.31 2023-10-10T13:27:46,13,DBD-mysql-5.001| Building distribution
#8 89.31 2023-10-10T13:27:46,13,DBD-mysql-5.001| Executing /usr/bin/make
#8 89.31 2023-10-10T13:27:46,13,DBD-mysql-5.001| cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
#8 89.31 2023-10-10T13:27:46,13,DBD-mysql-5.001| cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
#8 89.31 2023-10-10T13:27:46,13,DBD-mysql-5.001| cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
#8 89.31 2023-10-10T13:27:46,13,DBD-mysql-5.001| cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| Running Mkbootstrap for mysql ()
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| chmod 644 "mysql.bs"
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| "/opt/perl/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| cc -c -I/opt/perl/lib/site_perl/5.36.0/x86_64-linux/auto/DBI -I/usr/include/mysql -I/usr/include/mysql/mysql -g -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION="5.001" -DXS_VERSION="5.001" -fPIC "-I/opt/perl/lib/5.36.0/x86_64-linux/CORE" dbdimp.c
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_dr_connect':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1407:31: error: 'MYSQL_OPT_GET_SERVER_PUBLIC_KEY' undeclared (first use in this function); did you mean 'MYSQL_SERVER_PUBLIC_KEY'?
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1407 | mysql_options(sock, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, &server_get_pubkey);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | MYSQL_SERVER_PUBLIC_KEY
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1407:31: note: each undeclared identifier is reported only once for each function it appears in
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1464:22: error: 'SSL_MODE_PREFERRED' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1464 | ssl_mode = SSL_MODE_PREFERRED;
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1466:26: error: 'SSL_MODE_VERIFY_IDENTITY' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1466 | ssl_mode = SSL_MODE_VERIFY_IDENTITY;
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1468:26: error: 'SSL_MODE_VERIFY_CA' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1468 | ssl_mode = SSL_MODE_VERIFY_CA;
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1470:26: error: 'SSL_MODE_REQUIRED' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1470 | ssl_mode = SSL_MODE_REQUIRED;
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1471:37: error: 'MYSQL_OPT_SSL_MODE' undeclared (first use in this function); did you mean 'MYSQL_OPT_SSL_CRL'?
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1471 | if (mysql_options(sock, MYSQL_OPT_SSL_MODE, &ssl_mode) != 0) {
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | MYSQL_OPT_SSL_CRL
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:1480:37: error: 'SSL_MODE_DISABLED' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 1480 | unsigned int ssl_mode = SSL_MODE_DISABLED;
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_prepare':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:2407:24: warning: assignment to 'my_bool *' {aka 'char *'} from incompatible pointer type '_Bool *' [-Wincompatible-pointer-types]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 2407 | bind->is_null= &(fbind->is_null);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_internal_execute41':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:2943:63: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 2943 | "\t<- mysql_internal_execute_41 returning %lu rows\n",
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~^
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 2944 | rows);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_execute':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:3104:32: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3104 | sprintf(actual_row_num, "%lu", imp_sth->row_num);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~^ ~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_describe':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:3198:22: warning: assignment to 'my_bool *' {aka 'char *'} from incompatible pointer type '_Bool *' [-Wincompatible-pointer-types]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3198 | buffer->is_null= &(fbh->is_null);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:3199:20: warning: assignment to 'my_bool *' {aka 'char *'} from incompatible pointer type '_Bool ' [-Wincompatible-pointer-types]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3199 | buffer->error= (bool
) &(fbh->error);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ^
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_fetch':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:3503:63: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3503 | PerlIO_printf(DBIc_LOGPIO(imp_xxh), "\tmysql_num_rows=%lu\n",
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~^
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3504 | mysql_num_rows(imp_sth->result));
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:3505:68: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3505 | PerlIO_printf(DBIc_LOGPIO(imp_xxh), "\tmysql_affected_rows=%lu\n",
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~^
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 3506 | mysql_affected_rows(imp_dbh->pmysql));
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_FETCH_attrib':
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| dbdimp.c:4106:60: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| 4106 | PerlIO_printf(DBIc_LOGPIO(imp_xxh), "INSERT ID %lu\n", imp_sth->insertid);
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | ~~^ ~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | | |
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:47,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_db_quote':
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| dbdimp.c:4646:12: warning: implicit declaration of function 'mysql_real_escape_string_quote'; did you mean 'mysql_real_escape_string'? [-Wimplicit-function-declaration]
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| 4646 | sptr+= mysql_real_escape_string_quote(imp_dbh->pmysql, sptr,
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| | mysql_real_escape_string
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| make: *** [Makefile:356: dbdimp.o] Error 1
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| ! Retrying (you can turn off this behavior by --no-retry)
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| Executing /usr/bin/make
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| "/opt/perl/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| cc -c -I/opt/perl/lib/site_perl/5.36.0/x86_64-linux/auto/DBI -I/usr/include/mysql -I/usr/include/mysql/mysql -g -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION="5.001" -DXS_VERSION="5.001" -fPIC "-I/opt/perl/lib/5.36.0/x86_64-linux/CORE" dbdimp.c
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_dr_connect':
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| dbdimp.c:1407:31: error: 'MYSQL_OPT_GET_SERVER_PUBLIC_KEY' undeclared (first use in this function); did you mean 'MYSQL_SERVER_PUBLIC_KEY'?
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| 1407 | mysql_options(sock, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, &server_get_pubkey);
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| | MYSQL_SERVER_PUBLIC_KEY
#8 89.31 2023-10-10T13:27:48,13,DBD-mysql-5.001| dbdimp.c:1407:31: note: each undeclared identifier is reported only once for each function it appears in
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:1464:22: error: 'SSL_MODE_PREFERRED' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 1464 | ssl_mode = SSL_MODE_PREFERRED;
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:1466:26: error: 'SSL_MODE_VERIFY_IDENTITY' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 1466 | ssl_mode = SSL_MODE_VERIFY_IDENTITY;
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:1468:26: error: 'SSL_MODE_VERIFY_CA' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 1468 | ssl_mode = SSL_MODE_VERIFY_CA;
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:1470:26: error: 'SSL_MODE_REQUIRED' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 1470 | ssl_mode = SSL_MODE_REQUIRED;
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:1471:37: error: 'MYSQL_OPT_SSL_MODE' undeclared (first use in this function); did you mean 'MYSQL_OPT_SSL_CRL'?
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 1471 | if (mysql_options(sock, MYSQL_OPT_SSL_MODE, &ssl_mode) != 0) {
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | MYSQL_OPT_SSL_CRL
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:1480:37: error: 'SSL_MODE_DISABLED' undeclared (first use in this function)
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 1480 | unsigned int ssl_mode = SSL_MODE_DISABLED;
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_prepare':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:2407:24: warning: assignment to 'my_bool *' {aka 'char *'} from incompatible pointer type '_Bool *' [-Wincompatible-pointer-types]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 2407 | bind->is_null= &(fbind->is_null);
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_internal_execute41':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:2943:63: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 2943 | "\t<- mysql_internal_execute_41 returning %lu rows\n",
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~^
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 2944 | rows);
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_execute':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:3104:32: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3104 | sprintf(actual_row_num, "%lu", imp_sth->row_num);
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~^ ~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_describe':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:3198:22: warning: assignment to 'my_bool *' {aka 'char *'} from incompatible pointer type '_Bool *' [-Wincompatible-pointer-types]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3198 | buffer->is_null= &(fbh->is_null);
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:3199:20: warning: assignment to 'my_bool *' {aka 'char *'} from incompatible pointer type '_Bool ' [-Wincompatible-pointer-types]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3199 | buffer->error= (bool
) &(fbh->error);
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_fetch':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:3503:63: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3503 | PerlIO_printf(DBIc_LOGPIO(imp_xxh), "\tmysql_num_rows=%lu\n",
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~^
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3504 | mysql_num_rows(imp_sth->result));
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:3505:68: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3505 | PerlIO_printf(DBIc_LOGPIO(imp_xxh), "\tmysql_affected_rows=%lu\n",
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~^
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 3506 | mysql_affected_rows(imp_dbh->pmysql));
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_st_FETCH_attrib':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:4106:60: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'my_ulonglong' {aka 'long long unsigned int'} [-Wformat=]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 4106 | PerlIO_printf(DBIc_LOGPIO(imp_xxh), "INSERT ID %lu\n", imp_sth->insertid);
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ~~^ ~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | | |
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | | my_ulonglong {aka long long unsigned int}
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | long unsigned int
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | %llu
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c: In function 'mysql_db_quote':
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| dbdimp.c:4646:12: warning: implicit declaration of function 'mysql_real_escape_string_quote'; did you mean 'mysql_real_escape_string'? [-Wimplicit-function-declaration]
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| 4646 | sptr+= mysql_real_escape_string_quote(imp_dbh->pmysql, sptr,
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| | mysql_real_escape_string
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| make: *** [Makefile:356: dbdimp.o] Error 1
#8 89.31 2023-10-10T13:27:49,13,DBD-mysql-5.001| Failed to install distribution


Second Case:
OS: MacOS Venture 13.6, Perl 5.34.0
cpm install -g --show-build-log-on-failure DBD::mysql

Running cpm 0.997011 (/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/bin/cpm) on perl 5.34.0 built for darwin-thread-multi-2level (/Users/shingler/Projects/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/bin/perl)
2023-10-10T09:36:31,44166| Command line arguments are: install -g --show-build-log-on-failure DBD::mysql
2023-10-10T09:36:31,44166| Work directory is /Users/shingler/.perl-cpm/work/1696944991.44166
2023-10-10T09:36:31,44166| You have make /usr/bin/make
2023-10-10T09:36:31,44166| You have HTTP::Tiny 0.076
2023-10-10T09:36:31,44166| You have tar /usr/local/bin/gtar (gnu)
2023-10-10T09:36:31,44166| You have unzip /usr/bin/unzip
2023-10-10T09:36:31,44166| --
2023-10-10T09:36:31,44166| Summary of my perl5 (revision 5 version 34 subversion 0) configuration:
2023-10-10T09:36:31,44166|
2023-10-10T09:36:31,44166| Platform:
2023-10-10T09:36:31,44166| osname=darwin
2023-10-10T09:36:31,44166| osvers=20.5.0
2023-10-10T09:36:31,44166| archname=darwin-thread-multi-2level
2023-10-10T09:36:31,44166| uname='darwin shingler-2mbpdu 20.5.0 darwin kernel version 20.5.0: sat may 8 05:10:33 pdt 2021; root:xnu-7195.121.3~9release_x86_64 x86_64 '
2023-10-10T09:36:31,44166| config_args='-de -Dprefix=/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0 -D-A -Dccflags=-fPIC -Duseshrplib -Dusethreads -Aeval:scriptdir=/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/bin'
2023-10-10T09:36:31,44166| hint=recommended
2023-10-10T09:36:31,44166| useposix=true
2023-10-10T09:36:31,44166| d_sigaction=define
2023-10-10T09:36:31,44166| useithreads=define
2023-10-10T09:36:31,44166| usemultiplicity=define
2023-10-10T09:36:31,44166| use64bitint=define
2023-10-10T09:36:31,44166| use64bitall=define
2023-10-10T09:36:31,44166| uselongdouble=undef
2023-10-10T09:36:31,44166| usemymalloc=n
2023-10-10T09:36:31,44166| default_inc_excludes_dot=define
2023-10-10T09:36:31,44166| Compiler:
2023-10-10T09:36:31,44166| cc='cc'
2023-10-10T09:36:31,44166| ccflags ='-fPIC -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV'
2023-10-10T09:36:31,44166| optimize='-O3'
2023-10-10T09:36:31,44166| cppflags='-fPIC -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
2023-10-10T09:36:31,44166| ccversion=''
2023-10-10T09:36:31,44166| gccversion='Apple LLVM 12.0.5 (clang-1205.0.22.11)'
2023-10-10T09:36:31,44166| gccosandvers=''
2023-10-10T09:36:31,44166| intsize=4
2023-10-10T09:36:31,44166| longsize=8
2023-10-10T09:36:31,44166| ptrsize=8
2023-10-10T09:36:31,44166| doublesize=8
2023-10-10T09:36:31,44166| byteorder=12345678
2023-10-10T09:36:31,44166| doublekind=3
2023-10-10T09:36:31,44166| d_longlong=define
2023-10-10T09:36:31,44166| longlongsize=8
2023-10-10T09:36:31,44166| d_longdbl=define
2023-10-10T09:36:31,44166| longdblsize=16
2023-10-10T09:36:31,44166| longdblkind=3
2023-10-10T09:36:31,44166| ivtype='long'
2023-10-10T09:36:31,44166| ivsize=8
2023-10-10T09:36:31,44166| nvtype='double'
2023-10-10T09:36:31,44166| nvsize=8
2023-10-10T09:36:31,44166| Off_t='off_t'
2023-10-10T09:36:31,44166| lseeksize=8
2023-10-10T09:36:31,44166| alignbytes=8
2023-10-10T09:36:31,44166| prototype=define
2023-10-10T09:36:31,44166| Linker and Libraries:
2023-10-10T09:36:31,44166| ld='cc'
2023-10-10T09:36:31,44166| ldflags =' -mmacosx-version-min=11.4 -fstack-protector-strong -L/usr/local/lib'
2023-10-10T09:36:31,44166| libpth=/usr/local/lib /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/lib /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib /Library/Developer/CommandLineTools/usr/lib /usr/lib
2023-10-10T09:36:31,44166| libs=
2023-10-10T09:36:31,44166| perllibs=
2023-10-10T09:36:31,44166| libc=
2023-10-10T09:36:31,44166| so=dylib
2023-10-10T09:36:31,44166| useshrplib=true
2023-10-10T09:36:31,44166| libperl=libperl.dylib
2023-10-10T09:36:31,44166| gnulibc_version=''
2023-10-10T09:36:31,44166| Dynamic Linking:
2023-10-10T09:36:31,44166| dlsrc=dl_dlopen.xs
2023-10-10T09:36:31,44166| dlext=bundle
2023-10-10T09:36:31,44166| d_dlsymun=undef
2023-10-10T09:36:31,44166| ccdlflags=' '
2023-10-10T09:36:31,44166| cccdlflags=' '
2023-10-10T09:36:31,44166| lddlflags=' -mmacosx-version-min=11.4 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong'
2023-10-10T09:36:31,44166| Characteristics of this binary (from libperl):
2023-10-10T09:36:31,44166| Compile-time options:
2023-10-10T09:36:31,44166| HAS_TIMES
2023-10-10T09:36:31,44166| MULTIPLICITY
2023-10-10T09:36:31,44166| PERLIO_LAYERS
2023-10-10T09:36:31,44166| PERL_COPY_ON_WRITE
2023-10-10T09:36:31,44166| PERL_DONT_CREATE_GVSV
2023-10-10T09:36:31,44166| PERL_IMPLICIT_CONTEXT
2023-10-10T09:36:31,44166| PERL_MALLOC_WRAP
2023-10-10T09:36:31,44166| PERL_OP_PARENT
2023-10-10T09:36:31,44166| PERL_PRESERVE_IVUV
2023-10-10T09:36:31,44166| PERL_USE_SAFE_PUTENV
2023-10-10T09:36:31,44166| USE_64_BIT_ALL
2023-10-10T09:36:31,44166| USE_64_BIT_INT
2023-10-10T09:36:31,44166| USE_ITHREADS
2023-10-10T09:36:31,44166| USE_LARGE_FILES
2023-10-10T09:36:31,44166| USE_LOCALE
2023-10-10T09:36:31,44166| USE_LOCALE_COLLATE
2023-10-10T09:36:31,44166| USE_LOCALE_CTYPE
2023-10-10T09:36:31,44166| USE_LOCALE_NUMERIC
2023-10-10T09:36:31,44166| USE_LOCALE_TIME
2023-10-10T09:36:31,44166| USE_PERLIO
2023-10-10T09:36:31,44166| USE_PERL_ATOF
2023-10-10T09:36:31,44166| USE_REENTRANT_API
2023-10-10T09:36:31,44166| USE_THREAD_SAFE_LOCALE
2023-10-10T09:36:31,44166| Built under darwin
2023-10-10T09:36:31,44166| Compiled at Jun 30 2021 10:41:14
2023-10-10T09:36:31,44166| %ENV:
2023-10-10T09:36:31,44166| PERLBREW_HOME="/Users/shingler/.perlbrew"
2023-10-10T09:36:31,44166| PERLBREW_MANPATH="/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/man"
2023-10-10T09:36:31,44166| PERLBREW_PATH="/prod/dependencies/perl5/perlbrew/bin:/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/bin"
2023-10-10T09:36:31,44166| PERLBREW_PERL="perl-5.34.0"
2023-10-10T09:36:31,44166| PERLBREW_ROOT="/prod/dependencies/perl5/perlbrew"
2023-10-10T09:36:31,44166| PERLBREW_SHELLRC_VERSION="0.98"
2023-10-10T09:36:31,44166| PERLBREW_VERSION="0.98"
2023-10-10T09:36:31,44166| PERL_VERSION_MANAGER_DISTRIBUTION_ID="perl-5.34.0"
2023-10-10T09:36:31,44166| PERL_VERSION_MANAGER_PATH="/prod/dependencies/perl5/perlbrew/bin/perlbrew"
2023-10-10T09:36:31,44166| @inc:
2023-10-10T09:36:31,44166| /prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0/darwin-thread-multi-2level
2023-10-10T09:36:31,44166| /prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/lib/site_perl/5.34.0
2023-10-10T09:36:31,44166| /prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-thread-multi-2level
2023-10-10T09:36:31,44166| /prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0
2023-10-10T09:36:31,44166| --
2023-10-10T09:36:31,44172,DBD::mysql| Resolved DBD::mysql (0) -> https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-5.001.tar.gz from MetaDB
2023-10-10T09:36:31,44172,DBD-mysql-5.001| Using cache /Users/shingler/.perl-cpm/cache/authors/id/D/DV/DVEEDEN/DBD-mysql-5.001.tar.gz
2023-10-10T09:36:31,44172,DBD-mysql-5.001| Unpacking DBD-mysql-5.001.tar.gz
2023-10-10T09:36:31,44172,DBD-mysql-5.001| Configuring distribution
2023-10-10T09:36:31,44172,DBD-mysql-5.001| Executing /Users/shingler/Projects/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/bin/perl Makefile.PL
2023-10-10T09:36:32,44172,DBD-mysql-5.001| PLEASE NOTE:
2023-10-10T09:36:32,44172,DBD-mysql-5.001| For 'make test' to run properly, you must ensure that the
2023-10-10T09:36:32,44172,DBD-mysql-5.001| database user 'shingler' can connect to your MySQL server
2023-10-10T09:36:32,44172,DBD-mysql-5.001| and has the proper privileges that these tests require such
2023-10-10T09:36:32,44172,DBD-mysql-5.001| as 'drop table', 'create table', 'drop procedure', 'create procedure'
2023-10-10T09:36:32,44172,DBD-mysql-5.001| as well as others.
2023-10-10T09:36:32,44172,DBD-mysql-5.001| mysql> CREATE USER 'shingler'@'localhost' IDENTIFIED BY 's3kr1t';
2023-10-10T09:36:32,44172,DBD-mysql-5.001| mysql> GRANT ALL PRIVILEGES ON test.* TO 'shingler'@'localhost';
2023-10-10T09:36:32,44172,DBD-mysql-5.001| You can also optionally set the user to run 'make test' with:
2023-10-10T09:36:32,44172,DBD-mysql-5.001| perl Makefile.PL --testuser=username
2023-10-10T09:36:32,44172,DBD-mysql-5.001| I will use the following settings for compiling and testing:
2023-10-10T09:36:32,44172,DBD-mysql-5.001| cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.33_3/include/mysql
2023-10-10T09:36:32,44172,DBD-mysql-5.001| ldflags (mysql_config) =
2023-10-10T09:36:32,44172,DBD-mysql-5.001| libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.33_3/lib -lmysqlclient -lz -lzstd -L/usr/local/lib -lssl -lcrypto -lresolv
2023-10-10T09:36:32,44172,DBD-mysql-5.001| mysql_config (guessed ) = mysql_config
2023-10-10T09:36:32,44172,DBD-mysql-5.001| nocatchstderr (default ) = 0
2023-10-10T09:36:32,44172,DBD-mysql-5.001| nofoundrows (default ) = 0
2023-10-10T09:36:32,44172,DBD-mysql-5.001| testdb (default ) = test
2023-10-10T09:36:32,44172,DBD-mysql-5.001| testhost (default ) =
2023-10-10T09:36:32,44172,DBD-mysql-5.001| testpassword (default ) =
2023-10-10T09:36:32,44172,DBD-mysql-5.001| testport (default ) =
2023-10-10T09:36:32,44172,DBD-mysql-5.001| testsocket (default ) =
2023-10-10T09:36:32,44172,DBD-mysql-5.001| testuser (guessed ) = shingler
2023-10-10T09:36:32,44172,DBD-mysql-5.001| To change these settings, see 'perl Makefile.PL --help' and
2023-10-10T09:36:32,44172,DBD-mysql-5.001| 'perldoc DBD::mysql::INSTALL'.
2023-10-10T09:36:32,44172,DBD-mysql-5.001| Checking if libs are available for compiling...
2023-10-10T09:36:34,44172,DBD-mysql-5.001| Can't link/include C library 'ssl', 'crypto', aborting.
2023-10-10T09:36:34,44172,DBD-mysql-5.001| ! Retrying (you can turn off this behavior by --no-retry)
2023-10-10T09:36:34,44172,DBD-mysql-5.001| Executing /Users/shingler/Projects/prod/dependencies/perl5/perlbrew/perls/perl-5.34.0/bin/perl Makefile.PL
2023-10-10T09:36:34,44172,DBD-mysql-5.001| PLEASE NOTE:
2023-10-10T09:36:34,44172,DBD-mysql-5.001| For 'make test' to run properly, you must ensure that the
2023-10-10T09:36:34,44172,DBD-mysql-5.001| database user 'shingler' can connect to your MySQL server
2023-10-10T09:36:34,44172,DBD-mysql-5.001| and has the proper privileges that these tests require such
2023-10-10T09:36:34,44172,DBD-mysql-5.001| as 'drop table', 'create table', 'drop procedure', 'create procedure'
2023-10-10T09:36:34,44172,DBD-mysql-5.001| as well as others.
2023-10-10T09:36:34,44172,DBD-mysql-5.001| mysql> CREATE USER 'shingler'@'localhost' IDENTIFIED BY 's3kr1t';
2023-10-10T09:36:34,44172,DBD-mysql-5.001| mysql> GRANT ALL PRIVILEGES ON test.* TO 'shingler'@'localhost';
2023-10-10T09:36:34,44172,DBD-mysql-5.001| You can also optionally set the user to run 'make test' with:
2023-10-10T09:36:34,44172,DBD-mysql-5.001| perl Makefile.PL --testuser=username
2023-10-10T09:36:34,44172,DBD-mysql-5.001| I will use the following settings for compiling and testing:
2023-10-10T09:36:34,44172,DBD-mysql-5.001| cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.33_3/include/mysql
2023-10-10T09:36:34,44172,DBD-mysql-5.001| ldflags (mysql_config) =
2023-10-10T09:36:34,44172,DBD-mysql-5.001| libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.33_3/lib -lmysqlclient -lz -lzstd -L/usr/local/lib -lssl -lcrypto -lresolv
2023-10-10T09:36:34,44172,DBD-mysql-5.001| mysql_config (guessed ) = mysql_config
2023-10-10T09:36:34,44172,DBD-mysql-5.001| nocatchstderr (default ) = 0
2023-10-10T09:36:34,44172,DBD-mysql-5.001| nofoundrows (default ) = 0
2023-10-10T09:36:34,44172,DBD-mysql-5.001| testdb (default ) = test
2023-10-10T09:36:34,44172,DBD-mysql-5.001| testhost (default ) =
2023-10-10T09:36:34,44172,DBD-mysql-5.001| testpassword (default ) =
2023-10-10T09:36:34,44172,DBD-mysql-5.001| testport (default ) =
2023-10-10T09:36:34,44172,DBD-mysql-5.001| testsocket (default ) =
2023-10-10T09:36:34,44172,DBD-mysql-5.001| testuser (guessed ) = shingler
2023-10-10T09:36:34,44172,DBD-mysql-5.001| To change these settings, see 'perl Makefile.PL --help' and
2023-10-10T09:36:34,44172,DBD-mysql-5.001| 'perldoc DBD::mysql::INSTALL'.
2023-10-10T09:36:34,44172,DBD-mysql-5.001| Checking if libs are available for compiling...
2023-10-10T09:36:36,44172,DBD-mysql-5.001| Can't link/include C library 'ssl', 'crypto', aborting.
2023-10-10T09:36:36,44172,DBD-mysql-5.001| Failed to configure distribution
2023-10-10T09:36:36,44166| --
2023-10-10T09:36:36,44166| Installation failed. The direct cause of the failure comes from the following packages/distributions; you may want to grep this log file by them:
2023-10-10T09:36:36,44166| * DBD-mysql-5.001

@dveeden
Copy link
Collaborator

dveeden commented Oct 13, 2023

@rshingleton Looks like you're not using MySQL 8.x client libraries, which are required.

Could you try again with the right client libraries installed?

@dveeden dveeden closed this as completed Oct 24, 2023
@level420
Copy link

@dveeden Is it really strictly MySQL 8.x and compiling against mariadb client libraries is not supported anymore?
I'm getting this on cpan install DBD::mysql after installing apt install default-libmysqld-dev:

DBD::mysql requires MySQL 8.x for building. Version reported by mysql_config --version: 10.5.21 at Makefile.PL line 450, <PIPE> line 3.

Done on current official perl 5.38 docker image perl:5.38-threaded-bullseye.

@dveeden
Copy link
Collaborator

dveeden commented Oct 25, 2023

@level420 Yes, DBD::mysql really needs MySQL 8.0 client libraries. The resulting DBD::mysql can still connect to MySQL 5.7, MariaDB and other databases that implement the MySQL protocol.

The reason for doing this is that is needed to simplify the code. For example MySQL uses mysql_options() and mysql_options4() while MariaDB has mysql_optionsv(). This increases the number of #ifdef's in the code.

Besides removing support for MariaDB, support for older MySQL versions were also removed for the same reason.

Note that I don't have anything against MariaDB, it's a great database. But the two are just moving in their own direction which makes compatibility harder.

Note that you can use DBD::mysql v4.x if you want to use the MariaDB client libraries. Just note that the v4.x branch will only get critical updates.

Note that the docker image you mention is based on Debian. In Debian sid there is libmysqlclient-dev that is the real MySQL 8.x client library. And then there is libmariadb-dev that's the MariaDB client library. Note that Oracle has an apt repository for MySQL 8.x as well.

@level420
Copy link

@dveeden thank you for clarifying. I'll try to build now DBD:mysql with libmysqlclient-dev and will also add DBD::mariadb to my "all purpose" perl docker image.

@level420
Copy link

@dveeden as libmysqlclient-dev is the official perl docker images is only available with current stable debian bookworm, and the library libmysqlclient-dev is only available in unstable debian sid, I'm currently stick with installing cpanm DBD::mysql@4.050. This may help others installing in similar environments.

@rshingleton
Copy link
Author

I'm in a similar scenario as @level420. I am adding this as a dependency to a docker container where the current mysql client libraries are < 8.0. I've similarly just locked my dependency at DBD::mysql@4.050 until the issue is resolved in DBD::mysql or updated client libraries are available in the distro that I'm using.

@dveeden
Copy link
Collaborator

dveeden commented Oct 27, 2023

You could use the MySQL APT Repository. However using v4.051 until there is a stable version of Debian that ships with MySQL 8.x libraries also seems fine to me.

FROM debian:bookworm

# Install dependencies
RUN apt update
RUN apt install -y lsb-release wget gnupg git make libdbi-perl libdevel-checklib-perl libtest-deep-perl libssl-dev

# Add APT repo for MySQL
ADD https://dev.mysql.com/get/mysql-apt-config_0.8.28-1_all.deb mysql-apt-config_0.8.28-1_all.deb
RUN DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config_0.8.28-1_all.deb
RUN apt update

# Install MySQL 8.0 libs
RUN apt install -y libmysqlclient-dev libmysqlclient21

# Build DBD::mysql
RUN git clone https://github.com/perl5-dbi/DBD-mysql.git
WORKDIR DBD-mysql
RUN perl Makefile.PL
RUN make install

# Demo
RUN perl -MDBD::mysql -e 'print "Hello from DBD::mysql " . $DBD::mysql::VERSION . "\n"'

While this uses a git repo you could also use cpanm or any other way of building this.

@rshingleton
Copy link
Author

Yeah... Adding external repos is not an option for some people, especially those working in corporate environments where images are locked down unfortunately. This update will have to wait until those libraries are more widely available.

@dveeden
Copy link
Collaborator

dveeden commented Nov 2, 2023

Yeah... Adding external repos is not an option for some people, especially those working in corporate environments where images are locked down unfortunately. This update will have to wait until those libraries are more widely available.

That's why there is a v4 branch that can be used in these situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants