Gentoo Archives: gentoo-user

From: "Roland Häder" <r.haeder@×××.de>
To: gentoo-user@l.g.o
Subject: Aw: [gentoo-user] Re: Some essential packages fail to compile
Date: Sat, 08 Sep 2012 13:25:36
Message-Id: trinity-252dd9c5-0267-4b95-bbe1-67702dca9dcc-1347110615442@3capp-webde-bs08
In Reply to: Aw: [gentoo-user] Re: Some essential packages fail to compile by "Roland Häder"
1 > > > Isn't it a requirement that all nodes run Gentoo, with the same GCC
2 > > version, and you must setup sys-devel/crossdev on each of them?
3 > >
4 > > I don't see how it could possibly work otherwise.
5 > >
6 I see the same thing. The next text block I wrote that I have Debian 64 bits (aka AMD64) on all other nodes and it is always possible to compile 32 bit programs/lib/whatever on 64 bit host system. That is called cross-compiling. The named package "crossdev" is NOT available on Debian systems and so I wont uninstall my Debian AMD64 on all other nodes only to compile 32 bits, there must be an other way.
7
8 One way is (if you have read any 'environment' files in my tar archive) to set the guest architecture explitcitly in /etc/(portage/)make.conf which I did.
9
10 That will tell every compiler (if provided by call parameters) to use the right architecture explicitly and that will always allow to compile 32 bit on 64 bit host systems. To say it again, this is already done on my Gentoo's /etc/(portage/)make.conf file and I quote the relevant parts for you again:
11
12 /etc/make.conf:
13 CFLAGS="-O2 -march=i686 -pipe -fPIC -m32"
14 CXXFLAGS="${CFLAGS}"
15 CHOST="i486-pc-linux-gnu"
16
17 I left the default CHOST as is and on the Debian systems I provided the required compiler.
18
19 Here is an example which I try to explain:
20 --------------------------
21 /usr/lib/gcc/i486-pc-linux-gnu/4.5.3/../../../../i486-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/conf.o' is incompatible with i386 output
22 --------------------------
23
24 One of the nodes has compiled a 64 bit object (conf.o) which the linker (running on 32 bit) tried to link to a 32 bit program/library (the output).
25
26 So for me, the Makefile in that package (klibc) didn't provide the specified CFLAGS I configured which needs fixing, if my assuming is right. I can deeper more investigate here.
27
28 From that same package' Makefile (found in /var/tmp/portage/bla/blub/work/ directory):
29
30 export HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
31
32 I think this line only needs to be extended with $(CFLAGS) then the fix is complete.
33
34 All other packages have same symtomes (missing $CLFAGS from /etc/make.conf) and can be fixed in similar or same way.
35
36 Regards,
37 Roland

Replies

Subject Author
Re: Aw: [gentoo-user] Re: Some essential packages fail to compile Andrea Conti <alyf@××××.net>