Gentoo Archives: gentoo-dev

From: David Morgan <david.morgan@×××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] what to do when an ebuild needs loads of RAM?
Date: Thu, 18 Nov 2004 23:40:12
Message-Id: e3b422ef0411181540cd06974@mail.gmail.com
In Reply to: Re: [gentoo-dev] what to do when an ebuild needs loads of RAM? by Carsten Lohrke
1 Being the user in question, I thought I'd clarify a few things
2
3
4 On Fri, 19 Nov 2004 00:10:15 +0100, Carsten Lohrke <carlo@g.o> wrote:
5 > On Thursday 18 November 2004 23:42, kosmikus wrote:
6 > > We have had reports from users who tried to build this package on their
7 > > 256Mb machines that the ebuild fails (no surprise there) and that the
8 > > OOM killer takes out X in the process.
9 >
10 > Got a similar bug report. But hey, people know that you have to compile from
11 > source, when using Gentoo. I don't think taking care for every <=500MHz box
12 > low on ram does make sense. Usually you compile on another box, if you have
13 > such a target.
14 >
15 >
16 > Carsten
17 >
18 >
19 >
20
21 Since when is a machine with 256MB "low on ram"? (it's also a P4,
22 though only 1.8GHz, but that's not really relevant) I can usually
23 compile things whilst listening to music and not lose any
24 repsonsiveness most of the time. Running out of memory is also
25 different from having a slow processory - most people probably
26 wouldn't realise that the reason that X had been killed was that
27 they'd run out of RAM (especially considering the problems caused by
28 gcc optimizations not so long ago).
29
30
31 On Thu, 18 Nov 2004 22:55:42 +0000, Ciaran McCreesh <ciaranm@g.o> wrote:
32
33 > Naah, I'd go for the warning with maybe an ebeep. If you really must
34 > have a force thingie, it shouldn't be a USE flag, since USE flags are
35 > for things which affect the resultant program
36
37 The idea isn't to have a USE flag, but to do something like in the
38 xorg-x11-6.8.0-r{2,4} ebuilds:
39
40 pkg_setup() {
41 #################################################
42 ### GET RID OF THIS ONCE THIS EBUILD IS READY ###
43 #################################################
44 if [ -z "${BREAKME}" ]; then
45 die "Set the BREAKME variable to emerge this. It's in development.
46 Stop using it."
47 fi
48
49 Except that it only fails if they don't have enough memory and if the
50 variable isn't set. It's a nasty solution, but it can potentially stop
51 bug reports about X randomly being killed. (After all, there's a high
52 chance that someone won't notice any other sort of warning, beep or
53 no)
54
55 > I'd also be veeeeeeery wary about looking for a certain amount of RAM.
56 > Chances are that the value in question will vary depending upon machine
57 > and arch.
58
59 Agreed, but if you give the user the option to still try the emerge
60 then it's not so bad. Best solution out of a bad lot IMO...
61
62 --
63 gentoo-dev@g.o mailing list

Replies