Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915511 - dev-perl/DBD-mysql-5.1.0:dbdimp.c:1407:31: error: ‘MYSQL_OPT_GET_SERVER_PUBLIC_KEY’ undeclared and more "undeclared" errors
Summary: dev-perl/DBD-mysql-5.1.0:dbdimp.c:1407:31: error: ‘MYSQL_OPT_GET_SERVER_PUBLI...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 919865
Blocks: 921000
  Show dependency tree
 
Reported: 2023-10-10 05:51 UTC by David Kredba
Modified: 2024-02-21 01:20 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log file (build.log,18.27 KB, text/plain)
2023-10-10 05:52 UTC, David Kredba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kredba 2023-10-10 05:51:32 UTC
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’?
1407 |           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
dbdimp.c:1464:22: error: ‘SSL_MODE_PREFERRED’ undeclared (first use in this function)
1464 |           ssl_mode = SSL_MODE_PREFERRED;
|                      ^~~~~~~~~~~~~~~~~~
./mysql.xsi: In function ‘XS_DBD__mysql__db_selectrow_arrayref’:
./mysql.xsi:234:9: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
234 |         if (GIMME == G_SCALAR)
|         ^~
In file included from /usr/lib64/perl5/5.38/x86_64-linux-thread-multi/CORE/perl.h:6190,
from /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/DBI/DBIXS.h:23,
from dbdimp.h:20,
from mysql.xs:12:
/usr/lib64/perl5/5.38/x86_64-linux-thread-multi/CORE/proto.h:1019:1: note: declared here
1019 | Perl_dowantarray(pTHX)
| ^~~~~~~~~~~~~~~~
./mysql.xsi:240:9: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
240 |         if (GIMME == G_SCALAR)
|         ^~
/usr/lib64/perl5/5.38/x86_64-linux-thread-multi/CORE/proto.h:1019:1: note: declared here
1019 | Perl_dowantarray(pTHX)
| ^~~~~~~~~~~~~~~~
mysql.xs: In function ‘XS_DBD__mysql__st_rows’:
mysql.xs:658:18: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘my_ulonglong’ {aka ‘long long unsigned int’} [-Wformat=]
658 |     sprintf(buf, "%lu", imp_sth->row_num);
|                  ^~~~~  ~~~~~~~~~~~~~~~~
|                                |
|                                my_ulonglong {aka long long unsigned int}
dbdimp.c:1466:26: error: ‘SSL_MODE_VERIFY_IDENTITY’ undeclared (first use in this function)
1466 |               ssl_mode = SSL_MODE_VERIFY_IDENTITY;
|                          ^~~~~~~~~~~~~~~~~~~~~~~~
dbdimp.c:1468:26: error: ‘SSL_MODE_VERIFY_CA’ undeclared (first use in this function)
1468 |               ssl_mode = SSL_MODE_VERIFY_CA;
|                          ^~~~~~~~~~~~~~~~~~
dbdimp.c:1470:26: error: ‘SSL_MODE_REQUIRED’ undeclared (first use in this function)
1470 |               ssl_mode = SSL_MODE_REQUIRED;
|                          ^~~~~~~~~~~~~~~~~
dbdimp.c:1471:37: error: ‘MYSQL_OPT_SSL_MODE’ undeclared (first use in this function); did you mean ‘MYSQL_OPT_SSL_CRL’?
1471 |             if (mysql_options(sock, MYSQL_OPT_SSL_MODE, &ssl_mode) != 0) {
|                                     ^~~~~~~~~~~~~~~~~~
|                                     MYSQL_OPT_SSL_CRL
dbdimp.c:1480:37: error: ‘SSL_MODE_DISABLED’ undeclared (first use in this function)
1480 |             unsigned int ssl_mode = SSL_MODE_DISABLED;



emerge --info dev-perl/DBD-mysql
Portage 3.0.52 (python 3.11.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-13, glibc-2.38-r5, 6.5.6-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-6.5.6-gentoo-x86_64-AMD_Ryzen_7_3800X_8-Core_Processor-with-glibc2.38
KiB Mem:    65753968 total,  38870028 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 10 Oct 2023 04:15:01 +0000
Head commit of repository gentoo: 9cec3b1bb178f8585444367c7ddcfc913cee4d2b
Timestamp of repository palemoon: Thu, 05 Oct 2023 11:22:29 +0000
Head commit of repository palemoon: fd2d7f46b6f3431f420d17585f1716a9c57a162e

Timestamp of repository pf4public: Tue, 10 Oct 2023 02:31:53 +0000
Head commit of repository pf4public: 1468f5c0f7381043fb76fa6864e96b406427e1fe

sh bash 5.2_p15-r6
ld GNU ld (Gentoo 2.41 p2) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           2.7.18_p16-r1::gentoo, 3.11.6::gentoo
dev-lang/rust-bin:         1.73.0::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.2-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.50-r1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.2::gentoo
sys-devel/gcc:             13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo, 17.0.2::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.2-r1::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.5-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r5::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
priority: -1000
volatile: True
sync-rsync-verify-max-age: 24
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
sync-rsync-verify-metamanifest: no

palemoon
location: /var/db/repos/palemoon
sync-type: git
sync-uri: https://github.com/gentoo-mirror/palemoon.git
masters: gentoo
volatile: False

pf4public
location: /var/db/repos/pf4public
sync-type: git
sync-uri: https://github.com/gentoo-mirror/pf4public.git
masters: gentoo
volatile: False

x-portage
location: /usr/local/portage
masters: gentoo
priority: 0
volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -ggdb3 -pipe -march=znver2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -ggdb3 -pipe -march=znver2"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -ggdb3 -pipe -march=znver2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -ggdb3 -pipe -march=znver2"
GENTOO_MIRRORS="http://tux.rainside.sk/gentoo/ ftp://gentoo.mirror.web4u.cz/ https://mirror.leaseweb.com/gentoo/"
LANG="cs_CZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="cs en"
MAKEOPTS="-j9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180--exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl alsa amd64 blas bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli colord crypt cups dbus declarative djvu dri dts dv dvb dvd dvdr elogind encode exif ffmpeg fftw flac fontconfig fortran gdbm geoip gif gmp gnuplot graphviz gsl gsm hdf5 heif iconv idn imagemagick imlib ipv6 ithreads jbig jpeg jpeg2k kde ladspa lame lapack latex lcms libass libsamplerate libtirpc lzma lzo mad matroska mms mng modplug mp3 mp4 mpeg mtp musepack musicbrainz ncurses nls nptl ogg opencl openexr opengl openmp pam pcre pdf plotutils png postscript pulseaudio qt5 qt6 quicktime rdp readline seccomp semantic-desktop slang smp sndfile sox speex spell split-usr ssl svg szip taglib test-rust theora threads tiff truetype udev unicode usb v4l vorbis wavpack wayland webp x264 xattr xcb xft xml xpm xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avxavx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="cs en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="scripting-beanshell scripting-javascript nlpsolver" LLVM_TARGETS="AMDGPU BPF X86" LUA_SINGLE_TARGET="lua5-3" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1 php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" SANE_BACKENDS="lexmark net" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
Package Settings
=================================================================

dev-perl/DBD-mysql-4.50.0-r1::gentoo was built with the following:
USE="mariadb ssl -mysql -test"
FEATURES="qa-unresolved-soname-deps usersync xattr parallel-fetch news binpkg-dostrip network-sandbox userfetch config-protect-if-modified unmerge-orphans sandbox splitdebug compressdebug protect-owned preserve-libs pid-sandbox unknown-features-warn strict fixlafiles binpkg-docompress unmerge-logs multilib-strict binpkg-multi-instance ebuild-locks userpriv assume-digests binpkg-logs sfperms distlocks usersandbox ipc-sandbox merge-sync buildpkg-live"
Comment 1 David Kredba 2023-10-10 05:52:18 UTC
Created attachment 872443 [details]
build.log file
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-10 05:54:33 UTC
meh. According to https://github.com/perl5-dbi/DBD-mysql/issues/361, it needs to be built against MySQL always now, even if it doesn't connect to MySQL (can still connect to MariaDB).
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-10-10 15:57:19 UTC
So dev-db/mariadb[perl] requires dev-perl/DBD-mysql which will now require mysql… surely, makes lots of sense.
Comment 4 Phil Stracchino (Unix Ronin) 2023-10-10 17:03:16 UTC
(In reply to Sam James from comment #2)
> meh. According to https://github.com/perl5-dbi/DBD-mysql/issues/361, it
> needs to be built against MySQL always now, even if it doesn't connect to
> MySQL (can still connect to MariaDB).

So this is more fallout from the [ill-advised IMO] fragmenting of MySQL, and the real answer here is that there now needs to be a DBD::mariadb separate from DBD::mysql.
Comment 5 Phil Stracchino (Unix Ronin) 2023-10-10 17:05:14 UTC
(In reply to Phil Stracchino (Unix Ronin) from comment #4)
> (In reply to Sam James from comment #2)
> > meh. According to https://github.com/perl5-dbi/DBD-mysql/issues/361, it
> > needs to be built against MySQL always now, even if it doesn't connect to
> > MySQL (can still connect to MariaDB).
> 
> So this is more fallout from the [ill-advised IMO] fragmenting of MySQL, and
> the real answer here is that there now needs to be a DBD::mariadb separate
> from DBD::mysql.

Never mind, I take that back; I see there is ALREADY a DBD::MariaDB
Comment 6 Phil Stracchino (Unix Ronin) 2023-10-10 17:12:23 UTC
(In reply to Phil Stracchino (Unix Ronin) from comment #5)
> > 
> > So this is more fallout from the [ill-advised IMO] fragmenting of MySQL, and
> > the real answer here is that there now needs to be a DBD::mariadb separate
> > from DBD::mysql.
> 
> Never mind, I take that back; I see there is ALREADY a DBD::MariaDB

And yet dev-db/mariadb depends on dev-perl/DBD-mysql and NOT on dev-perl/DBD-MariaDB

So the dependencies for dev-db/mariadb probably need to be changed as well.

dev-db/percona-toolkit is a bit of a problem because it ALSO depends on dev-perl/DBD-mysql and NOT on dev-perl/DBD-MariaDB, but may well be used on a system with mariadb installed and not MySQL.

So is what we really need here some kind of virtual package that dev-db/percona-toolkit can depend upon?  Or is the correct approach a USE [mysql|mariadb] in dev-db/percona-toolkit?
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2023-10-26 20:29:26 UTC
We should probably migrate as much as possible to DBD::MariaDB since that also supports mysql. 

That said, still needs some research on the involved reverse deps. Stay tuned.
Comment 8 Conrad Kostecki gentoo-dev 2023-12-10 02:17:40 UTC
(In reply to Andreas K. Hüttel from comment #7)
> We should probably migrate as much as possible to DBD::MariaDB since that
> also supports mysql. 
> 
> That said, still needs some research on the involved reverse deps. Stay
> tuned.

Any news on this?
Comment 9 Larry the Git Cow gentoo-dev 2023-12-14 06:43:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=775705089b3681b09f7f37f1d209481d8b57f10d

commit 775705089b3681b09f7f37f1d209481d8b57f10d
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2023-12-14 01:46:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-14 06:43:18 +0000

    dev-db/mariadb: switch to dev-perl/DBD-MariaDB
    
    https://github.com/MariaDB/server/commit/5cc2096f93b7f130b36f8bc0fc43440db9a848e4
    
    Bug: https://bugs.gentoo.org/915511
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/34276
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/mariadb/mariadb-10.11.5-r1.ebuild | 1318 +++++++++++++++++++++++++++++
 dev-db/mariadb/mariadb-10.6.15-r1.ebuild | 1329 ++++++++++++++++++++++++++++++
 2 files changed, 2647 insertions(+)
Comment 10 Conrad Kostecki gentoo-dev 2023-12-14 12:11:51 UTC
@sam: What about handling within packages? Don't they need to be adjusted as well?

For example squid-6.5 has: mysql? ( dev-perl/DBD-mysql ).
Comment 11 Alfred Wingate 2023-12-14 12:22:26 UTC
MariaDB was special in this case as it had support for DBD-MariaDB already, other packages aren't as fortunate and would require patching.

https://github.com/bugzilla/bugzilla/pull/142#pullrequestreview-1616149102

bugzilla atleast has had some talk about using it instead.