View previous topic :: View next topic |
Author |
Message |
gemarcano Tux's lil' helper
Joined: 04 Jun 2012 Posts: 100 Location: California
|
Posted: Sun May 25, 2014 8:41 pm Post subject: [Solved] dev-db/mysql and Amarok, runpath issues |
|
|
I've been troubleshooting a problem with Amarok and MySQL, although according to the bug report for this problem this seems to impact MariaDB as well. As best as I can tell, the problem seems to be that MySQL and MariaDB are not adding (in my system) /usr/lib64/mysql to ld.so.conf. I have been unable to find a bug report exactly about this issue, although there have been bugs about packages failing to link due to issues with libmysql* libraries. Based on my spelunking through the Cmake files in Amarok, as well as the build.log, it does use the correct .so files for linking since it finds them using mysl_config. The problem here is that at runtime, due to MySQL not updating ld.so.conf, Amarok only finds the "old" libraries under /usr/lib64 instead of the ones in /usr/lib64/mysql. The manual solution is to add a file to /etc/ld.so.conf.d/ that adds the path to the mysql libraries, but this should be done automatically by mysql upon being installed, no? Or am I making an incorrect assumption? If this is correct, I will file a bug-- I just want to get some input before I do so.
Last edited by gemarcano on Mon Jun 16, 2014 12:08 am; edited 3 times in total |
|
Back to top |
|
|
gemarcano Tux's lil' helper
Joined: 04 Jun 2012 Posts: 100 Location: California
|
Posted: Sun Jun 01, 2014 7:20 am Post subject: |
|
|
Fixed it, I think. I opened a bug report with my findings. Essentially, a change modifying the LDPATH for the mysql/mariadb packages was merged out in mysql-cmake.eclass version 1.19 (I think this is a git merge gone wrong). The LDPATH modification was originally made to fix bug 474952 in version 1.16 of the eclass file, but it was erased in 1.19. The fix essentially puts the deleted lines back into the eclass file. I recompiled mysql (and amarok in my case) and the problems I was having disappeared. I will mark this as solved unless someone turns down my proposed fix in the bug report. |
|
Back to top |
|
|
gemarcano Tux's lil' helper
Joined: 04 Jun 2012 Posts: 100 Location: California
|
Posted: Mon Jun 02, 2014 2:28 am Post subject: |
|
|
I was just told in bug 512008 that the removal of the LDPATH stuff was intentional from the mysql-cmake.eclass. This means my fix is not correct... I was told that everything except libmyslqd was moved outside of /usr/lib/mysql... yet Amarok (and anything else that uses the embedded mysql library, unless RUNPATH is specified at compile time) needs to find libmysqld, which it can't do if there is no mention of it anywhere in the system's LDPATH or ld.so.conf. I think. Would anyone know where the Gentoo MySQL/MariaDB discussions on this matters are held, so that I can at least catch up on the decisions being made? I'd rather not keep flailing around in the dark trying to find a solution. I'll start looking myself as well. I'll report back if I see anything. |
|
Back to top |
|
|
gemarcano Tux's lil' helper
Joined: 04 Jun 2012 Posts: 100 Location: California
|
Posted: Sun Jun 15, 2014 9:33 pm Post subject: |
|
|
I haven't made any progress since the last time I posted. Right now I'm looking into ways of making Amarok find the embedded MySQL libraries on its own. Everything I'm reading about seems to point that the way to do this is via setting the runpath variable of the binaries in question at compile time to the location of the MySQL embedded library. I haven't been able to find much with regards to CMake and Gentoo and RPATH... is this approach kosher in Gentoo (using RPATHs)? The lack of information makes me wonder...
I did try some experiments modifying Amarok's CMake files for the Amarok binaries that are having problems. Looking at the image folder created after an ebuild compile, the library seemed to have the rpath I specified in the CMake file, but after running an ebuild install, it seemed to have been stripped. Would anyone have any idea why?
EDIT: The problems I was having with ebuild install were due to a misunderstanding on my part, serving as a reminder for me to RTFM, haha. See the next post for information on a solution.
Last edited by gemarcano on Mon Jun 16, 2014 12:18 am; edited 1 time in total |
|
Back to top |
|
|
gemarcano Tux's lil' helper
Joined: 04 Jun 2012 Posts: 100 Location: California
|
Posted: Mon Jun 16, 2014 12:07 am Post subject: |
|
|
I did some more work, and was able to implement something for Amarok specifically. See bug 508824 for my patches. It seems that it is a conscientious decision to leave /usr/$(get_libdir)/mysql out of LDPATH, and that any program that needs to access whatever is inside it, needs to do so manually (that seems to be my impression on the subject, anyhow). For Amarok, this was done by using RPATH. Unless I get told I'm wrong again, haha, I think this is solved. I'll tweak the subject header a bit to highlight that this is an Amarok specific problem (although there may be other packages that suffer from this). |
|
Back to top |
|
|
zBrain Apprentice
Joined: 14 Apr 2006 Posts: 182
|
Posted: Wed Oct 29, 2014 7:06 pm Post subject: |
|
|
Hi gemarcano,
First off thank you very much for taking the time to track this down and find a fix.
I see your patch was merged in to media-sound/amarok-2.8.0-r3
Unfortunately the stable version media-sound/amarok-2.8.0 is affected by this bug and unmasking -r3 seems to want to force me to move to an ~arch version of KDE.
For anyone looking for how to apply this:
Code: |
1. If you don't have it there already, add PORTDIR_OVERLAY=/usr/local/portage to make.conf
2. mkdir -p /usr/local/portage/media-sound/
3. cp -a /usr/portage/media-sound/amarok /usr/local/portage/media-sound
4. cd /usr/local/portage/media-sound/amarok
5. make the following changes to amarok-2.8.0.ebuild:
|
Quote: |
@@ -78,7 +78,10 @@
$(add_kdebase_dep phonon-kde)
"
+PATCHES=(
+ "${FILESDIR}/${P}-gmock-1.7.patch"
+ "${FILESDIR}/${P}-mysqld-rpath.patch"
+)
src_configure() {
# Append minimal-toc cflag for ppc64, see bug 280552 and 292707
@@ -100,6 +103,9 @@
$(cmake-utils_use_with utils UTILITIES)
)
+ # Add libmysqld location for rpath patch; bug 508824
+ use embedded && mycmakeargs+=(-DMYSQLD_DIR="${EPREFIX}/usr/$(get_libdir)/mysql")
+
kde4-base_src_configure
}
|
Code: |
6. rm Manifest
7. ebuild amarok-2.8.0.ebuild manifest
8 emerge -va =media-sound/amarok-2.8.0:4::x-portage
It should now install media-sound/amarok-2.8.0:4::x-portage
|
The x-portage is telling you it's installing from your overlay.[/code] |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|