Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213574 - dev-lang/php-5.2.6_rc1-r1 does not build. It can't find mysql headers
Summary: dev-lang/php-5.2.6_rc1-r1 does not build. It can't find mysql headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-16 12:56 UTC by Santiago Gala
Modified: 2008-08-15 17:38 UTC (History)
1 user (show)

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


Attachments
config.log (config.log,284.32 KB, text/plain)
2008-03-16 18:20 UTC, Santiago Gala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Santiago Gala 2008-03-16 12:56:41 UTC
Trying to emerge stable php with stable mysql results in:

configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

The include files are under /usr/include/mysql, actually, in dev-db/mysql-5.0.54

I'm not sure how to fix it. It has been going on for a few php updates.

Reproducible: Always




$ emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.6.1-r0, 2.6.24-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r3 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Timestamp of tree: Sun, 16 Mar 2008 11:00:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.4.4-r9, 2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -ftree-vectorize -fstrict-overflow -Wstrict-overflow=3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -ftree-vectorize -fstrict-overflow -Wstrict-overflow=3"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="es_ES.UTF-8"
LINGUAS="es es_ES en"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/voip /usr/portage/local/layman/sunrise /usr/portage/local/layman/bzr-overlay /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi aiglx alsa amd64 apache2 arts avahi avi bash-completion berkdb bitmap-fonts bluetooth bonjour cairo cdr cli cracklib crypt cups curl dbus dlloader dri dvd dvdr dvdread eds emboss encode esd evdev evo fam firefox fortran galago gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv icu iproute2 ipv6 isdnlog java jpeg kde kdehiddenvisibility kerberos lcms ldap libg++ libnotify logrotate lucene mad midi mikmod mmx mono mouse mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin obex ogg opengl openmp oss pam pcre pdf pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts udev unicode v4l v4l2 vorbis xinerama xml xorg xrandr xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" DVB_CARDS="usb-wt220u" ELIBC="glibc" INPUT_DEVICES="synaptics mouse evdev keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en" USERLAND="GNU" VIDEO_CARDS="vesa i810 intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-16 13:15:48 UTC
We need config.log attached, these configure error messages are completely misleading with PHP. Thanks.
Comment 2 Santiago Gala 2008-03-16 18:20:43 UTC
Created attachment 146329 [details]
config.log

done
Comment 3 Santiago Gala 2008-03-16 18:21:34 UTC
forgot t oreopen
Comment 4 Santiago Gala 2008-03-27 06:55:49 UTC
any news on this one? it is still not emerging here
Comment 5 Christian Hoffmann (RETIRED) gentoo-dev 2008-03-30 12:07:42 UTC
This is actually the expected output for mysql (maybe without pdo or the "shared" thing if USE=-sharedext):

--with-mysql=shared,/usr --with-mysql-sock=/var/run/mysqld/mysqld.sock
  --with-mysqli=shared,/usr/bin/mysql_config --without-pdo-dblib
  --with-pdo-mysql=shared,/usr

No clue what's going wrong here, the configure call looks correct to me.
Comment 6 Santiago Gala 2008-03-30 22:31:55 UTC
I don't know if this is intended or not, but here:

$ mysql_config 
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/include/mysql -DHAVE_ERRNO_AS_DEFINE=1]
        --include        [-I/usr/include/mysql]
        --libs           [-Wl,--as-needed -rdynamic -L/usr/lib64/mysql/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto]
        --libs_r         [-Wl,--as-needed -rdynamic -L/usr/lib64/mysql/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -L/usr/lib64 -lssl -lcrypto]
        --socket         [/var/run/mysqld/mysqld.sock]
        --port           [0]
        --version        [5.0.54]
        --libmysqld-libs [-Wl,--as-needed -rdynamic -L/usr/lib64/mysql/mysql -lmysqld -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -L/usr/lib64 -lssl -lcrypto]


i.e., the files are not where your are telling configure they are. I have installed:
dev-db/mysql-5.0.54
dev-db/mysql-init-scripts-1.2
Comment 7 Christian Hoffmann (RETIRED) gentoo-dev 2008-03-30 22:44:46 UTC
According to ./configure --help:
  --with-mysql[=DIR]      Include MySQL support. DIR is the MySQL base directory
So, IMO, it's correct that we pass /usr as it's the base dir for MySQL... and as it has worked perfectly fine in the past (and still does for most people out there, apparently), I see no reason to change this.

I really don't know what to fix and where, any input from MySQL guys would be appreciated...
Comment 8 Santiago Gala 2008-03-31 08:00:53 UTC
I'm not an expert, it just stopped working when emerge prompted for an upgrade

But I'd say: 

> So, IMO, it's correct that we pass /usr as it's the base dir for MySQL...
It is correct to pass the base dir that the dev-db/mysql ebuild sets (in particular dev-db/mysql-5.0.54, which is the stable one here). Gentoo is a distribution, so things are supposed to work together.

I can live with an ebuild that fails to upgrade, after all it is a RC, not even released yet. But I reported when I saw it staying too much time in my "doesn't build" list.

the configure passes if the directory checks are changed to add an extra "/mysql", i.e, something along the lines of:

+    elif test -r $i/include/mysql/mysql/mysql.h; then
+      MYSQL_DIR=$i
+      MYSQL_INC_DIR=$i/include/mysql/mysql
+      break

either the mysql include directory should be there, and then it is a php bug, or it doesn't, and then it is a mysql bug. But in both cases it is a gentoo bug.
Comment 9 Santiago Gala 2008-08-15 17:38:52 UTC
re: emerging mysql made the include files appear where php expects them, and then php builds. closing