1 |
Chris posted on Sat, 13 Mar 2010 16:21:59 -0500 as excerpted: |
2 |
|
3 |
> Hi all. I'm a bit of a newb on gentoo/emerge.. so forgive me if I'm |
4 |
> reviving the dead horse for yet another flogging. I just subscribed and |
5 |
> posted without lurking/searching. I'm trying to get this package to |
6 |
> compile on my amd64 box to run in dedicated server mode (no GUI |
7 |
> required). My kernel has IA32 support compiled in. |
8 |
> |
9 |
> The package in question is hard masked ~amd64, but can be worked around |
10 |
> with |
11 |
> |
12 |
> ACCEPT_KEYWORDS="~amd64" emerge doomsday |
13 |
|
14 |
That's generally not a recommended way of emerging something, because the |
15 |
next update will want to unmerge it. Instead, add a line like this to |
16 |
your /etc/portage/package.keywords file: |
17 |
|
18 |
=games-fps/doomsday-1.9.0_beta67 ~amd64 |
19 |
|
20 |
That would limit the keyword to that specific version. If you want to do |
21 |
it for the package in general (so when say 1.9.0_beta69 comes out, |
22 |
presumably keyworded ~amd64, portage will automatically upgrade to it), do |
23 |
it this way: |
24 |
|
25 |
games-fps/doomsday ~amd64 |
26 |
|
27 |
That way (either one), portage knows that it's OK for it to keep that |
28 |
package at ~amd64 and won't attempt to unmerge it at the next update. You |
29 |
can then simply "emerge doomsday" and it should work. |
30 |
|
31 |
FWIW, the term /hard/ mask generally refers to packages in package.mask. |
32 |
Such an entry requires a parallel unmask entry in /etc/portage/ |
33 |
package.unmask , if you wish to use it anyway. |
34 |
|
35 |
What you're referring to here is /keyword/ masking. It's rather |
36 |
different. There's arch-stable (amd64 for us), arch-testing (aka ~arch, |
37 |
~amd64 for us), and unkeyworded (for us, no amd64 at all in keywords). If |
38 |
a package is known /not/ to work on an arch or profile (such as |
39 |
amd64/no-multilib), it's also often hard masked but only for that profile. |
40 |
|
41 |
Unkeyworded only for amd64 generally means it simply hasn't been tested on |
42 |
amd64 yet, while no keywords at all indicate an early testing version, |
43 |
often a live sources version or early alpha upstream, or an early ebuild |
44 |
that still has known issues in general. |
45 |
|
46 |
~arch aka arch-testing, ~amd64 in our case, by Gentoo policy means it's |
47 |
reasonably stable upstream and is generally on the path to stable for |
48 |
Gentoo, so is considered appropriate for ~arch users, but it hasn't been |
49 |
fully tested with arch-stable yet. Since by policy a package may not be |
50 |
stabilized until all its dependencies are also stable, the package itself |
51 |
may be stable, but a (perhaps USE flag optional) dependency is still ~arch |
52 |
and not yet ready for stable. The /general/ policy (individual |
53 |
maintainers and packages can differ) is that a package must be in ~arch |
54 |
for 30 days without (significant) bugs before it can be considered for |
55 |
stable. |
56 |
|
57 |
It can be noted that while a package maintainer controls the initial |
58 |
introduction of a new version ebuild and requests stabilization, it's up |
59 |
to the individual arch teams (gentoo/amd64 in our case) to decide whether |
60 |
a package is /actually/ stable on a particular arch. This may take some |
61 |
time as it involves testing of its own, the result being that a keyworded |
62 |
stable package has been tested and found stable by both its maintainer in |
63 |
general, and by the specific arch keywording it. |
64 |
|
65 |
Also note that not every version is necessarily stabilized. For fast |
66 |
developing and releasing packages, several ~arch versions may go by before |
67 |
the maintainer asks for one to be stabilized -- and of course, especially |
68 |
on the minor archs, more may go by and another stable candidate or two may |
69 |
be requested, before the arch team actually gets around to stabilizing one |
70 |
of them. |
71 |
|
72 |
So ~arch is generally far more fast changing than arch-stable. |
73 |
|
74 |
Finally, note that in general (thus, there are exceptions), packages not |
75 |
considered stable upstream are not even candidates for ~arch, since in |
76 |
theory, every ~arch package should be a a candidate for arch-stable. And |
77 |
if there are serious known bugs, a package is normally not even allowed in |
78 |
~arch (and can be masked if already in ~arch). |
79 |
|
80 |
> This package compiles fine, but then segfaults immediately due some |
81 |
> memory allocation issues in the code, thus the mask. |
82 |
|
83 |
This sounds suspicious to me. Wigames-fps/doomsday-1.9.0_beta67th that |
84 |
serious a bug, what is it even doing in ~arch? It sounds to me like it / |
85 |
should/ be hard-masked, thus requiring an entry in package.unmask in |
86 |
ordered to merge it at all, regardless of its keywording. (Or, if that's |
87 |
only an issue on amd64, it shouldn't have the ~amd64 keyword at all and/or |
88 |
should be package.masked in the amd64 profiles.) |
89 |
|
90 |
Unless it's only occurring for some people, presumably due to other issues |
91 |
on their machine. (Maybe it compiles fine for full ~amd64 users, but not |
92 |
for stable amd64 users only ~arch keywording individual packages, due to |
93 |
older gcc or something.) /Then/ it might be only ~amd64, but your |
94 |
implication is that it's doing this for /all/ amd64 users and possibly all |
95 |
users, period, in which case it shouldn't even be ~arch keyworded. |
96 |
|
97 |
> However I should be able to force this package to compile into 32bit |
98 |
> mode. Can anyone take a peek at it for me and give me direction? |
99 |
> |
100 |
> run attempt: |
101 |
> root@lbox:/usr/src/linux# emerge doomsday |
102 |
> |
103 |
> Calculating dependencies... done! |
104 |
> |
105 |
> !!! All ebuilds that could satisfy "games-fps/doomsday" have been |
106 |
> masked. !!! One of the following masked packages is required to complete |
107 |
> your request: - games-fps/doomsday-1.9.0_beta67 (masked by: ~amd64 |
108 |
> keyword) - games-fps/doomsday-1.9.0_beta62 (masked by: missing keyword) |
109 |
> |
110 |
> |
111 |
> Do I require multilib to force x86? |
112 |
> Portage 2.1.6.13 (default/linux/amd64/10.0/no-multilib, gcc-4.3.4, |
113 |
> glibc-2.9_p20081201-r2, 2.6.31-gentoo-r6 x86_64) |
114 |
|
115 |
You don't want to force x86 (32-bit) compile, and it'll likely be |
116 |
considerably more complicated than you're making out to do so. |
117 |
|
118 |
As explained above, the ~amd64 keyword indicates (or /should/ indicate) |
119 |
that it's 64-bit compatible. If it's 32-bit only (generally because it's |
120 |
a precompiled binary, tho it could be simply that the code isn't 64-bit |
121 |
clean, it hasn't been ported yet), it should be package.masked for |
122 |
no-multilib profiles. |
123 |
|
124 |
So you /should/ be able to compile it as 64-bit. If you can't, it's a bug. |
125 |
|
126 |
Meanwhile, if you want to try 32-bit anyway (or just for general |
127 |
information), keep reading: |
128 |
|
129 |
For multilib amd64 users, their toolchain should do both 32-bit and 64- |
130 |
bit, so in theory, they can simply add -m32 to the gcc CFLAGS and force 32- |
131 |
bit compilation. However, since portage doesn't track multiple archs, it |
132 |
won't understand that and will thus consider it a 64-bit package. This |
133 |
quickly leads to breakage so it's NOT recommended. Instead of using |
134 |
portage to do 32-bit compiles (at least those beyond the few that are |
135 |
specially designed for it, that generally do both 32- and 64- bit versions |
136 |
with one package, gcc, glibc, sandbox, etc), therefore, it's recommended |
137 |
that you do all 32-bit builds manually -- that is, outside of portage. Of |
138 |
course that means tracking all the dependencies yourself, which might be |
139 |
OK for a package or two, but quickly gets out of hand if you're doing much |
140 |
more than that. |
141 |
|
142 |
Additionally (still for multilib), there's only a limited number of 32-bit |
143 |
libraries installed to build against, and only a few more available as the |
144 |
prebuild binary emul-linux packages. Once you get beyond these |
145 |
dependencies you have to start manually building and installing 32-bit |
146 |
versions of all the other libraries you need as well as the executables |
147 |
you're trying to install. Building one executable may require a half |
148 |
dozen or more additional dependencies, all manually installed and |
149 |
tracked. This is why it so quickly gets out of hand as the number of |
150 |
packages you want to install this way goes up. |
151 |
|
152 |
For no-multilib users, the only way to compile 32-bit packages is to use a |
153 |
32-bit chroot, as the whole /point/ of no-multilib is that it simplifies |
154 |
things by omitting the 32-bit toolchain and base libraries. Without the |
155 |
chroot, it's 64-bit only. |
156 |
|
157 |
Fortunately, the gentoo/amd64 project maintains a 32-bit chroot guide. |
158 |
Here's a direct link. |
159 |
|
160 |
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=2 |
161 |
|
162 |
The idea is a reasonably simple, but there's a few tricks that make things |
163 |
easier and prevent a few gotchas, thus the guide with the step-by-step, |
164 |
above. |
165 |
|
166 |
In general, you prepare a separate empty directory (I use an entirely |
167 |
different partition, but that's not required) for the chroot, untar a |
168 |
normal x86 stage-3 tarball within, and sort of go about things as if you |
169 |
were building a whole separate 32-bit system to multiboot into. Only |
170 |
unless you actually /do/ want a 32-bit multiboot, you don't have to build |
171 |
things like syslog and the kernel, because the main 64-bit system is your |
172 |
host; you only chroot into the 32-bit side from your 64-bit host. There's |
173 |
a few other tricks and shortcuts as well, like mount-binding various |
174 |
existing directories from your 64-bit host under the 32-bit chroot, so |
175 |
they can be accessed from the chroot as well. This is what the chroot |
176 |
guide covers. |
177 |
|
178 |
But in general, using the chroot, you are then using an entirely separate |
179 |
instance of portage, tracking 32-bit while your main system portage still |
180 |
tracks 64-bit. and likewise, configured for 32-bit (separate CFLAGS, USE |
181 |
flags, the whole bit) as opposed to the 64-bit main system. Since you're |
182 |
using an entirely separate 32-bit instance, you can now let it manage all |
183 |
the dependencies as it normally would, without worrying about it screwing |
184 |
up the 64-bit tracking. Thus, in the chroot, you can emerge 32-bit |
185 |
packages pretty much as you would on an entirely separate machine, and not |
186 |
have to worry about screwing up the main 64-bit system on the one hand or |
187 |
manually tracking all the 32-bit dependencies on the other. The down side |
188 |
is that it's a lot of work, because it's as if you /are/ managing, almost |
189 |
(say 80% of), an entirely separate system. But once you get beyond a |
190 |
couple 32-bit packages, it's still far less trouble than attempting to |
191 |
manage all those compiles and their the dependencies manually. =:^) |
192 |
|
193 |
FWIW, I run a 32-bit chroot here, but fully configured and built out, |
194 |
kernel, syslog, /etc configured, everything, included. But I don't boot |
195 |
it on the main machine and actually couldn't, as the 32-bit kernel isn't |
196 |
configured for that. Instead, I rsync it to my much less powerful |
197 |
netbook, so I can run Gentoo on it while compiling everything on my more |
198 |
powerful main system. The netbook doesn't even have a portage tree on it, |
199 |
tho it was less trouble just keeping portage and the rest of the build- |
200 |
only system in the rsynced image than trying to figure out how to exclude |
201 |
it (tho I do exclude some things). |
202 |
|
203 |
-- |
204 |
Duncan - List replies preferred. No HTML msgs. |
205 |
"Every nonfree program has a lord, a master -- |
206 |
and if you use the program, he is your master." Richard Stallman |