Summary: | app-admin/setools-3.3.8-r2 fails to emerge with gold linker | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Amadeusz Sławiński <amade> |
Component: | SELinux | Assignee: | Sven Vermeulen (RETIRED) <swift> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, selinux |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | selinux-utils | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315 | ||
Attachments: | build.log |
Description
Amadeusz Sławiński
2013-04-24 23:17:03 UTC
Created attachment 346550 [details]
build.log
This one seems to be caused by gold linker, there are also two similar bugs 402967 445826 After changing to ld.bfd it emerged fine Anything I can do to help fix it? What's special about the gold linker? https://wiki.gentoo.org/wiki/Gold I'm not sure if it doesn't break anything but here is what I found: Linking fails on such lines: __asm__(".symver qpol_policy_open_from_file_old,qpol_policy_open_from_file@"); (this one is from libqpol/src/policy.c) They seem to be enabled by LINK_SHARED define #if LINK_SHARED == 1 __asm__(".symver qpol_policy_open_from_file_old,qpol_policy_open_from_file@"); __asm__(".symver qpol_policy_open_from_file_opt,qpol_policy_open_from_file@@VERS_1.3"); __asm__(".symver qpol_policy_open_from_memory_old,qpol_policy_open_from_memory@"); __asm__(".symver qpol_policy_open_from_memory_opt,qpol_policy_open_from_memory@VERS_1.3"); __asm__(".symver qpol_policy_rebuild_old,qpol_policy_rebuild@"); __asm__(".symver qpol_policy_rebuild_opt,qpol_policy_rebuild@@VERS_1.3"); #endif There is not a lot of them # grep -R LINK_SHARED * configure.ac: AC_DEFINE(LINK_SHARED, 1, [link programs using shared libraries]) configure.ac: AC_DEFINE(LINK_SHARED, 0, [link programs using shared libraries]) libapol/src/render.c:#if LINK_SHARED == 1 libapol/src/render.c:#if LINK_SHARED == 0 libqpol/src/policy.c:#if LINK_SHARED == 1 libqpol/src/policy.c:#if LINK_SHARED == 0 libqpol/src/policy.c:#if LINK_SHARED == 0 libqpol/src/policy.c:#if LINK_SHARED == 0 libseaudit/src/filter.c:#if LINK_SHARED == 1 libseaudit/src/filter.c:#if LINK_SHARED == 1 LINK_SHARED is enabled by default, from what I understood it is disabled for example when building with debug use flag and indeed it builds fine then. It can also be disabled by passing --disable-shared to configure (also builds fine). As I mentioned there are similar bugs in other packages (fuse) and seems like their upstream decided to just remove .symver due to the fact that it may cause undefined behaviour ( http://sourceforge.net/mailarchive/forum.php?thread_name=m3wrq48tso.fsf%40pepe.airs.com&forum_name=fuse-devel ). I submitted it also upstream (on Aug 15) [1] but no response so far. [1] http://marc.info/?l=selinux&m=137656634408124&w=2 As there is no feedback upstream yet, I'll probably update the ebuild to select the old linker until this gets fixed. Similarly to how http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-firmware/sgabios/sgabios-0.1_pre8.ebuild?view=markup did it. It's not a fix, but at least allows to continue with gold linker system-wide. Now in tree, ~arch'ed. Also switched to EAPI=5 and the python-r1 eclass. setools-3.3.8-r4 is now stabilized. Commit message: Use new toolchain helpers for selecting the bfd linker http://sources.gentoo.org/app-admin/setools/setools-3.3.8-r5.ebuild?r1=1.2&r2=1.3 http://sources.gentoo.org/app-admin/setools/setools-3.3.8-r7.ebuild?r1=1.3&r2=1.4 |