Bug 58167 - Makefile tries to install libudev.so.1.2.0 to /lib - and then fails with an error
Summary: Makefile tries to install libudev.so.1.2.0 to /lib - and then fails with an e...
Status: RESOLVED WORKSFORME
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 02:53 UTC by James
Modified: 2013-04-14 13:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description James 2012-12-12 02:53:59 UTC
version: systemd-196
system: debian unstable, i686

Debian currently installs systemd, udev, and pam libraries in /lib, despite the /usr merge.  But still, configuring with "--libdir=/lib" or with "--libexecdir=/lib" or with "--exec-prefix=/" or with "--with-rootlibdir=/lib" makes no distinction between /lib/ and /usr/lib/.  Thus then, installation either fails to install with the error

 libtool: install: error: cannot install `libgudev-1.0.la' to a directory not ending in /usr/lib

or fails to install in /lib/.

Similarly, configuring with "--with-rootlibdir=/lib", install fails with

 libtool: install: error: cannot install `pam_systemd.la' to a directory not ending in /usr/lib/security

1) If "libgudev-1.0.la" has to go into "/usr/lib", then install it to /usr/lib/, not into "libdir" or kin, and similarly, with "pam_systemd.la".  Yes, there is "configure --with-pamlibdir=/usr/lib/security" - but - does that not seem silly, instead of just installing to "/usr/lib/security/"?

2) Please play nicely with others - though you might still try to persuade the Debian Maintainer, Tollef Fog Heen, to stop using /lib/ for systemd.  Does there need to be an additional "configure" option for a /lib/ install?

3) "configure --sysconfdir=DIR" defaults to "/usr/etc".  Again - this would be easier if the default were simply "/etc" instead.


James
Comment 1 Michael Biebl 2012-12-12 13:46:23 UTC
(In reply to comment #0)
> version: systemd-196
> system: debian unstable, i686
> 
> Debian currently installs systemd, udev, and pam libraries in /lib, despite
> the /usr merge.  But still, configuring with "--libdir=/lib" or with
> "--libexecdir=/lib" or with "--exec-prefix=/" or with
> "--with-rootlibdir=/lib" makes no distinction between /lib/ and /usr/lib/. 
> Thus then, installation either fails to install with the error

Could you post the full configure line you used.

> 
> 1) If "libgudev-1.0.la" has to go into "/usr/lib", then install it to
> /usr/lib/, not into "libdir" or kin, and similarly, with "pam_systemd.la". 
> Yes, there is "configure --with-pamlibdir=/usr/lib/security" - but - does
> that not seem silly, instead of just installing to "/usr/lib/security/"?
> 
> 2) Please play nicely with others - though you might still try to persuade
> the Debian Maintainer, Tollef Fog Heen, to stop using /lib/ for systemd. 
> Does there need to be an additional "configure" option for a /lib/ install?

systemd/udev is actually one of those few packages which does support the usr split nicely.
In the Debian we can't for the time being rely on /usr being available during early boot, so we use the following configure flags:


./configure --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --with-rootprefix= --with-rootlibdir=/lib/x86_64-linux-gnu --enable-libcryptsetup --enable-tcpwrap --enable-selinux --enable-gtk-doc --disable-coredump --with-distro=debian

(taken from config.log)

This works nicely, no problems with make install or anything.

> 3) "configure --sysconfdir=DIR" defaults to "/usr/etc".  Again - this would
> be easier if the default were simply "/etc" instead.

That is how every autotools using package works. Unless you specify --sysconfdir, it's based on $prefix. So it works as expected.
Comment 2 Michael Biebl 2012-12-12 13:54:20 UTC
(In reply to comment #1)
> ./configure --prefix=/usr --includedir=${prefix}/include
> --mandir=${prefix}/share/man --infodir=${prefix}/share/info
> --sysconfdir=/etc --localstatedir=/var
> --libdir=${prefix}/lib/x86_64-linux-gnu
                         ^
Just in case: This part is of course not hard-coded, but depends on the architecture. If you don't care for multiarch, you can either strip that part of the path or use i386-linux-gnu for i386(i686) [1].



[1] http://wiki.debian.org/Multiarch/Tuples
Comment 3 Michael Biebl 2012-12-12 13:59:46 UTC
(In reply to comment #1)
> (In reply to comment #0)
> 
> > 3) "configure --sysconfdir=DIR" defaults to "/usr/etc".  Again - this would
> > be easier if the default were simply "/etc" instead.
> 
> That is how every autotools using package works.

Ok, actually not quite true: the default for autotools using packages is --prefix=/usr/local, which makes sysconfdir default to /usr/local/etc.

As systemd explictly set prefix to /usr (instead of using the default /usr/local) it might make sense to also let sysconfdir default to /etc (unless --sysconfdir is passed to configure)
Comment 4 Lennart Poettering 2013-01-14 23:16:11 UTC
Anything to fix here, or can this be closed?
Comment 5 Lennart Poettering 2013-04-14 13:42:08 UTC
No response, closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.