Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461210 - =sys-apps/systemd-198 has underlinked libraries with -Wl,--as-needed (causing revdeps to not build, like udisks)
Summary: =sys-apps/systemd-198 has underlinked libraries with -Wl,--as-needed (causing...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 05:31 UTC by Canek Peláez Valdés
Modified: 2013-03-25 15:28 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Canek Peláez Valdés 2013-03-10 05:31:20 UTC
As explained in https://bugs.freedesktop.org/show_bug.cgi?id=62085 udisks-2.0.92 fails to compile against systemd-198. Most of the problem seems to be in udisks; however, the build also seems to be affected by the use of "-Wl,--as-needed". I need to remove the flag from LDFLAGS to be able to compile the program.

Reproducible: Always

Steps to Reproduce:
1.Try to emerge udisks-2.0.92 with the patch in https://bugs.freedesktop.org/show_bug.cgi?id=62085
2.The build fails unless I remove the "-Wl,--as-needed" flag from LDFLAGS.
Actual Results:  
The build fails.

Expected Results:  
It should build correctly.

I've been using systemd and udisks for a long time; the --as-needed flag didn't caused any trouble up until systemd-198. Also, I tried to reemerge udisks-2.0.91, and the same failure occurred.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-03-10 10:34:46 UTC
It looks as if libsystemd-login was itself underlinked and it should link against libsystemd-id128, that'd make this a systemd-198 bug, not udisks bug
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-03-10 10:38:26 UTC
Can you check if adding this to systemd-198.ebuild solves the problem?

- Add "flag-o-matic toolchain-funcs" to inherit line
- Add "append-ldflags $(no-as-needed)" before it runs the ./configure, so at the top of src_configure()

Then redigest and re-emerge systemd
Then try to build udisks again

That'd verify this is a systemd bug
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-03-10 10:38:45 UTC
(In reply to comment #2)
> Can you check if adding this to systemd-198.ebuild solves the problem?
> 
> - Add "flag-o-matic toolchain-funcs" to inherit line
> - Add "append-ldflags $(no-as-needed)" before it runs the ./configure, so at
> the top of src_configure()
> 
> Then redigest and re-emerge systemd
> Then try to build udisks again
> 
> That'd verify this is a systemd bug

Or just compile systemd without -Wl,--as-needed by other means :-)
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-10 10:49:41 UTC
I think that's underlinking or mis-design in libsystemd-common.la. I've reassigned the upstream bug to systemd maintainers.
Comment 5 Canek Peláez Valdés 2013-03-10 17:29:31 UTC
I commented in the upstream bug, it is indeed a systemd bug, and it will affect any program linking to libsystemd-login, in my machine at least:

udisks
gnome-session
gnome-shell
gdm

The patch in the upstream bug fixes the issue, but I'm sending it to the systemd mailing list asking for guidance, since I'm not sure it's the correct solution.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-14 09:26:13 UTC
Should be fixed in -198-r1.
Comment 8 Jean-Marc Hengen 2013-03-25 10:37:28 UTC
As far as I could track it, >=sys-apps/systemd-198-r2 reintroduced this issue again :-( At least the patches added by sys-apps/systemd-198-r1 were not included anymore and I experience the same issues with sys-apps/systemd-198-r4 as with sys-apps/systemd-198.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-25 14:15:52 UTC
Sorry for that. Reintroduced the patches in -r5.
Comment 10 Jean-Marc Hengen 2013-03-25 15:28:13 UTC
(In reply to comment #9)
> Sorry for that. Reintroduced the patches in -r5.

Thanks for fixing it so fast. -r5 works for me.