Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 472696

Summary: net-dns/host-20070128-r1: Link dynamically to resolv instead of static link
Product: Gentoo Linux Reporter: Bertrand Jacquin <bertrand>
Component: Current packagesAssignee: George Shapovalov (RETIRED) <george>
Status: RESOLVED WONTFIX    
Severity: normal CC: bertrand, floppym
Priority: Normal Keywords: PATCH, STABLE
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=564048
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
host-20070128-r1.ebuild-dynlink.diff
host-20070128-_IPADDR_T-arch.patch
host-20070128-r1.ebuild

Description Bertrand Jacquin 2013-06-08 21:46:38 UTC
When builing net-dns/host-20070128-r1, binary is linked with "/usr/$(get_libdir)/libresolv.a" as defined in src_compile() in ebuild :

  emake CC="$(tc-getCC)" RES_LIB="/usr/$(get_libdir)/libresolv.a"

This lead to error when trying to cross compile it :

/usr/libexec/gcc/i586-pc-linux-gnu/ld: i386:x86-64 architecture of input file `/usr/lib/libresolv.a(res_comp.o)' is incompatible with i386 outpu

Full log attached, and a patch proposol do dynamically link it so we avoid to define the full libresolv.a path which in case of cross compile should composed by $ROOT which is not safe as defined in PMS.

Reproducible: Always

Steps to Reproduce:
1. crossdev -t i586-pc-linux-gnu
2. i586-pc-linux-gnu-emerge -vat net-dns/host
3.
Comment 1 Bertrand Jacquin 2013-06-08 21:47:12 UTC
Created attachment 350446 [details]
build.log
Comment 2 Bertrand Jacquin 2013-06-08 21:48:32 UTC
Created attachment 350448 [details, diff]
host-20070128-r1.ebuild-dynlink.diff
Comment 3 Bertrand Jacquin 2013-06-08 21:55:47 UTC
Created attachment 350450 [details, diff]
host-20070128-_IPADDR_T-arch.patch

This patch avoid using sed in src_prepare(), that sed break vim syntax colorisation and sed result is the same in every case.
Comment 4 Bertrand Jacquin 2013-06-08 21:57:13 UTC
Created attachment 350452 [details]
host-20070128-r1.ebuild

Here is an attempt to migrate the ebuild to EAPI 5
Comment 5 Mike Gilbert gentoo-dev 2013-06-08 22:46:15 UTC
Ugh, that ipaddr_t check is ugly. A sizeof(int) check would make more sense there. Or just use the C99 "uint32_t" from stdint.h.
Comment 6 Bertrand Jacquin 2015-10-10 13:01:36 UTC
Pull request: https://github.com/gentoo/gentoo/pull/176
Comment 7 Pacho Ramos gentoo-dev 2016-02-20 18:25:25 UTC
removed