Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: Beso <givemesugarr@...>
Subject: Re: Re: unable to emerge anything
Date: Wed, 6 Feb 2008 14:25:24 +0000
<br><br><div><span class="gmail_quote">2008/2/6, Duncan &lt;<a href="mailto:1i5t5.duncan@..." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">1i5t5.duncan@...</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Beso &lt;<a href="mailto:givemesugarr@..." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">givemesugarr@...</a>&gt; posted<br><a href="mailto:d257c3560802060159q3a5b0334gd40b5d8b25aa348f@..." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">d257c3560802060159q3a5b0334gd40b5d8b25aa348f@...</a>, excerpted<br>

below, on&nbsp;&nbsp;Wed, 06 Feb 2008 09:59:29 +0000:<br><br>&gt;&gt; CFLAGS=&quot;-march=athlon64 -O2 -pipe&quot;<br>&gt;<br>&gt;<br>&gt; i suggest this flags instead of yours usually they&#39;re a little more<br>&gt; processor based and are not experimental ones as usually they say about<br>

&gt; them:<br>&gt; CFLAGS=&quot;-Os -march=k8 -mno-tls-direct-seg-refs -mmmx -msse3 -pipe<br>&gt; -fomit-frame-pointer&quot;<br><br>-fomit-frame-pointer is the default for -O and above on amd64/x86_64, as<br>it doesn&#39;t interfere with debugging here as it does on 32-bit x86, so<br>

omitting it saves on complexity without changing the compiled result.&nbsp;&nbsp;Of<br>course, it&#39;s still useful for 32-bit, but there&#39;s only a very few<br>programs that portage compiles as 32-bit on amd64 anyway (and even there,<br>

CFLAGS aren&#39;t really used except for sandbox, because gcc does its own<br>bootstrapping and glibc is considered critical enough it basically sets<br>its own very strict CFLAGS in the ebuild).</blockquote><div><br>i tend to always add it since i don&#39;t want to always look at what the arch would do later.<br>

</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-Os I used to use, for reasons explained in detail in a post to the list<br>some time ago but briefly, cache size restrictions tend to matter more<br>

than pure cycle optimization on modern processors, so -Os generally made<br>more sense to me than -O2.&nbsp;&nbsp;However, with gcc-4.2, several optmizations<br>that used to be in -Os only, made it into -O2, and -O2 now includes a<br>

couple of cache optimizers that raw size optimization misses, so it&#39;s not<br>as critical, now.&nbsp;&nbsp;Given that -O2 tends to be the recommended for Gentoo<br>and more widely tested than -Os, I&#39;ve therefore switched back to it.</blockquote>

<div><br>i tend to think that Os should be gentoo&#39;s default, since it adds some options for cache and disk occupation and since i&#39;ve always been good with it.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

-mmmx is included in the default for -march=k8, so that should be<br>superfluous.&nbsp;&nbsp;However, -msse3 is NOT included, as the original amd chips<br>didn&#39;t have it.&nbsp;&nbsp;Newer amd CPUs DO include sse3 (look for pni in the<br>

flags line(s) of /proc/cpuinfo), so unlike -mmmx it&#39;s worth specifying<br>-msse3 if your CPU has it.</blockquote><div><br>when i&#39;ve added it it wasn&#39;t included by default. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

What about -mno-tls-direct-seg-refs?&nbsp;&nbsp;Why do you use that?&nbsp;&nbsp;The gcc<br>manpage doesn&#39;t have enough info to convince me it&#39;s useful, and in fact,<br>implies the reverse, since it defaults glibc folks to using it, which<br>

implies a reason for that default.&nbsp;&nbsp;I&#39;d therefore love to see a<br>discussion of the flag with enough information to justify a better<br>informed decision, as yours presumably is given your depth of knowledge<br>and activity on this list.</blockquote>

<div><br>this should help with virtualizazion apps. xen won&#39;t work well without it with large system memory. without xen or other virt apps this shouldn&#39;t influence much on the packages.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

FWIW, here&#39;s my CFLAGS.&nbsp;&nbsp;CXXFLAGS are similar, minus -combine (mentioned<br>below) and -freorder-blocks-and-partition (for similar reasons).<br>-combine and -ftree-vectorize still cause occasional problems, which I<br>

avoid on a case by case basis as I encounter them, with an appropriate<br>entry in /etc/portage/env/&lt;cat&gt;/&lt;pkg&gt;, but in general, these flags have<br>worked well for me for some time.&nbsp;&nbsp;I can explain why I use each one if<br>

anyone wants to know.<br><br>CFLAGS=&quot;-march=k8 -msse3 -O2 -pipe -frename-registers -fweb -ftree-<br>vectorize -freorder-blocks-and-partition -combine -fgcse-sm -fgcse-las -<br>fgcse-after-reload -fmerge-all-constants&quot;<br>

<br>&gt;&gt; CXXFLAGS=&quot;-march=athlon64 -O2 -pipe&quot;<br>&gt;<br>&gt; this is the same and is faster to write and to have it updated.<br>&gt; CXXFLAGS=&quot;${CFLAGS}&quot;<br><br>The exception would be if your CFLAGS include things like -combine, which<br>

doesn&#39;t work so well on C++ so shouldn&#39;t be in CXXFLAGS.&nbsp;&nbsp;(For -combine<br>specifically, gcc ignores it in such cases, but spits a warning, which<br>various configure scripts interpret as a problem causing them to screwup,<br>

so it&#39;s best to leave it out of CXXFLAGS entirely.)<br><br>&gt; also add:<br>&gt; LDFLAGS=&quot;-Wl,--as-needed,-O1 -Wl,--enable-new-dtags -Wl,--sort-common<br>&gt; -s&quot;<br><br>Could you point me to documentation on LDFLAGS in general, or at least<br>

--enable-new-dtags and --sort-common?&nbsp;&nbsp;I use --as-needed already<br>( documentation at <a href="http://www.gentoo.org/proj/en/qa/asneeded.xml" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.gentoo.org/proj/en/qa/asneeded.xml</a> ), as<br>
well as -z,now (security thing as mentioned in portage&#39;s QA warnings if<br>
you have them enabled for setuid/setgid applications, but I find it<br>useful in general, and no, it doesn&#39;t simply counteract --as-needed), but<br>have yet to find a resource even close to as helpful for LDFLAGS in<br>

general as &quot;man gcc&quot; is for CFLAGS, so I&#39;m left asking about them one at<br>a time as I see them, and I&#39;ve not seen those yet.&nbsp;&nbsp;Again, a discussion<br>with enough info to make an informed decision would be invaluable!&nbsp;&nbsp;I<br>

don&#39;t even know what the options are at this point, and that&#39;s<br>frustrating!</blockquote><div><br><span class="postbody">--sort-common is to prevent gaps between symbols due to alignment constraints, presumably increasing efficiency layout.&nbsp;
<br>here&#39;s an interesting topic on ldflags: <a href="http://forums.gentoo.org/viewtopic-t-67777.html">http://forums.gentoo.org/viewtopic-t-67777.html</a><br><br></span><span class="postbody">--enable-new-dtags should be default for current binutils but it&nbsp; was there from my 3 years old make.conf so it is still there. adding it again shouldn&#39;t do harm.</span><br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt;&gt; FEATURES=&quot;ccache distlocks fixpackages metadata-transfer parallel-fetch<br>
&gt;&gt; sandbox sfperms strict unmerge-orphans userfetch&quot;<br>
&gt;<br>&gt; if you experience collision problems add collision-protect to the<br>&gt; features. you should have some better protection between packages and<br>&gt; should avoid packages from writing files owned by other packages. this<br>

&gt; could provoke some more emerge errors than before because there are<br>&gt; quite some packages that overwrite files<br><br>Agreed.&nbsp;&nbsp;It&#39;s worth mentioning COLLISION_IGNORE, which you can set in<br>make.conf to avoid specific known collisions, especially if they are<br>

known to be &quot;safe&quot;, that is, something like icons or the like (using an<br>example from the recent KDE4-svn overlay work, upstream was changing them<br>fast enough to make it not worth filing bugs with Gentoo over), that it<br>

really doesn&#39;t matter if a couple of packages are fighting over.<br>Differing config files, OTOH, you probably want to know about!</blockquote><div><br>that&#39;s why i don&#39;t have it set. i only have set this:<br>
FEATURES=&quot;parallel-fetch ccache -strict -sandbox buildpkg&quot;<br>i use -strict since i have a quite high live ebuilds use that sometimes require manual handling, and i&#39;ve disabled sandbox since it pisses me off with some xorg ebuilds and ati-drivers. i&#39;ve now switched to paludis which is faster or resolving deps for world and is more able to handle external overlays directly. though, it lacks pkging and for some packages i still use portage.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt;&gt; MAKEOPTS=&quot;-j3&quot;<br>&gt;<br>&gt;<br>&gt; set MAKEOPTS=&quot;-j3&quot; to MAKEOPTS=&quot;-j5 -s &quot;.&nbsp;&nbsp;if you experience compile<br>

&gt; problem decrease the j number to 1.<br><br>Note that there are occasional parallel make issues with -jX, where X&gt;1<br>or not existent (-j by itself indicates unlimited jobs).&nbsp;&nbsp;These don&#39;t<br>occur frequently at -j2 as it&#39;s so heavily used by Gentooers everywhere<br>

so those occurring there tend to have been eliminated already.&nbsp;&nbsp;However,<br>as the number of jobs increase, so does the likelihood of running into<br>parallel make issues.&nbsp;&nbsp;make errors indicating file or directory not found<br>

are the classic example, so any time you see one of those, try<br>MAKEOPTS=-j1 emerge &lt;whatever&gt; and you&#39;ll likely find it gone.&nbsp;&nbsp;If so,<br>file a bug with [parallel make] as well as the package name in the<br>
subject line (assuming there&#39;s not yet one filed), and help get it fixed!<br>
=8^)<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">FWIW, I run MAKEOPTS=&quot;-j20 -l12&quot; (up to 20 jobs, but don&#39;t start any more<br>
if the load is above 12) here.&nbsp;&nbsp;Dual-dual-core Opteron 290s, 8 gig RAM,<br>PORTAGE_TMPDIR pointing at a tmpfs so all those temp files don&#39;t hit<br>
disk.&nbsp;&nbsp;With PORTAGE_NICENESS=19, and with kernel 2.6.24&#39;s new per-user<br>scheduling turned on (and with Hz=300, voluntary preemption, so it&#39;s not<br>a special real-time kernel or anything by any stretch), I can still<br>

listen to streaming audio and even run a moderately sized visualization<br>window (amarok with the scrolling voice-print analyzer going in its own<br>window) without audio pause or undue jerkiness (there&#39;s a bit, but under<br>

a load of 3 per core and no real-time preemption, one might expect that)<br>of the visualization.&nbsp;&nbsp;&nbsp;&nbsp;If I&#39;m feeling adventurous and don&#39;t have<br>anything else critical going on, I&#39;ll occasionally try -j by itself, just<br>

to see how high I can run the load average. A 400-500 load average is<br>doable with kernel compiles, for instance, and nicely entertaining! =8^)<br>It still amazes me how well the system copes with even that, and it was<br>

even more amazing back with dual-single-cores (242s)!</blockquote><div><br>yep, i&#39;ll try out&nbsp; it someday. for the moment i&#39;m planning a disk change, mine has already 2 years and its overall health is starting to be heard when writing or reading data from the disk. i&#39;ve got an external bigger disk that i&#39;ll partition with tmpfs for paludis and portage. the only thing that i still don&#39;t know is:<br>
1. can i put on more than one different tmpfs?!<br>2. if i put one tmpfs and symlink there what i do want to use on tmpfs is better?!<br></div><br></div>-- <br>dott. ing. beso
Replies:
Re: unable to emerge anything
-- Duncan
References:
unable to emerge anything
-- Paul Stear
Re: unable to emerge anything
-- Paul Stear
Re: unable to emerge anything
-- Mark Haney
Re: unable to emerge anything
-- Paul Stear
Re: unable to emerge anything
-- Beso
Re: unable to emerge anything
-- Duncan
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: unable to emerge anything
Next by thread:
Re: unable to emerge anything
Previous by date:
Re: new laptop
Next by date:
Re: new laptop


Updated Jun 17, 2009

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.