Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472696 - net-dns/host-20070128-r1: Link dynamically to resolv instead of static link
Summary: net-dns/host-20070128-r1: Link dynamically to resolv instead of static link
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: George Shapovalov (RETIRED)
URL:
Whiteboard:
Keywords: PATCH, STABLE
Depends on:
Blocks:
 
Reported: 2013-06-08 21:46 UTC by Bertrand Jacquin
Modified: 2016-02-20 18:25 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,22.47 KB, text/x-log)
2013-06-08 21:47 UTC, Bertrand Jacquin
Details
host-20070128-r1.ebuild-dynlink.diff (host-20070128-r1.ebuild-dynlink.diff,408 bytes, patch)
2013-06-08 21:48 UTC, Bertrand Jacquin
Details | Diff
host-20070128-_IPADDR_T-arch.patch (host-20070128-_IPADDR_T-arch.patch,335 bytes, patch)
2013-06-08 21:55 UTC, Bertrand Jacquin
Details | Diff
host-20070128-r1.ebuild (host-20070128-r1.ebuild,996 bytes, text/plain)
2013-06-08 21:57 UTC, Bertrand Jacquin
Details

Note You need to log in before you can comment on or make changes to this bug.
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