Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: Marco Matthies <marco-ml@...>
Subject: Re: 64-bit or 32-bit?
Date: Wed, 29 Mar 2006 00:49:05 +0200
Bertrand Jacquin wrote:
> How could you compile mplayer or firefox in your 64 bits environnement
> to generate 32 bits binary ? I have multilib activated and I can't
> build mplayer with CFLAGS="-m32".
> 
> It is needing something else ?
> 
> I don't want too to have and maintain a 32 bit chroot.

I'm assuming you're talking about compiling something by hand here. As 
other people have mentioned here, support for portage to compile 
arbitrary apps/libs 32-bit or 64-bit isn't there yet (at least in stable 
portage which is what i'm using), every ebuild for amd64 at the moment 
chooses either 32-bit or 64-bit (by setting ABI=x86 or ABI=amd64).

You need the 32-bit libs (which should go into /lib32 and /usr/lib32) 
that your application depends on. At a bare minimum, this is going to be 
libc for C programs, but usually some other libs as well. To make 
precompiled dynamically linked 32-bit binaries such as mplayer-bin 
possible, gentoo also supplies the libs needed for these binary ebuilds 
in /emul/linux/x86 which are installed by the emul-linux-x86-* ebuilds.

So, if the app you want to compile by hand uses only these, you can get 
away with something along the lines of:

./configure \
CFLAGS="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" \
LDFLAGS="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"

or

./configure \
CFLAGS="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" \
LDFLAGS="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"

Which one of these two lines you need to use depends on if LDFLAGS gets 
passed to gcc or ld by the makefile.
(see /usr/portage/profiles/default-linux/amd64/2006.0/make.defaults)

If the app you want to compile needs additional libs, you'll have to 
compile them yourself, install them under /usr/local and then compile 
the app you're interested in -- this probably quickly becomes annoying 
enough to make a 32-bit chroot so you can let portage+ebuilds do all the 
work for you.

Marco
-- 
gentoo-amd64@g.o mailing list


Replies:
Re: 64-bit or 32-bit?
-- Bertrand Jacquin
References:
64-bit or 32-bit?
-- JimD
Re: 64-bit or 32-bit?
-- Hemmann, Volker Armin
Re: 64-bit or 32-bit?
-- Jim
Re: 64-bit or 32-bit?
-- Barry . SCHWARTZ
Re: 64-bit or 32-bit?
-- Jim
Re: 64-bit or 32-bit?
-- Barry . SCHWARTZ
Re: 64-bit or 32-bit?
-- Bertrand Jacquin
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: 64-bit or 32-bit?
Next by thread:
Re: 64-bit or 32-bit?
Previous by date:
Re: 64-bit or 32-bit?
Next by date:
Re: suspend2 sources


Updated Jun 17, 2009

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.