1 |
having x86 in your keywords is an astronomically dumb idea. if you want me to |
2 |
explain in detail /why/ it's a VERY dumb idea, I'll try my best to do so... |
3 |
|
4 |
ebuilds test for keywords the same way they test for use flags, with "arch?" |
5 |
in dependency lines and "use arch" inside functions. since your |
6 |
ACCEPT_KEYWORDS has x86 in it, these tests to see if you're on an x86 box |
7 |
will succeed and the ebuild will configure your install for an x86 box... |
8 |
|
9 |
one of the more harmless (i assume) examples of this is in the mplayer ebuild. |
10 |
with x86 in your keywords, it installs the 32bit win32codecs. your 64bit |
11 |
mplayer cant make use of these codecs, and if it somehow manages to try it |
12 |
will crash. here is a snippet of the runtime dependency line from the ebuild: |
13 |
|
14 |
x86? ( >=media-libs/xvid-0.9.0 |
15 |
>=media-libs/divx4linux-20030428 |
16 |
>=media-libs/win32codecs-0.60 ) |
17 |
|
18 |
another example of what could happen is that an ebuild might fetch a 32bit |
19 |
binary for a package that would otherwise work and have proper deps on amd64 |
20 |
when x86 is NOT in your keywords. a large enough number of ebuilds use 'x86?' |
21 |
to set the SRC_URI, or location of the file that needs to be downloaded. one |
22 |
example i'll just pull out of the air (that may or may not be relevant): |
23 |
|
24 |
sys-devel/ld.so/ld.so-1.9.11-r3.ebuild:SRC_URI="x86? |
25 |
( ftp://ftp.ods.com/pub/linux/${P}.tar.gz )" |
26 |
|
27 |
another example for that one is mplayerplug-in, which allows for using mplayer |
28 |
to play any media format it supports inside mozilla. it works on amd64... |
29 |
that is, unless you happen to have x86 in your keywords. with x86 in your |
30 |
keywords: |
31 |
|
32 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz |
33 |
x86? |
34 |
( ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.6/${GECKO_SDK} )" |
35 |
|
36 |
and also: |
37 |
|
38 |
src_compile() { |
39 |
local myconf |
40 |
use x86 && myconf="${myconf} --with-gecko-sdk=${WORKDIR}/gecko-sdk" |
41 |
econf ${myconf} || die |
42 |
emake || die |
43 |
} |
44 |
|
45 |
that gecko-sdk is x86-only and will break your build. |
46 |
|
47 |
what about another example? sure... I've got plenty of them. I mean, the tree |
48 |
is seriously FULL of em!! Hey, what about mozilla-firefox-bin? right-o! |
49 |
mozilla-firefox-bin is amazing on amd64, since it allows you to use all of |
50 |
those 32bit mozilla plugins, such as flash, without screwing up 64bit |
51 |
applications that NEED a 64bit mozilla (such as epiphany, nautilus, etc). |
52 |
here's the runtime dependency line: |
53 |
|
54 |
RDEPEND="x86? ( >=sys-libs/lib-compat-1.0-r2 ) |
55 |
amd64? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) |
56 |
x86? ( =x11-libs/gtk+-2.2* ) |
57 |
amd64? ( >=app-emulation/emul-linux-x86-gtklibs-1.0 ) |
58 |
virtual/x11 |
59 |
!net-www/mozilla-firefox" |
60 |
|
61 |
lets take a look at the first dep, lib-compat. lib-compat contains |
62 |
compatibility libs for running libc5 programs and other old apps. these |
63 |
things have never existed on amd64. |
64 |
|
65 |
>>> Unpacking lib-compat-1.3.tar.bz2 to /var/tmp/portage/lib-compat-1.3/work |
66 |
/usr/sbin/ebuild.sh: line 20: |
67 |
cd: /var/tmp/portage/lib-compat-1.3/work/lib-compat-1.3/amd64: No such file |
68 |
or directory |
69 |
|
70 |
OOPS. i'd like to note that the 32bit emul-linux-x86 libraries have all you |
71 |
need to run mozilla-firefox-bin on amd64. |
72 |
|
73 |
hey, here's an example of something just failing to install properly because |
74 |
you have x86 in your keywords... xcdroast. here's part of the install |
75 |
function: |
76 |
|
77 |
use x86 && newbin ${DISTDIR}/cdrecord-prodvd-2.01a12-i586-pc-linux-gnu |
78 |
cdrecord.prodvd |
79 |
|
80 |
yup. hey, how about x86 specific device drivers? the glide library isn't |
81 |
currently working on amd64... however, if you have 3dfx in USE and x86 in |
82 |
your keywords... |
83 |
|
84 |
if use x86 || use alpha |
85 |
then |
86 |
# build with glide3 support? (build the tdfx_dri.o module) |
87 |
if use 3dfx |
88 |
then |
89 |
echo "#define HasGlide3 YES" >> config/cf/host.def |
90 |
fi |
91 |
fi |
92 |
|
93 |
...you might just get a broken xfree or xorg-x11. |
94 |
|
95 |
another prime example is mjpegtools, which enables 32bit assembly if x86 is in |
96 |
your keywords. 32bit assembly that a 64bit compiler would see and immediately |
97 |
shit itself over. |
98 |
|
99 |
of course, there are other perfectly harmless examples... like the one in |
100 |
linux-headers: |
101 |
|
102 |
# This patch fixes an issue involving the use of gcc's -ansi flag and the |
103 |
__u64 datatype. |
104 |
# It only patches asm-i386, so we only apply it if x86. Unknown if this |
105 |
is needed for other archs. |
106 |
# Closes Bug #32246 |
107 |
if [ -n "`use x86`" ]; then |
108 |
epatch ${FILESDIR}/${PN}-strict-ansi-fix.patch |
109 |
fi |
110 |
|
111 |
...but most of them arent that harmless. |
112 |
|
113 |
'x86?' appears in my snapshot of the portage tree 225 times. |
114 |
'use x86' appears in my snapshot of the portage tree an additional 135 times. |
115 |
|
116 |
IF YOU HAVE X86 IN YOUR KEYWORDS DONT EVEN /THINK/ OF REPORTING /ANY/ BUG YOU |
117 |
HAVE IN YOUR SYSTEM. It's a waste of quality assurance time that could be |
118 |
spent doing something usefull that could actually improve gentoo for amd64. |
119 |
|
120 |
lesson of the day? when three devs mention over the course of maybe a week |
121 |
that adding x86 to ACCEPT_KEYWORDS is a bad idea, they might actually know |
122 |
what they're talking about. |
123 |
|
124 |
as an aside, I agree that we've poorly neglected the stable version of gentoo |
125 |
for amd64. up until recently, the tech notes mentioned that if you wanted a |
126 |
usefull system at all, you need ~amd64 in your keywords. I dont think I know |
127 |
of many people who are /not/ using ACCEPT_KEYWORDS="~amd64"... as a result, |
128 |
stable isn't as stable or well tested as testing. I tried getting a number of |
129 |
important base packages marked stable in time for the 2004.1 release, but I |
130 |
didnt bother with much not included in a normal stage3. I think this has |
131 |
really brought to light the fact that we need to seriously concentrate on |
132 |
marking packages stable once the 2004.1 release is made. Please keep in mind |
133 |
that you could count the number of active Gentoo/AMD64 devs on one hand... |
134 |
|
135 |
|
136 |
Travis Tilley <lv@g.o> |
137 |
Gentoo/AMD64 bug stomper extraordinaire |
138 |
(or, the dude who has to deal with your bug reports and will refuse to touch |
139 |
them if he realizes you have x86 in your keywords and are thus wasting his |
140 |
time) |
141 |
|
142 |
|
143 |
On Saturday 10 April 2004 06:57 pm, Sven Köhler wrote: |
144 |
> > The scenario Meir mentions is basically the lazy-man's way out of |
145 |
> > updating and maintaining a useful portage for the Gentoo/amd64 community. |
146 |
> |
147 |
> well, if i use ~amd64 i get the ebuilds that are to new, if i use amd64 |
148 |
> only, i get ebuilds that are very old. gnome-2.4.2 for example is still |
149 |
> masked for amd64 - i don't think that there were much changes from |
150 |
> gnome-2.4.0 (which is marked as stable for amd64) to gnome-2.4.2 that |
151 |
> prevent it compiling on amd64. |
152 |
> |
153 |
> the best way to overcome that dilemma is to use ACCEPT_KEYWORDS="amd64 |
154 |
> x86". Using ACCEPT_KEYWORDS="amd64 ~amd64" would also give me gnome-2.6 |
155 |
> for exmaple, but i don't want that, since the ebuilds are not ready yet, |
156 |
> and it seems to be a common practice to modify ebuilds without changing |
157 |
> the "-rX" part of the ebuilds version, and portage doesn't check if a |
158 |
> ebuild has been modified. |
159 |
|
160 |
-- |
161 |
gentoo-dev@g.o mailing list |