-
Notifications
You must be signed in to change notification settings - Fork 73
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
compile failed on 5.001 on undeclared MYSQL_OPT_GET_SERVER_PUBLIC_KEY #361
Comments
I see the same error running under Debain with the package mysql-default-client installed, https://packages.debian.org/bookworm/default-mysql-client . The default mysql client is actually the MariaDB client. See also RotherOSS/otobo#2548 . |
Same issue here with OpenIndiana and MariaDB 10.6. |
The issue here is that DBD::mysql v5.x requires MySQL 8.x client libraries for building. |
@dveeden, does it mean that DBD::mysql won't compile/work with MariaDB? |
This only means that DBD::mysql will need MySQL 8.x to build. If you want to build against MariaDB, then I would suggest using DBD::MariaDB. This is done to remove complexity to make it easier to maintain and test. |
I see. Thanks for explanation. |
@dveeden, I do get the point about making DBD::mysql easier to maintain. But it is confusing. I use DBD::mysql on Debian based Docker images where the package default-mysql-client is installed. It is not intuitive, at least to me, that DBD::mysql can't be installed in that environment. But of course it is your call, and I can install the mysql 8 packages if that is the design decision. |
or, you could use https://metacpan.org/release/DVEEDEN/DBD-mysql-4.051 |
I agree that this is confusing. But the truth is that MySQL and MariaDB are not the same. Both are fine databases but each have added many new features that are not fully compatible. When MariaDB forked from MySQL it was a drop in replacement, but that's no longer the case. And that is what Linux distros e.d. have to adjust to. There are multiple options:
|
the check for
#ifdef MYSQL_OPT_GET_SERVER_PUBLIC_KEY
...
#endif
is removed in dbdimp.c (from 4.0.51)
which causes an compile error using mysqllib 50716
c:\perl\cpan\build\DBD-mysql-5.001>gmake
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/DBD/mysql.pm blib\lib\DBD\mysql.pm
cp lib/Bundle/DBD/mysql.pm blib\lib\Bundle\DBD\mysql.pm
Running Mkbootstrap for mysql ()
"C:\perl\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "mysql.bs"
"C:\perl\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- mysql.bs blib\arch\auto\DBD\mysql\mysql.bs 644
gcc -c -IC:\perl\perl\vendor\lib\auto\DBI -Ic:\perl\c\bin..\include\mysql50716 -g -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os -DVERSION="5.001" -DXS_VERSION="5.001" "-IC:\perl\perl\lib\CORE" dbdimp.c
dbdimp.c: In function 'mysql_dr_connect':
dbdimp.c:1407:31: error: 'MYSQL_OPT_GET_SERVER_PUBLIC_KEY' undeclared (first use in this function); did you mean 'MYSQL_SERVER_PUBLIC_KEY'?
mysql_options(sock, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, &server_get_pubkey);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MYSQL_SERVER_PUBLIC_KEY
dbdimp.c:1407:31: note: each undeclared identifier is reported only once for each function it appears in
....
changing the dbdimp.c to
solves the problem
I know: "..... always use the latest mysql version .....",
but this is not quickly possible on every system (e.g. Windows + Strawberry Perl 5.38)
It would be nice, if the two lines can come back in the next version
Thank you!
The text was updated successfully, but these errors were encountered: