MySQL libs are installed by default to /usr/lib/mysql, extconf.rb tries to find them in /usr/local/lib/mysql. So it's clear that without any my attemps you can't install this lib by a simple command emerge mysql-ruby. Reproducible: Always Steps to Reproduce: 1. emerge mysql 2. emerge mysql-ruby Actual Results: "emerge mysql-ruby" gives a compile error. Expected Results: "emerge mysql-ruby" should search libs in /usr/lib/mysql and should be installed without any errors. # ls -la /usr/local/lib/ total 0 drwxr-xr-x 2 root root 18 Jan 6 13:14 . drwxr-xr-x 10 root root 131 May 6 2010 .. -rw-r--r-- 1 root root 0 Dec 17 2009 .keep # ls -la /usr/lib/mysql/ total 6632 drwxr-xr-x 3 root root 4096 Dec 1 17:07 . drwxr-xr-x 48 root root 28672 Jan 3 00:54 .. -rw-r--r-- 1 root root 2034 Dec 1 17:06 libdbug.a -rwxr-xr-x 1 root root 896 Dec 1 17:06 libdbug.la -rw-r--r-- 1 root root 134404 Dec 1 17:06 libheap.a -rwxr-xr-x 1 root root 896 Dec 1 17:06 libheap.la -rw-r--r-- 1 root root 570912 Dec 1 17:06 libmyisam.a -rwxr-xr-x 1 root root 902 Dec 1 17:06 libmyisam.la -rw-r--r-- 1 root root 116168 Dec 1 17:06 libmyisammrg.a -rwxr-xr-x 1 root root 911 Dec 1 17:06 libmyisammrg.la -rw-r--r-- 1 root root 1919182 Dec 1 17:06 libmysqlclient.a -rwxr-xr-x 1 root root 924 Dec 1 17:06 libmysqlclient.la -rw-r--r-- 1 root root 1937382 Dec 1 17:06 libmysqlclient_r.a -rwxr-xr-x 1 root root 940 Dec 1 17:06 libmysqlclient_r.la -rw-r--r-- 1 root root 1532526 Dec 1 17:06 libmystrings.a -rwxr-xr-x 1 root root 911 Dec 1 17:06 libmystrings.la -rw-r--r-- 1 root root 460326 Dec 1 17:06 libmysys.a -rwxr-xr-x 1 root root 895 Dec 1 17:06 libmysys.la -rw-r--r-- 1 root root 10796 Dec 1 17:06 libvio.a -rwxr-xr-x 1 root root 893 Dec 1 17:06 libvio.la drwxr-xr-x 2 root root 6 Apr 27 2010 plugin # emerge mysql-ruby >>> Verifying ebuild manifests >>> Emerging (1 of 1) dev-ruby/mysql-ruby-2.8.1-r1 * mysql-ruby-2.8.1.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * Package: dev-ruby/mysql-ruby-2.8.1-r1 * Repository: gentoo * Maintainer: ruby@gentoo.org * USE: amd64 elibc_glibc kernel_linux multilib ruby_targets_ruby18 userland_GNU >>> Unpacking source... * Running unpack phase for all ... >>> Unpacking mysql-ruby-2.8.1.tar.gz to /var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/work/all >>> Source unpacked in /var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/work >>> Preparing source in /var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/work ... * Running prepare phase for all ... * Applying mysql-ruby-2.8.1-test.patch ... [ ok ] * Running source copy phase for ruby18 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/work ... * Running configure phase for ruby18 ... checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby18 --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib --with-mygcclib --without-mygcclib --with-mysqlclientlib --without-mysqlclientlib * ERROR: dev-ruby/mysql-ruby-2.8.1-r1 failed: * (no error message) * * Call stack: * ebuild.sh, line 56: Called src_configure * environment, line 2835: Called ruby-ng_src_configure * environment, line 2527: Called _ruby_each_implementation 'each_ruby_configure' * environment, line 301: Called _ruby_invoke_environment 'ruby18' 'each_ruby_configure' * environment, line 330: Called each_ruby_configure * environment, line 859: Called die * the complete build log and the output of 'emerge -pqv =dev-ruby/mysql-ruby-2.8.1-r1'. * The complete build log is located at '/var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/temp/build.log'. * S: '/var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/work/ruby18/mysql-ruby-2.8.1' >>> Failed to emerge dev-ruby/mysql-ruby-2.8.1-r1, Log file: >>> '/var/tmp/portage/dev-ruby/mysql-ruby-2.8.1-r1/temp/build.log' * Messages for package dev-ruby/mysql-ruby-2.8.1-r1: * ERROR: dev-ruby/mysql-ruby-2.8.1-r1 failed: * (no error message) * * Call stack: * ebuild.sh, line 56: Called src_configure * environment, line 2835: Called ruby-ng_src_configure * environment, line 2527: Called _ruby_each_implementation 'each_ruby_configure' * environment, line 301: Called _ruby_invoke_environment 'ruby18' 'each_ruby_configure' * environment, line 330: Called each_ruby_configure * environment, line 859: Called die * The specific snippet of code: * ${RUBY} extconf.rb || die
Attach the output of `emerge --info mysql'.
# emerge --info mysql Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36.2-a-c-s-1gb x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.36.2-a-c-s-1gb-x86_64-Intel-R-_Xeon-R-_CPU_X5650_@_2.67GHz-with-gentoo-1.12.14 Timestamp of tree: Wed, 05 Jan 2011 10:15:01 +0000 app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11-r1 dev-lang/python: 2.4.6, 2.6.5-r3, 3.1.2-r4 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.3-r1 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.10.2, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.3.4, 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-mtune=core2 -march=core2 -O2 -pipe -fomit-frame-pointer -ftracer -mmmx -msse -msse2 -msse3 -msse4.1 -msse4.2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-mtune=core2 -march=core2 -O2 -pipe -fomit-frame-pointer -ftracer -mmmx -msse -msse2 -msse3 -msse4.1 -msse4.2" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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/local/portage" SYNC="rsync://mirror.yandex.ru/gentoo-portage" USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session sse sse2 ssl sysfs tcpd unicode userlocales xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= dev-db/mysql-5.1.51 was built with the following: USE="community (multilib) static -big-tables -cluster (-debug) -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -perl -profiling (-selinux) -ssl -test -xtradb" CFLAGS="-mtune=core2 -march=core2 -O2 -pipe -fomit-frame-pointer -ftracer -mmmx -msse -msse2 -msse3 -msse4.1 -msse4.2 -DHAVE_ERRNO_AS_DEFINE=1 -fno-strict-aliasing" CXXFLAGS="-mtune=core2 -march=core2 -O2 -pipe -fomit-frame-pointer -ftracer -mmmx -msse -msse2 -msse3 -msse4.1 -msse4.2 -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-strict-aliasing"
What I thought. You have USE=static enabled. You'll need to disable that in order to get dynamic libraries. The dependency on mysql-ruby will be changed to force -static.
Isn't this the problem mentioned at the end of bug 348788?
This is fixed in CSV in mysql-ruby 2.8.2.