In DBD-mysql src code tree, Makefile.PL:104-145: 104 #Disable of building of dbd::mysqlEmb driver by default 105 $opt->{'embedded'}="" if !$opt->{'force-embedded'}; 106 107 if ($opt->{'embedded'}) 108 { 109 if ($source->{'embedded'} eq 'mysql_config') 110 { 111 #We have to use libmygcc to resolve linking problem 112 # this causes problems for cygwin 113 #$opt->{'embedded'} .= " -lmygcc"; 114 # Under Cygwin (at least) we have to use libstdc++ to resolve linking 115 # problem because libmysqld is built using g++ rather than gcc. 116 $opt->{'embedded'} .= " -lstdc++"; 117 } 118 119 my @files = ($^O =~ /mswin32/i) ? qw(mysqlclient.lib) : 120 qw(libmysqld.a); 121 122 my @dirs = $opt->{'embedded'} =~ /-L(.*?)(?:\s|$)/g; 123 124 if( !(SearchFor('lib', @files)) && !(SearchFor2(\@files,\@dirs)) ) 125 { 126 warn <<"MSG"; 127 128 You intended to build DBD::mysqlEmb driver by using option: 129 --embedded=$opt->{'embedded'}. 130 But we failed to determine directory of @files. Building of DBD::mysqlEmb 131 driver was disabled. 132 133 Please use 134 135 perl Makefile.PL --embedded="-L<dir> <flags>" 136 137 to set correct directory. For details see DBD::mysql::INSTALL, 138 section "Linker flags" or type 139 140 perl Makefile.PL --help 141 MSG 142 $source->{'embedded'} = "guessed"; 143 $opt->{'embedded'}=""; 144 } 145 } It will try to find libmysqld.a in non-win32 system (Line 120). If that file not exists, DBD:mysqlEmb driver will still not be built, acting like USE="embedded" not selected. I'm using dev-db/mariadb-10.0.27 , libmysqld.a will be built only if USE="embedded" and USE="static-libs" are both set. By briefly watching ebuild dependencies, I found dev-perl/DBD-mysql-4.32.0-r2 has both DEPEND and RDEPEND of "embedded? virtual/mysql[embedded])", virtual/mysql-5.6-r6 has RDEPEND="embedded? (=dev-db/mariadb-10.0*[embedded])". That's not enough. Also, virtual/mysql controls specific DB software USE=static only. USE=static-libs is passed to virtual/libmysqlclient and then controls USE=static-libs of specific DB software. But in fact, virtual/libmysqlclient[static-libs] made not only libmysqlclient.a but also libmysqld.a . It seems oddly. Not tested: 1. I'm using mariadb, I don't know if any other mysql implementation has the same behavior (libmysqld.a requires USE=static-libs). 2. >dev-perl/DBD-mysql-4.32.0-r2 Possible solutions: 1. Give dev-perl/DBD-mysql a DEPEND(not RDEPEND due to statically linking) of "embedded? (virtual/mysql[static-libs])" or 2. (Recommended) Give virtual/mysql a DEPEND line like "embedded? (=dev-db/mariadb-10.0*[static-libs])". This seems to be semantically correct since libmysqld.a controlled by virtual/libmysqlclient is really odd. And We can control this only applied to mariadb if other DB implementation behavior unknown (Minimum changes). Reproducible: Always
Forgot to say, solution 2 may influence all packages depends virtual/mysql[embedded] not only DBD-mysql, therefore not prefect, either. :'(
This is likely going to be resolved by removing embedded support.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d845674dece9cded838f4184eeeaf33fea0a0ae commit 0d845674dece9cded838f4184eeeaf33fea0a0ae Author: Kent Fredric <kentnl@gentoo.org> AuthorDate: 2018-01-24 04:33:33 +0000 Commit: Kent Fredric <kentnl@gentoo.org> CommitDate: 2018-01-24 04:40:44 +0000 dev-perl/DBD-mysql: Bump to version 4.44.0 - Remove embedded support - https://bugs.gentoo.org/644174 - https://bugs.gentoo.org/598048 - removal from older versions may happen later Upstream: - Fix for CVE-2017-10788 ( https://bugs.gentoo.org/623632 ) - Fix for CVE-2017-10789 ( https://bugs.gentoo.org/623942 ) - Enforce SSL settings for BACKRONYM and Riddle - Fix parsing of mysql_config --libs output in Configure - Return INTs with ZEROFILL as strings - Some fixes for 5.26-dot-in-inc Bug: https://bugs.gentoo.org/598048 Bug: https://bugs.gentoo.org/623632 Bug: https://bugs.gentoo.org/623942 Bug: https://bugs.gentoo.org/644174 Package-Manager: Portage-2.3.18, Repoman-2.3.6 dev-perl/DBD-mysql/DBD-mysql-4.44.0.ebuild | 64 +++++++++ dev-perl/DBD-mysql/Manifest | 1 + .../DBD-mysql-4.044-amvis-type-conversions.patch | 56 ++++++++ .../files/DBD-mysql-4.044-no-dot-inc.patch | 151 +++++++++++++++++++++ 4 files changed, 272 insertions(+)}
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b12f7b3b83729b4a144883996e628889c8a2df78 commit b12f7b3b83729b4a144883996e628889c8a2df78 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2019-10-09 21:48:21 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2019-10-09 21:49:01 +0000 dev-perl/DBD-mysql: Drop old, vulnerable and masked versions. Also drops embedded useflag support. Closes: https://bugs.gentoo.org/634192 Closes: https://bugs.gentoo.org/598048 Closes: https://bugs.gentoo.org/644174 Closes: https://bugs.gentoo.org/598060 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> dev-perl/DBD-mysql/DBD-mysql-4.32.0-r2.ebuild | 49 ------ dev-perl/DBD-mysql/DBD-mysql-4.37.0.ebuild | 68 -------- dev-perl/DBD-mysql/DBD-mysql-4.41.0-r2.ebuild | 69 -------- dev-perl/DBD-mysql/DBD-mysql-4.41.0.ebuild | 65 -------- dev-perl/DBD-mysql/DBD-mysql-4.42.0.ebuild | 66 -------- dev-perl/DBD-mysql/Manifest | 4 - .../files/4.041-amvis-type-conversions.patch | 47 ------ dev-perl/DBD-mysql/files/4.041-no-dot-inc.patch | 103 ------------ dev-perl/DBD-mysql/files/4.042-no-dot-inc.patch | 178 --------------------- .../files/DBD-mysql-print_embedded_options.patch | 20 --- dev-perl/DBD-mysql/metadata.xml | 1 - 11 files changed, 670 deletions(-)