Gentoo Archives: gentoo-amd64

From: Cheng Renquan <crquan@×××××.com>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] How to install multilib'ed version of any library (for real multilib for x86 and x86_64 for every libraries)?
Date: Sat, 14 Nov 2009 12:00:23
Message-Id: 91b13c310911140345w6fce2bd1r848b72685c7cd999@mail.gmail.com
1 Hello, gentoo amd64 developers,
2 I found a big problem with gentoo amd64 recently:
3
4 I'm just switching from x86 to amd64 gentoo, several months ago, everything
5 goes well, but now I have a project that need to compile some 32bit binaries;
6 since my gcc and glibc both have multilib support, originally I don't think it's
7 a problem, just like this hellworld.c program:
8
9 $ gcc -o hello helloworld.c # will generate a default
10 hello executable, 64bit;
11 $ gcc -m32 -o hello.x86 helloworld.c # specify to generate a 32bit executable
12
13 So when I want to compile a separate software source, I just setenv
14 CC="gcc -m32"
15 this seems reasonable, but finally it failed with an error,
16
17 http://pastebin.org/52915
18
19 Now I know it's because of this software need 32bit libbfd, while the
20 default 64bit
21 libbfd is provided by sys-devel/binutils, so I need a multilib'ed
22 binutils library,
23 but how do I install a 32bit of libbfd in gentoo way?
24
25 Furthermore, if compiling any other 32bit program on gentoo-amd64, it may need
26 other more 32bit of libraries,
27
28 Comparing other linux distros like fedora-x86_64 and debian-amd64, I knew there
29 is simple way to archive this goal, just install both binutils.x86_64
30 and binutils.i686
31 packages, but on gentoo-amd64, how can we do this in a similarly simple way?
32
33 How about add USE multilib support of every package that contains libraries?
34
35 I have asked this problem on #gentoo-amd64 channel, but seemed no people
36 there knew it, so please someone on the mailing list know how to resolve it?
37
38 Thanks very much,
39
40 --
41 Cheng Renquan (程任全), from Singapore

Replies