Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504700 - sys-fs/udev-211 fails on ia64 due to missing -lresolv linkage
Summary: sys-fs/udev-211 fails on ia64 due to missing -lresolv linkage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-15 14:46 UTC by SpanKY
Modified: 2014-03-26 06:10 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge-info.log,4.93 KB, text/plain)
2014-03-15 14:46 UTC, SpanKY
Details
Possible fix? (0001-Link-against-lresolv-for-linker-errors-like-tmp-syst.patch,1.13 KB, patch)
2014-03-15 18:48 UTC, Samuli Suominen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2014-03-15 14:46:15 UTC
Created attachment 372732 [details]
emerge --info

might be related to the fact that --gc-sections doesn't work on ia64

libtool: link: ia64-unknown-linux-gnu-gcc -shared  -fPIC -DPIC  src/libudev/.libs/libudev_la-libudev.o src/libudev/.libs/libudev_la-libudev-list.o src/libudev/.libs/libudev_la-libu
dev-util.o src/libudev/.libs/libudev_la-libudev-device.o src/libudev/.libs/libudev_la-libudev-enumerate.o src/libudev/.libs/libudev_la-libudev-monitor.o src/libudev/.libs/libudev_l
a-libudev-queue.o src/libudev/.libs/libudev_la-libudev-hwdb.o  -Wl,--whole-archive ./.libs/libsystemd-internal.a ./.libs/libsystemd-shared.a -Wl,--no-whole-archive  -Wl,--as-needed
 -lrt -ldl  -O2 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-fuse-ld=gold -Wl,--version-script=/var/tmp/portage/sys-fs/udev-211/work/systemd-211/src/li
budev/libudev.sym -Wl,-O1   -pthread -Wl,-soname -Wl,libudev.so.1 -o .libs/libudev.so.1.4.0
cc1: warning: ./src/core: No such file or directory [enabled by default]
/usr/lib/gcc/ia64-unknown-linux-gnu/4.7.3/../../../../ia64-unknown-linux-gnu/bin/ld: Warning: gc-sections option ignored
./.libs/libsystemd-internal.a(libsystemd_internal_la-sd-resolve.o): In function `handle_request':
/var/tmp/portage/sys-fs/udev-211/work/systemd-211/src/libsystemd/sd-resolve/sd-resolve.c:432: undefined reference to `__res_search'
/var/tmp/portage/sys-fs/udev-211/work/systemd-211/src/libsystemd/sd-resolve/sd-resolve.c:430: undefined reference to `__res_query'
collect2: error: ld returned 1 exit status
make: *** [libudev.la] Error 1
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-03-15 15:26:36 UTC
Would something like...

use ia64 { sed -i -e '/use-ld/s:gold:bfd:' configure{,.ac} || die; }
use ia64 && append-ldflags -Wl,--fuse-ld=bfd

...help? I mean, is the problem visible now because >=209 started using GNU gold linker as a default?
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-03-15 15:27:45 UTC
I suppose it makes sense to fix the underlinking just by adding -lresolv anyway...
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-03-15 18:48:31 UTC
Created attachment 372754 [details, diff]
Possible fix?

Does this work?
Comment 4 SpanKY gentoo-dev 2014-03-15 22:46:47 UTC
(In reply to Samuli Suominen from comment #3)

works, thanks
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-03-16 08:14:44 UTC
patch sent to systemd-devel ML for review
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2014-03-19 16:27:29 UTC
Upstream wants to move the -lresolv needing bits out of libsystemd_internal_la_SOURCES and then add the -lresolv
to the new split out library
I don't know if I completely understand what they want, and thus, such patch is propably beyond my scope

They also talked about dropping whole -Wl,-fuse-ld= magic from the configure.ac to let users...and maintainers to select which linker to use
I'll be submitting one of these patches in a minute to their ML to get the issue refreshed again

So while the patch adding -lresolv is correct, they didn't merge it yet

Meanwhile, I've made ia64 use ld.bfd for udev-211 and udev-9999, to avoid
patching Makefile.in and maintainer mode (or Makefile.am and rerunning
autotools)
Will drop such ugly hack very soon :)
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-03-26 04:34:00 UTC
The wrapper library:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=307e6d8304b80000699e81aa988ae315af4ac218

Followed by 212 release, I'll try to get that in today and we can finally close the bug
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-03-26 06:10:17 UTC
212 in Portage, will never stabilize the broken 211