Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 375083

Summary: ERROR: dev-perl/DBD-mysql-4.19.0 failed, mysql.h not found
Product: Gentoo Linux Reporter: Nikolaos Chatzidakis <nikhatzi>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mysql-bugs, rose, tetromino, zeekec
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nikolaos Chatzidakis 2011-07-13 12:09:25 UTC
After updating my system today, a newer mysql version was emerged (dev-db/mysql-5.1.58). After emerging the new packages, i had some preserved libraries:

!!! existing preserved libs:
>>> package: dev-db/mysql-5.1.58
 *  - /usr/lib64/mysql/libmysqlclient.so.16
 *  - /usr/lib64/mysql/libmysqlclient.so.16.0.0
 *      used by /usr/bin/mysql (dev-db/mysql-5.1.58)
 *      used by /usr/bin/mysql_upgrade (dev-db/mysql-5.1.58)
 *      used by /usr/bin/mysqladmin (dev-db/mysql-5.1.58)
 *      used by 8 other files
 *  - /usr/lib64/mysql/libmysqlclient_r.so.16
 *  - /usr/lib64/mysql/libmysqlclient_r.so.16.0.0
 *      used by /usr/bin/mysql-workbench-bin (dev-db/mysql-workbench-5.2.34)
 *      used by /usr/bin/mysql_client_test (dev-db/mysql-5.1.58)
 *      used by /usr/bin/mysqlimport (dev-db/mysql-5.1.58)
 *      used by 3 other files

After running emerge @preserved-rebuild, i got the following error:

Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: '-Wl,-O1'
Unrecognized argument in LIBS ignored: '-Wl,--as-needed'
Unrecognized argument in LIBS ignored: '-rdynamic'
Using DBI 1.616 (for perl 5.012004 on x86_64-linux) installed in /usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux/auto/DBI/
Writing Makefile for DBD::mysql
 * emake OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed
x86_64-pc-linux-gnu-gcc -c  -I/usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux/auto/DBI -I/usr/include/mysql  -msse4.1 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-strict-aliasing   -DUNIV_LINUX -DUNIV_LINUX -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=core2 -msse4.1 -O2 -pipe   -DVERSION=\"4.019\" -DXS_VERSION=\"4.019\" -fPIC "-I/usr/lib64/perl5/5.12.4/x86_64-linux/CORE"   dbdimp.c
/usr/bin/perl5.12.4 -p -e "s/~DRIVER~/mysql/g" /usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux/auto/DBI/Driver.xst > mysql.xsi
Running Mkbootstrap for DBD::mysql ()
/usr/bin/perl5.12.4 /usr/lib64/perl5/5.12.4/ExtUtils/xsubpp  -typemap /usr/lib64/perl5/5.12.4/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
chmod 644 mysql.bs
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
Warning: duplicate function definition 'do' detected in mysql.xs, line 242
Warning: duplicate function definition 'rows' detected in mysql.xs, line 749
x86_64-pc-linux-gnu-gcc -c  -I/usr/lib64/perl5/vendor_perl/5.12.4/x86_64-linux/auto/DBI -I/usr/include/mysql  -msse4.1 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-strict-aliasing   -DUNIV_LINUX -DUNIV_LINUX -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=core2 -msse4.1 -O2 -pipe   -DVERSION=\"4.019\" -DXS_VERSION=\"4.019\" -fPIC "-I/usr/lib64/perl5/5.12.4/x86_64-linux/CORE"   mysql.c
In file included from dbdimp.c:20:0:
dbdimp.h:22:49: fatal error: mysql.h: No such file or catalog
compilation terminated.
make: *** [dbdimp.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from mysql.xs:14:0:
dbdimp.h:22:49: fatal error: mysql.h: No such file or catalog
compilation terminated.
make: *** [mysql.o] Error 1
 * ERROR: dev-perl/DBD-mysql-4.19.0 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =dev-perl/DBD-mysql-4.19.0',
 * the complete build log and the output of 'emerge -pqv =dev-perl/DBD-mysql-4.19.0'.
 * The complete build log is located at '/var/tmp/portage/dev-perl/DBD-mysql-4.19.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-perl/DBD-mysql-4.19.0/temp/environment'.
 * S: '/var/tmp/portage/dev-perl/DBD-mysql-4.19.0/work/DBD-mysql-4.019'

Any idea...?

Reproducible: Always

Steps to Reproduce:
1.emerge dev-perl/DBD-mysql
2.
3.
Comment 1 Pacho Ramos gentoo-dev 2011-07-13 14:12:21 UTC
Do you have mariadb installed?
Comment 2 Juergen Rose 2011-07-13 14:48:11 UTC
I have the same error and mariadb is not installed.
Comment 3 Pacho Ramos gentoo-dev 2011-07-13 15:53:17 UTC
Anyway maybe this could be caused by eclass issues commented in bug 341853
Comment 4 Nikolaos Chatzidakis 2011-07-13 16:30:52 UTC
I don't have dev-db/mariadb installed. If i try to install it, i get blocks with my mysql installation.
Comment 5 Nikolaos Chatzidakis 2011-07-13 17:06:22 UTC
(In reply to comment #4)
> I don't have dev-db/mariadb installed. If i try to install it, i get blocks
> with my mysql installation.

UPDATE: I think i found a "hack". Editing /usr/bin/mysql_config, changing:

fix_path pkgincludedir include/mysql include

to:

fix_path pkgincludedir include/mysql/mysql include

fixed the problem. BUT, after emerging the above package successfully, mysql_config gets back to the original form with the "wrong" path. For some reason, the .h files of mysql exist in /usr/include/mysql/mysql, rather than /usr/include/mysql that mysql_config is looking for... Try it and see if it works for yourselves.
Comment 6 Nikolaos Chatzidakis 2011-07-13 17:18:11 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I don't have dev-db/mariadb installed. If i try to install it, i get blocks
> > with my mysql installation.
> 
> UPDATE: I think i found a "hack". Editing /usr/bin/mysql_config, changing:
> 
> fix_path pkgincludedir include/mysql include
> 
> to:
> 
> fix_path pkgincludedir include/mysql/mysql include
> 
> fixed the problem. BUT, after emerging the above package successfully,
> mysql_config gets back to the original form with the "wrong" path. For some
> reason, the .h files of mysql exist in /usr/include/mysql/mysql, rather than
> /usr/include/mysql that mysql_config is looking for... Try it and see if it
> works for yourselves.

UDPATE2:

mysql_config gets back to the wrong path because 'emerge @preserved-rebuild' emerges mysql again, and THEN it emerges egain DBD... So, something is wrong with the mysql_config that mysql writes. When mysql emerges again, DBD fails again (obviously).
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-07-14 04:58:28 UTC
Sorry but we didn't got any bug reports about this issue before getting the new eclasses in the tree.
Please sync the tree and emerge mysql again.

*** This bug has been marked as a duplicate of bug 375063 ***
Comment 8 Nikolaos Chatzidakis 2011-07-14 11:13:28 UTC
(In reply to comment #7)
> Sorry but we didn't got any bug reports about this issue before getting the new
> eclasses in the tree.
> Please sync the tree and emerge mysql again.
> 
> *** This bug has been marked as a duplicate of bug 375063 ***

It seems to be working fine now.
Comment 9 Juergen Rose 2011-07-14 12:35:44 UTC
For me it works now, too.