1 |
Bertrand Jacquin wrote: |
2 |
> How could you compile mplayer or firefox in your 64 bits environnement |
3 |
> to generate 32 bits binary ? I have multilib activated and I can't |
4 |
> build mplayer with CFLAGS="-m32". |
5 |
> |
6 |
> It is needing something else ? |
7 |
> |
8 |
> I don't want too to have and maintain a 32 bit chroot. |
9 |
|
10 |
I'm assuming you're talking about compiling something by hand here. As |
11 |
other people have mentioned here, support for portage to compile |
12 |
arbitrary apps/libs 32-bit or 64-bit isn't there yet (at least in stable |
13 |
portage which is what i'm using), every ebuild for amd64 at the moment |
14 |
chooses either 32-bit or 64-bit (by setting ABI=x86 or ABI=amd64). |
15 |
|
16 |
You need the 32-bit libs (which should go into /lib32 and /usr/lib32) |
17 |
that your application depends on. At a bare minimum, this is going to be |
18 |
libc for C programs, but usually some other libs as well. To make |
19 |
precompiled dynamically linked 32-bit binaries such as mplayer-bin |
20 |
possible, gentoo also supplies the libs needed for these binary ebuilds |
21 |
in /emul/linux/x86 which are installed by the emul-linux-x86-* ebuilds. |
22 |
|
23 |
So, if the app you want to compile by hand uses only these, you can get |
24 |
away with something along the lines of: |
25 |
|
26 |
./configure \ |
27 |
CFLAGS="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" \ |
28 |
LDFLAGS="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" |
29 |
|
30 |
or |
31 |
|
32 |
./configure \ |
33 |
CFLAGS="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" \ |
34 |
LDFLAGS="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" |
35 |
|
36 |
Which one of these two lines you need to use depends on if LDFLAGS gets |
37 |
passed to gcc or ld by the makefile. |
38 |
(see /usr/portage/profiles/default-linux/amd64/2006.0/make.defaults) |
39 |
|
40 |
If the app you want to compile needs additional libs, you'll have to |
41 |
compile them yourself, install them under /usr/local and then compile |
42 |
the app you're interested in -- this probably quickly becomes annoying |
43 |
enough to make a 32-bit chroot so you can let portage+ebuilds do all the |
44 |
work for you. |
45 |
|
46 |
Marco |
47 |
-- |
48 |
gentoo-amd64@g.o mailing list |