Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 512008 - mysql-cmake.eclass 1.19 version bump undid LDPATH adjustment done in version 1.16
Summary: mysql-cmake.eclass 1.19 version bump undid LDPATH adjustment done in version ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-01 07:02 UTC by Gabriel Marcano
Modified: 2014-06-02 02:19 UTC (History)
2 users (show)

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


Attachments
Patch adding LDPATH changes removed in mysql-cmake.eclass revision 19. (mysql-cmake.eclass.patch,468 bytes, patch)
2014-06-01 07:06 UTC, Gabriel Marcano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Marcano 2014-06-01 07:02:15 UTC
I have been trying to solve the problem in bug 508824 regarding Portage keeping some preserved libs around related to libmysqld.so.18, which is no longer being installed in the library directory but in a mysql subdirectory (in my ~amd64 machine that is /usr/lib64/mysql). After troubleshooting, I noticed no reference to the mysql library folder anywhere in env.d or in my ld.so.conf folders. Reading bug 474952 I learned that a fix to the eclass was supposedly integrated into the tree for the LDPATH variable. Looking at the diff history of the different version, I noticed the fix for LDPATH introduced in version 1.16 of mysql-cmake.eclass, only to be removed in version 1.19 while merging the file with the ebuild from one of the overlays. Adding this change back into the eclass and recompiling MySQL results in the installation of a file in env.d that sets the LDPATH to include the mysql library folder, solving the problem in bug 508824, and possibly others. My computer has mysql-5.5.37-r1 installed, but this most likely also affects mariadb since they both make use of the eclass in question, to my understanding.

Reproducible: Always

Steps to Reproduce:
1. Install mysql-5.5.37-r1
2. Install any package that links against one of the libraries inside /usr/lib/mysql (such as Amarok with the embedded useflag enabled, links to /usr/lib/mysql/libmysqld.so.18)
Actual Results:  
If previously installed, /usr/lib/libmysqld.so.18 (deprecated location) is preserved because LDPATH does not include /usr/lib/mysql, else checking the runtime linking of the affected package reveals that libmysqld is not found since LDPATH is not updated to include /usr/lib/mysql.

Expected Results:  
After installing mysql--5.5.37-r1, LDPATH should be updated such that so that packages can find the libraries found within /usr/lib/mysql.

# emerge --info
Portage 2.2.10 (default/linux/amd64/13.0/desktop/kde, gcc-4.9.0, glibc-2.19, 3.14.4-gentoo x86_64)
=================================================================
System uname: Linux-3.14.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.2
KiB Mem:    16372188 total,   7722252 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of tree: Sat, 31 May 2014 18:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6-r1, 3.3.5, 3.4.0
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.9.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo Local_Overlay steam-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -pipe -fomit-frame-pointer -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -pipe -fomit-frame-pointer -O2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://mirrors.rit.edu/gentoo/ http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/ http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ rsync://mirrors.rit.edu/gentoo/ ftp://mirrors.rit.edu/gentoo/ http://mirrors.rit.edu/gentoo/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.llarian.net/ ftp://ftp.lug.udel.edu/pub/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirror.usu.edu/mirrors/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/steam-overlay"
USE="X a52 aac acl acpi alsa amd64 avx bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt qt3support qt4 readline sdl semantic-desktop session spell sse sse2 sse3 sse4 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" 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" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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 ublox ubx" GRUB_PLATFORMS="efi-64 emu" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en es" NETBEANS_MODULES="cnd mobility" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="hp3900" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau intel" 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"
USE_PYTHON="2.7 3.3 3.4"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Gabriel Marcano 2014-06-01 07:06:55 UTC
Created attachment 377974 [details, diff]
Patch adding LDPATH changes removed in mysql-cmake.eclass revision 19.
Comment 2 Brian Evans (RETIRED) gentoo-dev 2014-06-02 01:13:17 UTC
This change was intentional as other patches in dev-db/{mariadb,mysql} and the mysql-cmake.eclass moved most of the libraries to /usr/$(get_libdir).

The one that was left in /usr/$(get_libdir)/mysql was the libmysqld.so.

As jmbsvicetto has stated in bug 508824, this is an amarok problem and he will be taking care of this there.
Comment 3 Gabriel Marcano 2014-06-02 02:19:45 UTC
Forgive my ignorance, but how is Amarok being unable to find the path to the libmysqld.so library at runtime an Amarok problem? To my knowledge Amarok uses myslq_config to find the library in question at build-time, as it is my understanding that it should. In my system:

# mysql_config --libmysqld-libs
-L/usr/./lib64/mysql -lmysqld

As things currently stand (I think), there is nothing in the system that would point any packages to this directory at runtime-- so while programs that need to compile against libmysqld.so may compile, they won't run since they won't be able to find the library. Well, this is assuming we don't configure RUNPATH for Amarok. Is this the solution, tweaking RUNPATH at build-time? On a related note, if almost all libraries were moved out of the myslq library folder, why was libmysqld left behind? Is there somewhere online where that discussion was had so that I may catch up on the reasoning? I appreciate the efforts of jmbsvicetto in bug 508824, and I realize this is probably a low priority, but I think this problem is within my abilities to solve, if I were to understand what the problem is. I fail to see Amarok being at fault-- if I run ldd in my system (after undoing my "fix") on the libraries Amarok compiles:

# ldd /usr/lib64/kde4/amarok_collection-mysql* | grep mysql
/usr/lib64/kde4/amarok_collection-mysqlecollection.so:
        libmysqld.so.18 => not found

Please advise.