View previous topic :: View next topic |
Author |
Message |
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Mon Oct 17, 2005 3:05 pm Post subject: Recommended Preformance Suggestions...(SOLVED) |
|
|
Hello Fellow Gentooer's,
I'm calling you out for a little help for myself and possibly anyone else who maybe considering doing the same thing. Basically, I've been using this Dell Inspiron 600M Laptop for about a year now, I started getting involved with using Linux as a secondary experimental OS in a dual boot setup with non other than WinXP. Gentoo was my first distro of choice right around this time last year, and although I have tried other distros(Debian,Mandrake, and Slackware), even though I would always read that distros such as Debian, Gentoo, and Slackware, were not considered to be nOOb friendly, I always felt the opposite. Now although some folks may not have enough time on their hands to learn how to navigate and control a new OS and would prefer a turnkey system so that they could point and click to their hearts content, I felt that the best way to learn what type of system would best suit my needs was to learn it from the inside out, this of course is why I always kept coming back to Gentoo.
Now without babbling too much I'll get to my point . Now, one year wiser in the world of Gentoo GNU/Linux, and the tweaker in me is starting to tap me on the shoulder again. I have pretty much topped out on my internal hardware:
Dell Inspiron 600M
Intel PentiumM 1.5Ghz
40Gb HDD 4200rpm
512Mb PC2100 DDR RAM 266Mhz
NEC 6100 DVD+RW / CDRW
SigmaTel AC97 Audio Chip
ATI Mobility Radeon 9000 w/32Mb of RAM
Now that being pretty much stock, I've since swapped the Hard Drive for an 80Gb @5400rpm and 1024Mhz(1Gb) of PC2100 DDR RAM, which has given her quite a performance boost.
However, I was wondering what other suggestions might someone offer to enhance my systems overall performance. I've read somewhere on the forums that there are ways to set up you partition scheme that help achieve some speed boosts, like:
Putting Portage in its own Partition...
or also putting /home in its own partition
Anyway, if anyone has any other suggestions, ideas, or partition schemes that could be of some use, it would be much appreciated,
THANX _________________ Legalize It
Last edited by southpaw on Sat Oct 22, 2005 3:20 am; edited 1 time in total |
|
Back to top |
|
|
nlindblad Guru
Joined: 30 Jun 2005 Posts: 476 Location: Lund, Sweden
|
Posted: Mon Oct 17, 2005 3:32 pm Post subject: |
|
|
I suggest you consider replacing your current filesystems with ReiserFS if you're using anything else... |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Oct 18, 2005 1:32 pm Post subject: |
|
|
First (only if you don't already have gcc-3.4.4 and glibc with nptl):
/etc/portage/package.keywords
~sys-devel/gcc-3.4.4 ~x86
sys-devel/gcc-config ~x86
sys-libs/libstdc++-v3 ~x86
sys-libs/glibc ~x86
/etc/make.conf
USE="nptl nptlonly pic"
FEATURES="ccache"
emerge ccache && emerge -e system
afterwards:
/etc/make.conf
CHOST="i686-pc-linux-gnu"
#
CFLAGS="-march=pentium-m -mtune=pentium-m -msse -msse2"
CFLAGS="${CFLAGS} -pipe"
CFLAGS="${CFLAGS} -Os"
CFLAGS="${CFLAGS} -fomit-frame-pointer"
#CFLAGS="${CFLAGS} -fstack-protector-all"
CFLAGS="${CFLAGS} -fno-ident"
CFLAGS="${CFLAGS} -fforce-addr"
CFLAGS="${CFLAGS} -ftracer"
CFLAGS="${CFLAGS} -fweb
CFLAGS="${CFLAGS} -falign-functions=4"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
#
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
MAKEOPTS="-j2"
USE="nptl nptlonly pic"
Also, use ck-sources, optimize kernel for size and also set function alignments to 4 in kernel as well. Never use -O3, -O2 is alright, but -Os makes programs load faster and use less memory and has better cache optimization. You can remove -fstack-protector-all if you like, glibc and grub may fail with it, but if you care about possible buffer overflows, leave it in. After you have your system where you want it emerge prelink and run: prelink -amvR.
Good luck. If you don't want to switch to reiserfs, just do this for ext3: boot to livecd and, type: tune -O dir_index /dev/hdXX _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Tue Oct 18, 2005 2:29 pm Post subject: |
|
|
I have a couple of questions for vipernicus, but first I will say that I did use the Jackass! Gentoo installation method, so most of these options are already compiled in by default including using ReiserFS as my file system for my /boot and my / partition, I also have ccache installed and enabled in my /etc/make.conf with ccache size set at "2Gb" , mainly because I have 1Gb of 266Mhz DDR RAM(2x512 stick's) . However, I was always under the impression that -O3, -O2 optimizations made for a faster system, could you explain why you think that ommiting those optimizations could help to improve performance?
Also, I know I probably said this before, but I'm not sure where I read it but, do you think that my system could benefit in a performance boost from splitting up the partitions say, one for /home, one for /portage, etc..etc..?
Oh, and are there any services that I could do without so that my system could boot up faster?
THANX _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Oct 18, 2005 3:25 pm Post subject: |
|
|
southpaw wrote: | I have a couple of questions for vipernicus, but first I will say that I did use the Jackass! Gentoo installation method, so most of these options are already compiled in by default including using ReiserFS as my file system for my /boot and my / partition, I also have ccache installed and enabled in my /etc/make.conf with ccache size set at "2Gb" , mainly because I have 1Gb of 266Mhz DDR RAM(2x512 stick's) . However, I was always under the impression that -O3, -O2 optimizations made for a faster system, could you explain why you think that ommiting those optimizations could help to improve performance?
Also, I know I probably said this before, but I'm not sure where I read it but, do you think that my system could benefit in a performance boost from splitting up the partitions say, one for /home, one for /portage, etc..etc..?
Oh, and are there any services that I could do without so that my system could boot up faster?
THANX |
The only performance you get when you split up your partitions is they don't become as fragmented over time. There actually isn't too much of a performance boost in doing that.
-O3 bloats code, and also creates buggy code. -Os improves application load time, memory usage, and also cache utilization. i added -msse and -msse2 because -march doesn't enable them. don't use -momit-leaf-frame-pointer, it has been proven that only using -fomit-frame-pointer is better, because when used in conjunction with -momit-leaf-frame-pointer, -fomit-frame-pointer becomes disabled. Also -fstack-protector-all helps prevent buffer overflows, you might not want to enable it though, because you will have to comment it out when compiling glibc and grub. -fno-idents helps reduce code further by removing useless tags in binaries saying things like "gcc 3.4.4, glibc 2.3.5, etc". -fforce-addr improves performance when used with -fforce-mem, which is enabled by -Os. -ftracer and -fweb are good for profiling and also help improve optimization. The LDFLAGS help with linking binaries to libraries, which will also help binaries to start faster. Also, in the USE flags, there is no harm in "nptl nptlonly", and "pic" is to enable position independent code for use with prelink. I went ahead and added "glibc-omitfp" to the use flags, it omits the framepointers in glibc, which also furthers optimization.
For the performance kernel (no fbsplash or vesa-tng, unless you patch it in yourself):
echo 'sys-kernel/ck-sources ~x86' >> /etc/portage/package.keywords
emerge ck-sources
When I get back to my computer, I'll post my .config file for you, it might help you set up your kernel.
/etc/make.conf
CHOST="i686-pc-linux-gnu"
#
CFLAGS="-march=pentium-m -mtune=pentium-m -msse -msse2"
CFLAGS="${CFLAGS} -pipe"
CFLAGS="${CFLAGS} -Os"
CFLAGS="${CFLAGS} -fomit-frame-pointer"
#CFLAGS="${CFLAGS} -fstack-protector-all"
CFLAGS="${CFLAGS} -fno-ident"
CFLAGS="${CFLAGS} -fforce-addr"
CFLAGS="${CFLAGS} -ftracer"
CFLAGS="${CFLAGS} -fweb
CFLAGS="${CFLAGS} -falign-functions=4"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
#
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
MAKEOPTS="-j2"
USE="glibc-omitfp nptl nptlonly pic"
You will notice a definite speed improvement from -O3 to -Os with these flags. They are very safe flags, I've done a Stage 1 install with them. I'm actually presently working on a Document titled "Gentoo Lover's Cookbook: Stage 1 and Beyond", which takes the user, step by step through a Stage 1 install with GCC 3.4.4, compiling a ck kernel, and all the way to a configured Gnome 2.12 or optionally KDE 3.4.3.
Depending on what you do with your system, you may not want syslog-ng, vixie-cron, or sshd to run on startup, but it always good to have a syslog service going. There isn't too much you can do to improve boot up. You could try removing hotplug, but only do that if you know more about what that affects. Alot of gentooers for some reason like to enable every "optimization" that GCC has, but they aren't meant to be used all at once.
I wish they would legalize it _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Tue Oct 18, 2005 6:06 pm Post subject: |
|
|
Thanx for the detailed reply brudda, also I think it's great that you're writing a cookbook, that's awsome . I myself have set out to eventually create a handbook along those lines. However, my goal was to develop a Digital Audio Workstation(DAW), a computer based multitrack sequencer with Gentoo as the system OS, as well as a realtime sampler (along the lines of Tascam's Gigastudio) workstation seperate from the DAW, also with Gentoo as the core OS. I chose Gentoo for it's profound configurability, personally I can't think of another distro that is as tweakable. However, those projects are (tons of research, R&D, and many hours) several years up the pike .
Back to the now, I have another question for you regarding your first post. I noticed that you mentioned to set the kernels "function alignment to 4", is that a ck-sources specific option because I'm using the usual "gentoo-sources", and I don't recall seeing that option available anywhere while configuring and compiling the kernel originally?
Oh, and while were still on the subject of cooking some what . I've got a bunch of USE flags enabled in my /etc/make.conf that I enabled myself before emerging certain packages in my system. This got me thinking ( imagine that), is there a better way to enable or disable package specific USE flags that are only necessary for specific packages and serve no real benefit to the system as a whole? For some reason, I get the feeling that when I enable a certain USE flag for a certain package in /etc/make.conf, that maybe there might be a more appropriate place to put the said USE flag, hopefully that wasn't too confusing ...Anyway, let me know, thanx ... _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Oct 18, 2005 6:23 pm Post subject: |
|
|
southpaw wrote: | Thanx for the detailed reply brudda, also I think it's great that you're writing a cookbook, that's awsome . I myself have set out to eventually create a handbook along those lines. However, my goal was to develop a Digital Audio Workstation(DAW), a computer based multitrack sequencer with Gentoo as the system OS, as well as a realtime sampler (along the lines of Tascam's Gigastudio) workstation seperate from the DAW, also with Gentoo as the core OS. I chose Gentoo for it's profound configurability, personally I can't think of another distro that is as tweakable. However, those projects are (tons of research, R&D, and many hours) several years up the pike .
Back to the now, I have another question for you regarding your first post. I noticed that you mentioned to set the kernels "function alignment to 4", is that a ck-sources specific option because I'm using the usual "gentoo-sources", and I don't recall seeing that option available anywhere while configuring and compiling the kernel originally?
Oh, and while were still on the subject of cooking some what . I've got a bunch of USE flags enabled in my /etc/make.conf that I enabled myself before emerging certain packages in my system. This got me thinking ( imagine that), is there a better way to enable or disable package specific USE flags that are only necessary for specific packages and serve no real benefit to the system as a whole? For some reason, I get the feeling that when I enable a certain USE flag for a certain package in /etc/make.conf, that maybe there might be a more appropriate place to put the said USE flag, hopefully that wasn't too confusing ...Anyway, let me know, thanx ... |
package specific use flags are kept in /etc/portage/package.use, and look something like this:
sys-libs/glibc userlocales
sys-devel/libperl ithreads
dev-lang/perl ithreads
there is also per package cflags that you can enable with a bashrc file that you drop in /etc/portage then you can do your per package flags like this: package.cflags, package.cxxflags, package.ldflags:
sys-libs/glibc -march=pentium-m -mtune=pentium-m -msse -msse2 -pipe -Os -fomit-frame-pointer -fno-ident -fforce-addr -ftracer -fweb -falign-functions=4
app-video/mplayer -march=pentium-m -mtune=pentium-m -msse -msse2 -pipe -O3 -fomit-frame-pointer -fno-ident -fforce-addr -ftracer -fweb -falign-functions=4
I'll get that bashrc when I get back to my system later.
Also, the kernel options are in the general section at the bottom in a section titled something like "options for small systems" something like that. I'll have to check it out later. You can use that with gentoo-sources or ck-sources. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Last edited by vipernicus on Tue Oct 18, 2005 6:35 pm; edited 1 time in total |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Tue Oct 18, 2005 6:35 pm Post subject: |
|
|
So that would be the correct place to enable said USE flags as opposed to /etc/make.conf? _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Tue Oct 18, 2005 6:38 pm Post subject: |
|
|
southpaw wrote: | So that would be the correct place to enable said USE flags as opposed to /etc/make.conf? |
make.conf is for global settings that you want in as many packages as possible. like: nptl, mp3, sse, sse2, mmx, alsa, gnome, -arts, etc
/etc/portage/package.use is where you want it package specific. like for kdelibs, you want it to be the only package built with arts so you would do this:
kde-base/kde-libs arts. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Tue Oct 18, 2005 8:51 pm Post subject: |
|
|
That's what I figured, I just needed someone confirm it. I guess this means that I have to move a lot of package specific USE flags from /etc/make.conf to /etc/portage/package.use .
Btw, that peice of information alone is incredibly valuable to me, which is why I love browsing these forums so much, THANX again brudda _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Tue Oct 18, 2005 11:52 pm Post subject: |
|
|
Well these are the stock Jackass! Pentium3 Optimizations,
Code: | CFLAGS="-march=pentium3 -mtune=pentium3 -pipe -O3 -fweb -frename-registers -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden" |
Now correct me if wrong, but when I change my "CFLAGS" and such, I have to follow that up with:
Code: | # emerge -e system && emerge -e world |
...is that correct or do I have to do something else, it's been a while since I've messed with my toolkit so I don't remember for sure... _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Wed Oct 19, 2005 12:03 am Post subject: |
|
|
southpaw wrote: | Well these are the stock Jackass! Pentium3 Optimizations,
Code: | CFLAGS="-march=pentium3 -mtune=pentium3 -pipe -O3 -fweb -frename-registers -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden" |
Now correct me if wrong, but when I change my "CFLAGS" and such, I have to follow that up with:
Code: | # emerge -e system && emerge -e world |
...is that correct or do I have to do something else, it's been a while since I've messed with my toolkit so I don't remember for sure... |
Yep, you can just change it to:
etc/make.conf
Code: | CHOST="i686-pc-linux-gnu"
#
CFLAGS="-march=pentium-m -mtune=pentium-m -msse -msse2"
CFLAGS="${CFLAGS} -pipe"
CFLAGS="${CFLAGS} -Os"
CFLAGS="${CFLAGS} -fomit-frame-pointer"
CFLAGS="${CFLAGS} -fno-ident"
CFLAGS="${CFLAGS} -fforce-addr"
CFLAGS="${CFLAGS} -ftracer"
CFLAGS="${CFLAGS} -fweb
CFLAGS="${CFLAGS} -falign-functions=4"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
#
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
MAKEOPTS="-j2"
USE="glibc-omitfp nptl nptlonly pic" |
in case you didn't know, the above is equal to the flags below, I just do it that way, because if a package doesn't work well with a certain flag, it can easily be commented out:
Code: | CHOST="i686-pc-linux-gnu"
#
CFLAGS="-march=pentium-m -mtune=pentium-m -msse -msse2 -pipe -Os -fomit-frame-pointer -fno-ident -fforce-addr -ftracer -fweb -falign-functions=4"
CXXFLAGS="-march=pentium-m -mtune=pentium-m -msse -msse2 -pipe -Os -fomit-frame-pointer -fno-ident -fforce-addr -ftracer -fweb -falign-functions=4 -fvisibility-inlines-hidden"
#
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
MAKEOPTS="-j2"
USE="glibc-omitfp nptl nptlonly pic" |
and then do an emerge -e system && emerge -e world, and you are all set. Yeah, -O3 is really slowing you down, and -momit-leaf-frame-pointer as well. -O3 includes -frename-registers, so you don't need it. If you are truely worried that -Os will give you problems you could change it to -O2 and still get benefits from smaller binaries. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Wed Oct 19, 2005 1:11 am Post subject: |
|
|
I heard, or I should say, I've read that setting "LDFLAGS" causes system instability and it isn't worth the risk, what's your take on that? _________________ Legalize It |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Wed Oct 19, 2005 2:58 am Post subject: |
|
|
Well I used all of your suggestions, the only one had omit was the LDFLAGS line because I kept having errors so I commented them out.
So far I'm at about (12 of 200), will see how far she gets ... _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Wed Oct 19, 2005 12:39 pm Post subject: |
|
|
southpaw wrote: | Well I used all of your suggestions, the only one had omit was the LDFLAGS line because I kept having errors so I commented them out.
So far I'm at about (12 of 200), will see how far she gets ... |
That's weird, I've had no errors or problems with my LDFLAGS, they are pretty mild actually. Does improve application load time though. What packages did you have issues with? _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Wed Oct 19, 2005 2:53 pm Post subject: |
|
|
Good morning,
Actually I don't remember, I usually write down whatever errors I may run into, but I do remember that it was the first package of "emerge -e system" and yeah I know that probably doesn't tell you much. Oh yeah, I just remembered, isn't there a log file that I could check out from yesterday evening that would tell me what it was???
P.S. "emerge -e system" finished this morning at about 7:30AM, so that's 200 packages in about 10 hours. Then it rolled into "emerge -e world", which right now it's at (gasp) 50 of 380 ... _________________ Legalize It |
|
Back to top |
|
|
RuiP l33t
Joined: 15 Jan 2005 Posts: 643
|
Posted: Wed Oct 19, 2005 3:16 pm Post subject: |
|
|
the log will be, by default, at /var/log/emerge.log
Weird. I never read it about LDFLAGS compile errors... are you sure is not another thing?
Note that most people do an Code: | emerge -e system && emerge -e system && emerge -e world && emerge -e world |
And not less then that.
After that long time you probabilly will find that you gainned a little (if you can in fact note something!) boost!!
I used to run 3 identically gentoos, randomly, with -O, -Os and -O3 and never notest any special difference.
I think in a blind test i should mixed everything and never get wich one was the -O or -O3...
The gain is more in theory then in anything else. The only thing is -O3 gives more fat and buggy binaries.
I end up to use -O straight on my Tux machines. (The same as freebsd default cflags, in fact) and cut a little time on compile times, since it won't make any calculations to optimize to size (i check free space on a -Os and -O3 on same partition size and it was NOT *that* different!)
But it was fun, anyway |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Thu Oct 20, 2005 12:07 am Post subject: |
|
|
Sorry it took me so long to get back, but for some reason my ISP randomly craps out on me every now and again, which of course forced me to go to my campus library to pick my classes for Fall semester, and now I'm back, hewww... Anyway, to answer your question vipernicus, the package that gave me the error was:
Code: | 1129687327: Started emerge on Oct. 18, 2005 22:02:07
1129687327: *** emerge --emptytree system
1129687328: >>> emerge (1 of 200) sys-devel/patch-2.5.9 to/
1129687328: === (1 of 200) cleaning (sys-devel/patch-2.5.9:: /usr/portage/sys-devel/patch-2.5.9.ebuild)
1129687331: === (1 of 200) compiling/merging (sys-devel/patch-2.5.9:: /usr/portage/sys-devel/patch-2.5.9.ebuild)
1129687343: *** terminating |
...Now, besides that I just hit another error during "emerge -e world", at package 191 of 380 dev-db/edb-9999, which is a live CVS package for E17, so there you go.
Oh yeah, btw, where did you get all that detailed info on CFLAGS and LDFLAGS??? _________________ Legalize It |
|
Back to top |
|
|
RuiP l33t
Joined: 15 Jan 2005 Posts: 643
|
Posted: Thu Oct 20, 2005 6:32 am Post subject: |
|
|
cvs e17 are many times very slow (or under heavy load), so sometimes emerging e17 could be a pain...
Anyway, e17 requires a correct order of compile packages, something not always preserved by 'world' list. if you compiled once maybe it work ok, but can give you sometimes dependency errors.
and e17 is alpha experimental code. it should not be in your world list.
Maybe you should unemerge all e17 packages, emerge -e world and after finish redo the e17 world *in the correct order* and using the --oneshot option to emerge, to avoid being added that world list.
So patch didnt compiled with LDFLAGS?... weird. you don't remember exactlly the error?
LDFLAGS is the "equivalent" to prelink. it would speedy the start up of huge apps.
Is a pity give up that on the fail of one app. Try to investigate the cause.
If you read around, usually insane cflags cause a lot of errors, but LDFLAGS didn't appear very commonly as a bad boy
Of course you can later prelink... but there are more chances you got problems there... |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Thu Oct 20, 2005 1:43 pm Post subject: |
|
|
southpaw wrote: | Sorry it took me so long to get back, but for some reason my ISP randomly craps out on me every now and again, which of course forced me to go to my campus library to pick my classes for Fall semester, and now I'm back, hewww... Anyway, to answer your question vipernicus, the package that gave me the error was:
Code: | 1129687327: Started emerge on Oct. 18, 2005 22:02:07
1129687327: *** emerge --emptytree system
1129687328: >>> emerge (1 of 200) sys-devel/patch-2.5.9 to/
1129687328: === (1 of 200) cleaning (sys-devel/patch-2.5.9:: /usr/portage/sys-devel/patch-2.5.9.ebuild)
1129687331: === (1 of 200) compiling/merging (sys-devel/patch-2.5.9:: /usr/portage/sys-devel/patch-2.5.9.ebuild)
1129687343: *** terminating |
...Now, besides that I just hit another error during "emerge -e world", at package 191 of 380 dev-db/edb-9999, which is a live CVS package for E17, so there you go.
Oh yeah, btw, where did you get all that detailed info on CFLAGS and LDFLAGS??? |
Hopefully you know that you can do an emerge --resume? Also, there is a script called pye that will let you choose exactly what you want to emerge. It will show you a list 0-380 and you can choose, !40,0,28-31,35-380.
Make sure you use nano -w, when you paste this script. If you didn't know '-w' disables wordwrapping. You might even want to set up an alias for nano in your bashrc to reflect 'nano -w'.
Here it is (I edited it a little bit for use with emerge -e world):
Code: | #!/usr/bin/env python
#
# ------------ pye ---------------------
#
# Let's you choose from a numbered list of packages
# to emerge.
# Thomas Ferencz 2004
# strangedr@gentoo.org
# Version 0.8.3.1, 02 May 2004
import sys, os, popen2, portage
sys.path = ["/usr/lib/portage/pym"]+sys.path
from output import blue, red, green
from time import localtime, strftime
count = 0
pkgdict = {}
digest = {}
prune = False
def parsethis(be):
"""Extract cat/packagename out of emerge -p output"""
a = be.find("]")+2
newbe = be[a:]
newbe = newbe.lstrip()
b = newbe.find("[")
if b == -1:
b = newbe.find(" ")
if b == -1:
b = newbe.find("\n")
newbe = newbe[:b]
newestbe = newbe.strip()
ki = portage.catpkgsplit(newestbe)
if ki == None:
ki = newestbe.split('/')
return ki
def mergethis(package):
"""Merge given package and return True if successful."""
os.system("emerge %s" % package)
global pkgdict
package = package.split("/")[1]
vartree = portage.vartree()
installed_pkg = vartree.dep_bestmatch(package)
inst_pkgparts = portage.catpkgsplit(installed_pkg)
pklist = pkgdict.values()
intended_pkg = [value for value in pklist if package == value[1]]
if inst_pkgparts == intended_pkg[0]:
return True
else:
return False
def usage():
"""Invoked by --help or -h in arguments"""
sys.stdout.write("This script let's you choose from a numbered list of things to emerge.\n")
sys.stdout.write("Usage: pye [options] [target] where [target] can be world, system, gnome, kde etc.\nand [options] are standard emerge options. --pretend is hardwired.\n")
sys.stdout.write("If no [target] is given, '-ep world' is implied.\n")
sys.stdout.write("If you start your arguments with sync/rsync (e.g. pye sync -U system), pye performs emerge sync/rsync before listing packages.\n")
sys.stdout.write("When prompted for the packages, you have the following options:\n\n")
sys.stdout.write(" - enter the numbers comma-separated (1,4,6,7 etc.)\n")
sys.stdout.write(" - use ranges (1,3-7,12-19,23)\n")
sys.stdout.write(" - enter 'a' or 'all' if you want all packages\n")
sys.stdout.write(""" - start your list with a ! if you want exclude packages (!3,6,8 excludes these 3 packs from the list)\n\n""")
sys.stdout.write(""" - 'pye prune' will list all packages in /var/db/pkg and you can choose the ones you want to unmerge.\n""")
sys.stdout.write(red(" Use 'prune' carefully!\n\n"))
sys.stdout.write("--help or -h give you this screen.\n")
sys.exit(0)
def usage_2():
"""Invoked by 'h' in packlist-confirm."""
sys.stdout.write("Available options:\n")
sys.stdout.write("m - passes packages to be emerged as a list to emerge\n")
sys.stdout.write("s - emerges packages one by one, emerge not interrupted if a package fails\n")
sys.stdout.write("""u - unmerges package(s) if prune was given as argument to pye\n""")
sys.stdout.write("h - this help\n")
sys.stdout.write("q - quit without emerging\n\n")
arg = sys.argv[1:]
if arg == []:
arg = ['-e', 'world']
if "--help" in arg or "-h" in arg:
usage()
if arg[0] in ['sync', 'rsync']:
syncarg = arg[0]
arg = arg[1:]
os.system("emerge %s" % syncarg)
sys.stdout.write(blue("\nFinished syncing, now listing packages:\n"))
if arg[0] == 'prune':
prune = True
vartree = portage.vartree()
allpacks = vartree.getallcpv()
for item in allpacks:
line = red(str(count)+'): ')+blue(item)+'\n'
pkgdict[count] = portage.catpkgsplit(item)
count = count+1
sys.stdout.write(line)
else:
args = " ".join(arg)
sys.stdout.write(green("One moment...\n"))
(r, w) = popen2.popen4('emerge -p %s' % args)
for line in r.readlines():
if line[:7] == "[blocks":
sys.stdout.write(red(line))
continue
if line[:7] == "[ebuild" or (line[:1] == "*" and "-s" in arg):
packparts = parsethis(line)
line = blue(str(count))+green("): ")+line
pkgdict[count] = packparts
count = count+1
sys.stdout.write(line)
r.close()
w.close()
print
yesno = "n"
while yesno == "n":
packstring = ""
packlist=[]
emergethis = raw_input(blue("Enter the numbers of packages you want to emerge or unmerge (in case of prune), comma-separated (you can also specify ranges, like 1,4-8,12 etc.). Alternatively, you can specify packages to be excluded from the list; for this, start your first item with an ! (e.g. !2,4,8). For all packages write 'a'. If you want to quit, press q: "))
if emergethis == 'q':
sys.exit(0)
elif emergethis in ['a', 'all']:
packlist = [v[0]+"/"+v[1] for v in pkgdict.values()]
else:
packnumlist = emergethis.split(",")
if "!" in packnumlist[0]:
totallist = pkgdict.keys()
packnumlist[0] = packnumlist[0][1:]
for num in packnumlist:
if "-" in num:
start, stop = num.split("-")
for n in range(int(start), int(stop)+1):
packnumlist.append(str(n))
packlist = [pkgdict[item][0]+"/"+pkgdict[item][1] for item in totallist if str(item) not in packnumlist]
else:
for num in packnumlist:
if "-" in num:
start, stop = num.split("-")
for n in range(int(start), int(stop)+1):
packlist.append(pkgdict[n][0]+"/"+pkgdict[n][1])
else:
packlist.append(pkgdict[eval(num)][0]+"/"+pkgdict[eval(num)][1])
packstring = " ".join(packlist)
print
if prune:
sys.stdout.write(green("I'm about to unmerge the following package(s): "))
sys.stdout.write(red(packstring)+'\n')
yesno = raw_input(green("Is this correct? Choose an option: u(nmerge)/n(o)/h(elp)/q(uit): "))
else:
sys.stdout.write(green("I'm about to emerge the following packages: "))
sys.stdout.write(red(packstring)+'\n')
yesno = raw_input(green("Is this correct? Choose an option: m(ass-emerge)/s(tep-emerge)/n(o)/h(elp)/q(uit): "))
print
if yesno in ['q', 'quit']:
sys.exit(0)
elif yesno in ['h', 'help']:
usage_2()
yesno = 'n'
if yesno == 's':
for elem in packlist:
merged = mergethis(elem)
if merged:
digest[elem] = "Merged"
else:
digest[elem] = "Failed"
sys.stdout.write(blue("This is digest of pye on "+strftime("%a, %d %b %Y %H:%M:%S", localtime())+":\n\n"))
for key in digest.keys():
if digest[key] == "Failed":
sys.stdout.write(blue(key+": ")+red(digest[key]+"\n"))
else:
sys.stdout.write(blue(key+": "+digest[key]+"\n"))
sys.stdout.write(green("Check /var/log/emerge for details. Exiting.\n\n"))
sys.exit(0)
elif yesno == 'm':
os.system("emerge %s" % packstring)
elif prune and yesno == 'u':
os.system("emerge unmerge %s" % packstring)
else:
sys.stdout.write(red("No package given... exiting."))
sys.exit(0) |
Put this file in /etc/scripts/pye, then do a nano -w /usr/bin/pye and type: python /etc/scripts/pye
This way you can just type pye and it will start a quick and easy emerge -e world selection. If later you want to change it to work with emerge -uD world. Just change this part:
Code: | arg = sys.argv[1:]
if arg == []:
arg = ['-e', 'world']
if "--help" in arg or "-h" in arg:
usage()
if arg[0] in ['sync', 'rsync']:
syncarg = arg[0]
arg = arg[1:]
os.system("emerge %s" % syncarg)
sys.stdout.write(blue("\nFinished syncing, now listing packages:\n"))
if arg[0] == 'prune':
prune = True
vartree = portage.vartree()
allpacks = vartree.getallcpv()
for item in allpacks:
line = red(str(count)+'): ')+blue(item)+'\n'
pkgdict[count] = portage.catpkgsplit(item)
count = count+1
sys.stdout.write(line) |
to
Code: | arg = sys.argv[1:]
if arg == []:
arg = ['-uD', 'world']
if "--help" in arg or "-h" in arg:
usage()
if arg[0] in ['sync', 'rsync']:
syncarg = arg[0]
arg = arg[1:]
os.system("emerge %s" % syncarg)
sys.stdout.write(blue("\nFinished syncing, now listing packages:\n"))
if arg[0] == 'prune':
prune = True
vartree = portage.vartree()
allpacks = vartree.getallcpv()
for item in allpacks:
line = red(str(count)+'): ')+blue(item)+'\n'
pkgdict[count] = portage.catpkgsplit(item)
count = count+1
sys.stdout.write(line) |
What I've learned about LDFLAGS, CFLAGS, etc, has come from gcc man pages, forums, trusted friends, and tests on my own system. There isn't one place that will tell you everything. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Thu Oct 20, 2005 2:57 pm Post subject: |
|
|
Good morning again guys,
That looks like an awsome script vipernicus, I'm looking foward to adding it to my arsenal . One question though, however, this is in reference to a comment that RuiP made previously. How do you(vipernicus) feel about, what I like to call "System Calibration", by way of :
Code: | # emerge -e system && emrge -e system && emerge -e world && emerge -e world |
...as opposed to your suggestion :
Code: | # emerge -e system && emerge -e world |
...are there any advantages, disadvantages, etc..etc..
what do you think? _________________ Legalize It |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Thu Oct 20, 2005 3:35 pm Post subject: |
|
|
southpaw wrote: | Good morning again guys,
That looks like an awsome script vipernicus, I'm looking foward to adding it to my arsenal . One question though, however, this is in reference to a comment that RuiP made previously. How do you(vipernicus) feel about, what I like to call "System Calibration", by way of :
Code: | # emerge -e system && emrge -e system && emerge -e world && emerge -e world |
...as opposed to your suggestion :
Code: | # emerge -e system && emerge -e world |
...are there any advantages, disadvantages, etc..etc..
what do you think? |
Well, they say when you do make drastic changes to your toolkit, you should emerge it twice. If you feel like you have, this will probably be more than adequate: emerge -e system && emerge -e system && emerge -e world, that way your toolkit and system files compile against each other twice before compiling the whole world, which also includes the system files, but using pye, you can cut some time on that . Have fun. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
southpaw Guru
Joined: 11 Mar 2005 Posts: 375 Location: "Americas Toilet"(So.FL.)
|
Posted: Thu Oct 20, 2005 9:13 pm Post subject: |
|
|
Hey vipernicus,
I just thought I would let you know that I wiped my drive and reinstalled my system. I know what your probably thinking but I wanted to try a different partition layout, nothing fancy:
Code: | /dev/hda1 /boot
/dev/hda2 /swap
/dev/hda3 /
/dev/hda4 /home |
Now this time around I changed my /etc/make.conf to what you had posted including the LDFLAGS, and now I'm running the "emerge -e system && emerge -e system && emerge -world, I figured I would do it like this with out a Desktop Environment and all the other packages that I had installed. So far she's humming along just fine . _________________ Legalize It |
|
Back to top |
|
|
RuiP l33t
Joined: 15 Jan 2005 Posts: 643
|
Posted: Thu Oct 20, 2005 10:12 pm Post subject: |
|
|
hi.
So your start from fresh... from jackass i presume, since you are re-compiling everything again.
vipernicus is absolutly right about double emerge -e system.
The problem is, if you had a problematic gcc and/or glibc an emerge -e system with sane cflags will put those ok, but still compiled with the old not so good gcc/glibc. So a second emerge -e system will recompile system (and the compiler) with the new and correct compiler and against correct glibc. "Clear as mud", in the immortal words of BobP
(Some arguments could be made for -e world... but here you need to be a little too paranoid about incorrect libraries against you compile world apps. For me a single -e world is more then nice. But you can have another opinion... most people seems to do it twice)
In case of the -e system, and since the question is compile the toolchain with a good toolchain i avoid the double emerge by doing:
Code: | emerge linux-headers glibc gcc-config binutils gcc
emerge -e system
emerge -e world |
(I avoid && because i like to be in control of when i start emerge that long lists...)
in relation to your other point, using several partitions. The gain will be more in security then any else. keep an /home apart make things secure for your personal data. You can delete system as many times you wish and keep your things in peace.
And you can choose different file system according the needs. ext3 is older and safer, good for /home; reiser is faster with a lot of small files, so nice for file systems. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|