Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442354 - sys-apps/iproute2-3.3.0 fail to cross compile
Summary: sys-apps/iproute2-3.3.0 fail to cross compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-08 15:31 UTC by Bertrand Jacquin
Modified: 2012-11-12 13:25 UTC (History)
0 users

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


Attachments
sys-apps:iproute2-3.3.0:20121108-144418.log (sys-apps:iproute2-3.3.0:20121108-144418.log,40.80 KB, text/plain)
2012-11-08 15:32 UTC, Bertrand Jacquin
Details
files/3.3.0-pkg-config.diff (3.3.0-pkg-config.diff,898 bytes, patch)
2012-11-08 15:33 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2012-11-08 15:31:54 UTC
While trying to cross compile sys-apps/iproute2-3.3.0 for a armv6jl-hardfloat-linux-gnueabi toolchain it failed with the following :

armv6jl-hardfloat-linux-gnueabi-gcc -D_GNU_SOURCE -march=armv6j -mtune=arm6 -mfloat-abi=hard -mlittle-endian -mfpu=vfp -Os -pipe -fomit-frame-pointer  -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/usr/lib/xtables\" -DYY_NO_INPUT -L../lib -Wl,-export-dynamic -shared -fpic -o m_xt.so m_xt.c $(pkg-config xtables --cflags --libs)
/usr/libexec/gcc/armv6jl-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib/libxtables.so when searching for -lxtables
/usr/libexec/gcc/armv6jl-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib/libc.a: could not read symbols: File format not recognized

We get this result as HOST pkg-config is used, and not crossdev wrapper one.

Here is a fix to get it work by inheriting PKG_CONFIG tc-exported in src_configure().

If env variable PKG_CONFIG is not present, pkg-config is used instead.

Attached log failure and patch for iproute2-3.3.0


Reproducible: Always

Steps to Reproduce:
1. USE="iptables" armv6jl-hardfloat-linux-gnueabi-emerge -vat =iproute2-3.3.0
2.
3.
Comment 1 Bertrand Jacquin 2012-11-08 15:32:26 UTC
Created attachment 328818 [details]
sys-apps:iproute2-3.3.0:20121108-144418.log

sys-apps:iproute2-3.3.0:20121108-144418.log
Comment 2 Bertrand Jacquin 2012-11-08 15:33:02 UTC
Created attachment 328820 [details, diff]
files/3.3.0-pkg-config.diff

files/3.3.0-pkg-config.diff
Comment 3 SpanKY gentoo-dev 2012-11-08 16:40:52 UTC
should be all set now in the tree; thanks for the report!

Commit message: Use the correct pkg-config when cross-compiling
http://sources.gentoo.org/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch?rev=1.1
http://sources.gentoo.org/sys-apps/iproute2/iproute2-3.6.0.ebuild?r1=1.1&r2=1.2
Comment 4 Bertrand Jacquin 2012-11-12 13:25:03 UTC
(In reply to comment #3)
> should be all set now in the tree; thanks for the report!
> 
> Commit message: Use the correct pkg-config when cross-compiling
> http://sources.gentoo.org/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.
> patch?rev=1.1
> http://sources.gentoo.org/sys-apps/iproute2/iproute2-3.6.0.ebuild?r1=1.
> 1&r2=1.2

Thanks vapier. And also for http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=e4fc4ada3317ea94452576add25981279d705b14;hp=1465db1a14408fae2cdd9c4f5e80e28f9bdb352e :)