Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508906 - app-emulation/emul-linux-x86-*: SYMLINK_LIB=no LIBDIR_x86=lib results in broken pkgconfig files
Summary: app-emulation/emul-linux-x86-*: SYMLINK_LIB=no LIBDIR_x86=lib results in brok...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Multilib team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: no-symlink-lib
  Show dependency tree
 
Reported: 2014-04-27 20:15 UTC by Alexander Tsoy
Modified: 2015-06-02 08:33 UTC (History)
1 user (show)

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


Attachments
wine-x86-config.log (wine-x86-config.log,362.15 KB, text/x-log)
2014-04-27 20:15 UTC, Alexander Tsoy
Details
emul-linux-x86.eclass.patch (emul-linux-x86.eclass.patch,469 bytes, patch)
2014-04-27 20:42 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2014-04-27 20:15:48 UTC
Created attachment 375896 [details]
wine-x86-config.log

emul-linux-x86.eclass is already doing some dangerous things like renaming lib32 dirs and fixing ldscripts. May be it could also fix pkgconfig files? :)

Currently wine fails to configure for x86 on my system.
Comment 1 Mike Gilbert gentoo-dev 2014-04-27 20:35:06 UTC
I have this hack in /etc/portage/bashrc. ^_^

post_src_install() {
    if [[ ${CATEGORY}/${PN} == app-emulation/emul-linux-x86-* ]]; then
        grep -RlZ --include="*.la" --include="*.pc" lib32 "${D}" | xargs -0 sed -i -e "s:lib32:lib:g"
    fi
}
Comment 2 Alexander Tsoy 2014-04-27 20:42:22 UTC
Created attachment 375898 [details, diff]
emul-linux-x86.eclass.patch
Comment 3 Alexander Tsoy 2014-04-28 14:28:49 UTC
Seems this does not worth the effort. There are a lot of other things that should be fixed to make emul-linux-x86-* packages usable. :( Some examples:

- RPATHs and RUNPATHS points to */lib32/*. This leads to runtime failures. For example I was able to run skype only after fixing RPATH in libpulse.so.

$ LANG=C readelf -d /usr/lib/libpulse.so.0 | grep PATH
 0x0000000f (RPATH)                      Library rpath: [/usr/lib32/pulseaudio]
 0x0000001d (RUNPATH)                    Library runpath: [/usr/lib32/pulseaudio]

- eclass actually does not fix ldscripts. :) While the following condition is true when executed from interactive shell, it is false when executed from ebuild:

if ldscripts=( $(grep -ls '^GROUP.*/lib32/' *.so) ) ; then

As a result, sed command does not get executed. The following patch fixes the issue:

@@ -67,7 +67,8 @@
 
 		# Fix linker script paths.
 		local ldscripts
-		if ldscripts=( $(grep -ls '^GROUP.*/lib32/' *.so) ) ; then
+		ldscripts=( $(grep -ls '^GROUP.*/lib32/' *.so) )
+		if (( "${#ldscripts[@]}" )) ; then
 			sed -i \
 				-e "s:/lib32/:/${x86_libdir}/:" \
 				"${ldscripts[@]}" || die
Comment 4 SpanKY gentoo-dev 2014-05-06 20:03:59 UTC
Comment on attachment 375898 [details, diff]
emul-linux-x86.eclass.patch

one line fix:

 find pkgconfig/ -type f -exec \
   sed -i -r -e s:/lib32($|[[:space:]]|/):/${x86_libdir}\1:g" {} +
Comment 5 SpanKY gentoo-dev 2014-05-06 20:04:57 UTC
(In reply to Alexander Tsoy from comment #3)

yes, the SYMLINK_LIB migration logic was a "best effort".  adding .pc and ldscript munging seems pretty easy, so let's do that.  i wouldn't worry about the rpath stuff as emul-* packages are getting killed in favor of ABI_X86.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-02 08:33:45 UTC
The emul-linux-x86 packages have been removed.