Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472608 - >=sys-fs/udev-205 and >=sys-apps/kmod-14: Upstreams removed build-sys support for static libraries like libudev.a required for static lvm2 and cryptsetup
Summary: >=sys-fs/udev-205 and >=sys-apps/kmod-14: Upstreams removed build-sys support...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
: 481772 510062 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-07 17:55 UTC by Samuli Suominen (RETIRED)
Modified: 2014-05-11 14:15 UTC (History)
4 users (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 Samuli Suominen (RETIRED) gentoo-dev 2013-06-07 17:55:30 UTC
I'm reverting this commit in sys-fs/udev's ebuild and opening this bug to avoid documenting this in the ebuild.

The upstream commit I'm reverting is:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=5e63ce78b5018ba612e794a610a6f13c5eefade7

With a 1-liner like:

sed -i -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' configure
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-06-07 17:59:46 UTC
+  07 Jun 2013; Samuli Suominen <ssuominen@gentoo.org> udev-9999.ebuild:
+  Revert upstream commit that discontinued support for --enable-static in order
+  to get libudev.a back for USE="static" in sys-fs/cryptsetup and sys-fs/lvm2
+  wrt #472608
Comment 2 Mike Gilbert gentoo-dev 2013-06-07 18:51:31 UTC
Adding systemd since it will suffer the same problem.
Comment 3 William Hubbs gentoo-dev 2013-06-07 21:19:58 UTC
Reverting this will cause link errors however, e.g. the following in
systemd:

http://lists.freedesktop.org/archives/systemd-devel/2013-June/011173.html
Comment 4 Luca Barbato gentoo-dev 2013-06-07 22:04:25 UTC
libkmod-util.o (symbol from plugin): In function `getline_wrapped':
(.text+0x0): multiple definition of `memdup'
util.o (symbol from plugin):(.text+0x0): first defined here
libkmod-util.o (symbol from plugin): In function `getline_wrapped':
(.text+0x0): multiple definition of `path_is_absolute'
path-util.o (symbol from plugin):(.text+0x0): first defined here
libkmod-util.o (symbol from plugin): In function `getline_wrapped':
(.text+0x0): multiple definition of `path_make_absolute_cwd'
path-util.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [test-udev] Error 1

Easy to fix with proper namespacing...
Comment 5 Luca Barbato gentoo-dev 2013-06-07 23:14:20 UTC
On a second look seems that whoever wrote this does not exactly consider private symbols something to care about so depmod uses stuff such as memdup.

IF you have visibility on a dynamically linked depmod (and other tools) would fail to build at all.

I guess some serious cleanup would be good if libkmod plans to be shared-only since not even its own tools would execute as it is now.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2013-06-07 23:25:08 UTC
(In reply to William Hubbs from comment #3)
> Reverting this will cause link errors however, e.g. the following in
> systemd:
> 
> http://lists.freedesktop.org/archives/systemd-devel/2013-June/011173.html

unable to reproduce. got it building on first try and running fine :/
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2013-06-07 23:26:02 UTC
attach a complete build.log and emerge --info if you have such failure on Gentoo. thanks.
Comment 8 William Hubbs gentoo-dev 2013-06-08 00:42:43 UTC
(In reply to Samuli Suominen from comment #6)
> (In reply to William Hubbs from comment #3)
> > Reverting this will cause link errors however, e.g. the following in
> > systemd:
> > 
> > http://lists.freedesktop.org/archives/systemd-devel/2013-June/011173.html
> 
> unable to reproduce. got it building on first try and running fine :/

That is with system[static] and kmod[static] right?
Comment 9 William Hubbs gentoo-dev 2013-06-08 03:19:43 UTC
Disregard my last comment. I meant udev[static-libs] and
kmod[static-libs].
Comment 10 William Hubbs gentoo-dev 2013-06-08 13:04:00 UTC
All,

I found the following page on the gcc wiki talking about visibility [1].
This is what doesn't work in static libraries, so that is why they
aren't supporting static linking.

[1] http://gcc.gnu.org/wiki/Visibility
Comment 11 William Hubbs gentoo-dev 2013-07-04 17:37:18 UTC
All,

we need to look at why we are trying to support static linking and
determine if we need to continue doing so instead of just reverting
upstream changes.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2013-07-04 18:04:41 UTC
(In reply to William Hubbs from comment #11)
> All,
> 
> we need to look at why we are trying to support static linking and
> determine if we need to continue doing so instead of just reverting
> upstream changes.

oh, I see now that bug 409277 is already fixed.  for me that means USE=static can be killed from cryptsetup and lvm2.
USE="static udev" for sys-fs/lvm2 and sys-fs/cryptsetup needs libudev.a which then needs libkmod.a
so indeed, upstream is right, static libudev.a and libkmod.a are useless and stupid workaround for sep. /usr idiocy
however building static lvm2 and cryptsetup is explicitely supported by their upstreams by their configure scripts
so there is in fact a conflict of intrest not only between what we want, but also between systemd(udev)/kmod vs. cryptsetup/lvm2 upstreams
so how about getting the upstreams together...?
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2013-07-05 13:16:06 UTC
Ticket filed for cryptsetup upstream:

http://code.google.com/p/cryptsetup/issues/detail?id=167
Comment 14 Pacho Ramos gentoo-dev 2013-08-21 08:14:58 UTC
*** Bug 481772 has been marked as a duplicate of this bug. ***
Comment 15 Pacho Ramos gentoo-dev 2014-05-11 14:15:12 UTC
*** Bug 510062 has been marked as a duplicate of this bug. ***