1 |
"Boky Boky" <verynotbad@×××××.com> posted |
2 |
e8666cf90612160745k19aa5622ueb3c7e84295285bc@××××××××××.com, excerpted |
3 |
below, on Sat, 16 Dec 2006 16:45:24 +0100: |
4 |
|
5 |
> Anyways, is it possible to emerge the same package in parallel? As |
6 |
> 32-bit and 64-bit version? |
7 |
> |
8 |
> Something in the lines of: |
9 |
> ABI="amd64,x86" emerge libxml2 |
10 |
> |
11 |
> or: |
12 |
> emerge libxml2 |
13 |
> ABI="x86" emerge |
14 |
> --some-option-to-ignore-already-installed-package-and-not-remove-it |
15 |
> libxml2 |
16 |
|
17 |
> Namely, I am trying to compile openoffice (using ABI="x86") and some GTK |
18 |
> themes. |
19 |
> |
20 |
> openoffice depends one some packages (libxml2, libz, ...) that need |
21 |
> therefore need to exist in 32-bit and I'd like to have firefox (...and |
22 |
> other 32bit apps) themed not just with themes that come with emul-* |
23 |
> packages. |
24 |
|
25 |
You can do what you are trying to do, but it's more work than it might |
26 |
first appear. |
27 |
|
28 |
The problem is that portage isn't multi-ABI aware. As far as it is |
29 |
concerned, if a dependency is merged for one or the other, it's merged, |
30 |
period. If you merge a second ABI, it will erase what it knows of the |
31 |
first. |
32 |
|
33 |
There are as a result very specific cautions against trying to merge both |
34 |
ABIs using the same portage database. It can and likely WILL screw up |
35 |
your system BIG TIME, because portage won't have the foggiest which end is |
36 |
up or down in terms of what's installed for what bitness, once you start |
37 |
to mix them. |
38 |
|
39 |
As I said, however, there IS a way to do it -- actually two, but in |
40 |
general only one solution of the two will fit your needs. |
41 |
|
42 |
The first way works best if you only have a few second-ABI things you wish |
43 |
to install, using the emul- or -bin stuff for the rest. Basically, this |
44 |
method consists of installing everything "extra" that you need for the |
45 |
second ABI manually -- without using portage directly. You get the |
46 |
tarball, unpack it, verify that you have the dependencies it needs in the |
47 |
desired ABI (you either have them as -emul/-bin or you already did |
48 |
this same process with them), apply any desired patches, configure, build, |
49 |
and install, all manually. You can look at the ebuild script to see if it |
50 |
does anything special and do the same things manually if you want the same |
51 |
thing that the ebuild /would/ give you, but you don't do it with portage |
52 |
so it's not in the portage database and therefore can't screw it up. The |
53 |
CFLAGS for 32-bit would include -m32, and when you run configure, you'd |
54 |
supply the command line options to point it at the 32-bit libraries and |
55 |
etc. |
56 |
|
57 |
The second way works best if you have more than a handful of things to |
58 |
build, because it's a bigger hassle to setup initially, but all the usual |
59 |
stuff is automated after that. Basically, you setup a 32-bit chroot that |
60 |
has most of a 32-bit system -- leaving out stuff like the kernel and |
61 |
system services of course because you have them in 64-bit mode already, |
62 |
but starting from a regular x86 stage-whatever and building all the |
63 |
supporting libraries and other dependencies as 32-bit, using a second |
64 |
chrooted 32-bit only version of portage, with its own database (you can |
65 |
point it at the same portage tree, of course), so it's not going to |
66 |
overwrite your main system 64-bit database. |
67 |
|
68 |
There's a HOWTO for doing the 32-bit chroot. I'll link it below. This is |
69 |
covered there but sketching it out briefly... You can make use of the |
70 |
mount --bind option to remount filesystems or portions of filesystems |
71 |
(directories) so they are seen in both the original location and in the |
72 |
chroot. It's often convenient to mount /home and /tmp, and your portage |
73 |
tree, this way, for instance, while keeping stuff like /usr separate, so |
74 |
merges in the chroot have no chance of overwriting your 64-bit stuff |
75 |
outside the chroot. Except for maintaining the chroot, for which you'll |
76 |
always want to go into the chroot to avoid the possibility of overwriting |
77 |
your main system, it's possible to add the 32-bit paths and library paths |
78 |
(for ld) to your main paths and run both 32-bit and 64-bit stuff from your |
79 |
main system outside the chroot. If you have the same executables merged |
80 |
in both 32-bit and 64-bit, the order of your path will naturally determine |
81 |
which one is called if you don't specify the one you want by specifying |
82 |
the path with the command. |
83 |
|
84 |
Of course, with the 32-bit chroot, you are building most of a 32-bit |
85 |
system anyway, so it's not hard (simpler but more building to do, so |
86 |
take your pick) to go all the way if desired, building the 32-bit kernel |
87 |
and services, after which you can add a 32-bit boot option to your |
88 |
grub/lilo boot menu and dual boot, if desired. =8^) |
89 |
|
90 |
Official Gentoo/amd64 32-bit chroot HOWTO: |
91 |
http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml |
92 |
|
93 |
For a variation on the 32-bit chroot that involves creating it, then |
94 |
using it to build your own 32-bit emul- packages that you can merge on |
95 |
your 64-bit system without screwing up its database, check here. (This is |
96 |
NOT official Gentoo, just something a Gentoo/amd64 user put up. I'm not |
97 |
sure if it's fully upto date, but the idea will remain the same even if |
98 |
you have to tweak the specifics a bit.) It's worth a read, anyway, just |
99 |
to see how it can be done, whether you choose to do it yourself or not. |
100 |
|
101 |
Unofficial (User's) Gentoo/amd64 Creating your own 32-bit emul packages |
102 |
HOWTO: http://www.andyjeffries.co.uk/32bit-ebuild-amd64.html |
103 |
|
104 |
-- |
105 |
Duncan - List replies preferred. No HTML msgs. |
106 |
"Every nonfree program has a lord, a master -- |
107 |
and if you use the program, he is your master." Richard Stallman |
108 |
|
109 |
-- |
110 |
gentoo-amd64@g.o mailing list |