From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FON1E-00059c-16 for garchives@archives.gentoo.org; Tue, 28 Mar 2006 22:50:32 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.5) with SMTP id k2SMn7bn028360; Tue, 28 Mar 2006 22:49:07 GMT Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by robin.gentoo.org (8.13.6/8.13.5) with SMTP id k2SMn6pL011317 for ; Tue, 28 Mar 2006 22:49:06 GMT Received: (qmail invoked by alias); 28 Mar 2006 22:49:06 -0000 Received: from d142057.adsl.hansenet.de (EHLO [192.168.2.189]) [80.171.142.57] by mail.gmx.net (mp001) with SMTP; 29 Mar 2006 00:49:06 +0200 X-Authenticated: #25576946 Message-ID: <4429BD61.3030504@gmx.net> Date: Wed, 29 Mar 2006 00:49:05 +0200 From: Marco Matthies User-Agent: Thunderbird 1.5 (X11/20051201) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org MIME-Version: 1.0 To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] 64-bit or 32-bit? References: <20060326103301.7e4228b6@keelie.localdomain> <200603261950.46387.volker.armin.hemmann@tu-clausthal.de> <20060326182742.GA11979@icecream> <20060326212026.GA23407@crud.crud.mn.org> <20060326230814.GA10306@icecream> <20060327001008.GA13659@crud.crud.mn.org> <43872d370603280717w2b6ccbd9l9dae6e21a9a927d2@mail.gmail.com> In-Reply-To: <43872d370603280717w2b6ccbd9l9dae6e21a9a927d2@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Archives-Salt: d4dfd233-5c46-4d2e-b69d-2e1932f8dfd4 X-Archives-Hash: a3d2969415eccd6897b4b7178238551e 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@gentoo.org mailing list