Summary: | 32 bit builds fail with icecream on amd64 machines | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | John M. Drescher <drescherjm> |
Component: | New packages | Assignee: | Gentoo Cluster Team <cluster> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bluebird, jer |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Build log for wine-1.1.0 on an amd64 machine using icecream
This one should work. Sorry about selecting text for the last one. |
Description
John M. Drescher
2008-07-25 15:25:57 UTC
Did you emerge the appropriate cross compilers to build x86 binaries on x86_64 hosts? Maybe [1] can help you, otherwise perhaps the documentation needs to be extended to include icecream besides distcc. [1] http://www.gentoo.org/doc/en/cross-compiling-distcc.xml No, I did not do this. However building x86 packages from x86 hosts on the amd64 icecream hosts works without any problems. I believe the reason why this works is the client sends the a small build environment to each compile host and uses that for the compile. This build environment ends up in /var/cache/icecream Here is that folder from 1 amd64 build host: icecream # ls -al total 0 drwxr-xr-x 5 root root 136 Jul 2 11:10 . drwxr-xr-x 15 root root 416 Jun 25 12:14 .. drwxr-xr-x 2 icecream icecream 104 Jul 2 11:10 native drwxr-xr-x 5 root root 192 Jul 23 19:07 target=i686 drwxr-xr-x 5 root root 192 Jul 23 19:08 target=x86_64 John (In reply to comment #2) Cross-compiling with icecream works differently, I started writing some documentation(bug 230989) but it didn't make it to the official space yet. However the AMD64 profile he's using has a biarch compiler, so there's no need for a separate (x86) cross-compiler. (In reply to comment #3) You believe correctly :) Can you attach the complete build.log, please? To create 32 bit code on AMD64 you need to pass -m32 to the compiler(and sometimes set the LDEMULATION environment variable) but when looking at the forums thread it looks as if you are not using -m32 at all...which is strange, cause afaik the default is -m64 on AMD64. Created attachment 162215 [details]
Build log for wine-1.1.0 on an amd64 machine using icecream
I thought that -m32 needed to be used and I was a little confused how wine was compiled when I did not see the -m32 in the building process.
Attached is the build.log.
Created attachment 162217 [details]
This one should work. Sorry about selecting text for the last one.
Adding toolchain because I think this is a bug in multilib_toolchain_setup from multilib.eclass. Wine uses "multilib_toolchain_setup x86" which sets CC to "x86_64-pc-linux-gnu-gcc". That makes wine's configure script end up with CC="x86_64-pc-linux-gnu-gcc" CXX="g++ -m32" LD="ld -m elf_i386" and AS="as --32". Therefore it works if it's compiled lokally but not when using icecream. Wine's default value for CC is "gcc -m32", shouldn't multilib_toolchain_setup set something like "gcc $(get_abi_CFLAGS $1)"? Multilib_toolchain_setup checks for app-admin/eselect-compiler which has been removed from the tree 8 months ago. BTW, This also fails for the x86 part of glibc build on the same 64 bit machine. And the machine builds both versions fine if icecream is disabled. It's not a toolchain bug, it's just me not knowing about a secret Gentoo-gcc feature, sorry for the spam ;) The bug is that icecream ignored the ${CFLAGS_${ABI}} environment variable. Gentoo's gcc has a special features to make doing multilib stuff easier(sort of a workaround for broken Makefiles), with it you can do this: touch empty.c export ABI="x86" export CFLAGS_x86="-m32" x86_64-pc-unknown-linux-gnu-gcc -c empty.c file empty.o It's the same as executing "86_64-pc-unknown-linux-gnu-gcc -m32 -c empty.c" but icecream didn't know about this environment variable and therefore didn't pass it to the helper boxes. Fixed in sys-devel/icecream-0.9.1-r2. Thanks for fixing this so quickly! I will test ASAP. |