Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322389 - net-misc/asterisk fails to compile with crossdev
Summary: net-misc/asterisk fails to compile with crossdev
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: voip herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 18:24 UTC by Alexander Huemer
Modified: 2010-06-11 15:27 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Huemer 2010-06-01 18:24:14 UTC
I tried to compile net-misc/asterisk 1.6.2.[57] with FEATURES="distcc" on a i386. the distcc buddy is amd64.

...
i686-pc-linux-gnu-gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `menuselect.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `strcompat.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `menuselect_stub.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-attr.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-file.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-node.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-search.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-private.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-string.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `mxml/libmxml.a(mxml-entity.o)' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status

i already tried to change
ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
to
ASTLDFLAGS="${LDFLAGS}" emake CC="$(tc-getCC)" || die "emake failed"

no change. that's all i could do.

Reproducible: Always

Steps to Reproduce:
Comment 1 Patrick Lauer gentoo-dev 2010-06-04 07:32:59 UTC
distcc isn't smart enough for crosscompiling. Don't mix architectures (and gcc versions) like that please, it's guaranteed to fail sooner or later.
Comment 2 Alexander Huemer 2010-06-04 09:55:28 UTC
thanks for your answer.
i use distcc on this machine with a x86_64 compile buddy since 2 years for the whole system. no problems, the only package failing is asterisk.
there is even a gentoo distcc crossdev-compiling guide [1].
in my opinion this is a problem specific to asterisk and should be fixed. i'll help as good as as can.
thanks.

[1] http://www.gentoo.org/doc/en/cross-compiling-distcc.xml
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-06-09 04:02:30 UTC
Yes you can cross compile with distcc, but you have to write these wrappers mentioned in this document. (I just distributed a i686 kernel compilation to 4 amd64 quadcores.) 

And you have to have the exact same versions of the gcc/... tools as crossdev-* on the server as on the client. 

Can you please provide the `emerge --info` of both machine( classe)s? And the versions/categories of your cross-* packages?

Michael
Comment 4 Tony Vroon (RETIRED) gentoo-dev 2010-06-11 15:08:50 UTC
This is not a supported configuration; the Asterisk ebuild is not at fault. All distcc nodes should have the same CHOST.
Comment 5 Alexander Huemer 2010-06-11 15:24:43 UTC
(In reply to comment #4)
> This is not a supported configuration; the Asterisk ebuild is not at fault. All
> distcc nodes should have the same CHOST.
> 
As i already stated, crossdev with different CHOSTS works for me for _all_ installed packages on this machine, currently 499.
please provide a pointer to the document that makes clear that this is not supported. i think [1] proves the opposite. there is no statement about "not supported".

please help me to fix this.

[1] http://www.gentoo.org/doc/en/cross-compiling-distcc.xml
Comment 6 Tony Vroon (RETIRED) gentoo-dev 2010-06-11 15:27:42 UTC
Not a supported configuration. Do not reopen without a patch.