Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598988 - sys-fs/udev-232 upgrade marks /lib64/libudev.so.1.6.4 as preserved-lib and removes /usr/lib64/libudev.so symlink
Summary: sys-fs/udev-232 upgrade marks /lib64/libudev.so.1.6.4 as preserved-lib and re...
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:
: 599036 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-05 11:21 UTC by A Blamey
Modified: 2016-11-06 03:28 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge--info.txt,5.74 KB, text/plain)
2016-11-05 11:21 UTC, A Blamey
Details
udev-232-r1.ebuild.diff (udev-232-r1.ebuild.diff,904 bytes, patch)
2016-11-05 12:42 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff
0001-sys-fs-udev-Fixed-installation-of-libudev.so-bug-598.patch (0001-sys-fs-udev-Fixed-installation-of-libudev.so-bug-598.patch,3.81 KB, patch)
2016-11-05 13:55 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description A Blamey 2016-11-05 11:21:18 UTC
Created attachment 452416 [details]
emerge --info

After I upgraded from udev-230-r1 to udev-232 portage reported:

!!! existing preserved libs:
>>> package: sys-fs/udev-232
 *  - /lib64/libudev.so.1
 *  - /lib64/libudev.so.1.6.4
 *      used by /lib64/libdevmapper.so.1.02 (sys-fs/lvm2-2.02.166)
 *      used by /lib64/liblvm2app.so.2.2 (sys-fs/lvm2-2.02.166)
 *      used by /lib64/liblvm2cmd.so.2.02 (sys-fs/lvm2-2.02.166)
 *      used by 6 other files
Use emerge @preserved-rebuild to rebuild packages using these libraries

This then wants to rebuild the following:

[ebuild   R    ] x11-base/xorg-server-1.18.4:0/1.18.4::gentoo  USE="glamor suid udev xorg -dmx -doc -ipv6 -kdrive -libressl -minimal (-selinux) -static-libs -systemd -tslib -unwind -wayland -xephyr -xnest -xvfb" 0 KiB
[ebuild   R    ] x11-drivers/xf86-input-evdev-2.10.4::gentoo  0 KiB
[ebuild   R    ] sys-apps/hwloc-1.11.2:0/5::gentoo  USE="X cairo numa pci svg xml -cuda -debug -gl -opencl -plugins -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R    ] sys-fs/lvm2-2.02.166::gentoo  USE="readline udev -clvm -cman -corosync -device-mapper-only -lvm1 -lvm2create_initrd -openais (-selinux) -static -static-libs -systemd -thin" 0 KiB
[ebuild   R    ] sys-apps/usbutils-008-r1::gentoo  USE="-python" PYTHON_TARGETS="python2_7" 0 KiB

All of these rebuilds fail when the linker cannot find -ludev.  For example with usbutils:

x86_64-pc-linux-gnu-gcc  -march=native -O2 -pipe -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -o lsusb lsusb-lsusb.o lsusb-lsusb-t.o lsusb-names.o lsusb-usbmisc.o -lusb-1.0 -ludev
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status

I reverted to udev-230-r1 and could rebuild these packages successfully again.
I then noticed that udev-230-r1 includes the symlink:

/usr/lib64/libudev.so -> ../../lib64/libudev.so.1.6.4

... whereas udev-232 does not.  This seems to lead to the link failures.  When I upgraded to udev-232 again and manually created the /usr/lib64/libudev.so link the above packages rebuild without error, and they link correctly to /lib64/libudev.so.1.6.4:

#ldd /usr/bin/lsusb
        linux-vdso.so.1 (0x00007fff14711000)
        libusb-1.0.so.0 => /lib64/libusb-1.0.so.0 (0x00007f1f33552000)
        libudev.so.1 => /lib64/libudev.so.1 (0x00007f1f33330000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f1f32f97000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1f32d7b000)
        libcap.so.2 => /lib64/libcap.so.2 (0x00007f1f32b75000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f1f3296d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1f3376b000)

I noted the udev-232 ebuild uses rootlib_LTLIBRARIES now instead of lib_LTLIBRARIES.  Does this result in the missing symlink and preserved-libs confusion?
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-11-05 12:42:40 UTC
Created attachment 452418 [details, diff]
udev-232-r1.ebuild.diff

The ebuild does not install any libudev.so file for native multilib target. 

The attached ebuild patch should fix it. Unfortunately I had to use gen_usr_ldscript to create the libudev.so file in /usr/$(get_libdir)/ again because the pkgconfig file still points to the libdir in /usr/
Comment 2 Mike Gilbert gentoo-dev 2016-11-05 13:04:57 UTC
Good catch on the broken pkgconfig file. I will send a patch upstream for that.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-11-05 13:55:10 UTC
Created attachment 452424 [details, diff]
0001-sys-fs-udev-Fixed-installation-of-libudev.so-bug-598.patch

New patch which does not use gen_usr_ldscript anymore but rather uses an additional patch from floppym who sent a pkgconfig fix upstream. I decided to create a compatibility symlink anyway in case there's software out there that does not use pkg-config when looking for libudev.so.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-11-05 14:14:59 UTC
commit 248f71f97378522f6e981b85c8236b0c7abfb72f
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Sat Nov 5 14:51:43 2016

    sys-fs/udev: Fixed installation of libudev.so (bug #598988).

    Thanks to floppym for reviewing the ebuild patches and creating the
    pkgconfig fix he also sent upstream.

    Package-Manager: portage-2.3.2
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-11-06 03:28:22 UTC
*** Bug 599036 has been marked as a duplicate of this bug. ***