View previous topic :: View next topic |
Author |
Message |
zietbukuel l33t
Joined: 30 Dec 2005 Posts: 607
|
Posted: Fri May 26, 2006 6:57 am Post subject: |
|
|
Thanks GetCool, I'll now start recompiling my system with the new gcc |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Fri May 26, 2006 7:23 am Post subject: |
|
|
GetCool wrote: | zietbukuel wrote: | Are this CFLAGS safe for gcc-4.1.1?
Code: | CFLAGS="-mtune=athlon64 -O2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -m3dnow |
Thanks |
Yes, those are safe for a Venice core (or X2), but a better (less complex) way to write them is:
Code: | CFLAGS="-march=athlon64 -O2 -pipe -msse3" |
The above will achieve the same effect. |
Only if u use AMD64. The same flags work on x86, (with Athlon64 inside) but then are different. |
|
Back to top |
|
|
prymitive Apprentice
Joined: 13 Jun 2004 Posts: 260
|
Posted: Fri May 26, 2006 8:01 am Post subject: |
|
|
PrakashP wrote: | GetCool wrote: | zietbukuel wrote: | Are this CFLAGS safe for gcc-4.1.1?
Code: | CFLAGS="-mtune=athlon64 -O2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -m3dnow |
Thanks |
Yes, those are safe for a Venice core (or X2), but a better (less complex) way to write them is:
Code: | CFLAGS="-march=athlon64 -O2 -pipe -msse3" |
The above will achieve the same effect. |
Only if u use AMD64. The same flags work on x86, (with Athlon64 inside) but then are different. |
What's the difference?? I've got Turion laptop and I'm running x86 gentoo, amd64 gives me more memory usage and nothing else. |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Fri May 26, 2006 9:32 am Post subject: |
|
|
prymitive wrote: | PrakashP wrote: | GetCool wrote: | zietbukuel wrote: | Are this CFLAGS safe for gcc-4.1.1?
Code: | CFLAGS="-mtune=athlon64 -O2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -m3dnow |
Thanks |
Yes, those are safe for a Venice core (or X2), but a better (less complex) way to write them is:
Code: | CFLAGS="-march=athlon64 -O2 -pipe -msse3" |
The above will achieve the same effect. |
Only if u use AMD64. The same flags work on x86, (with Athlon64 inside) but then are different. |
What's the difference?? I've got Turion laptop and I'm running x86 gentoo, amd64 gives me more memory usage and nothing else. |
I was talking about the flags on both arches, not the arches as such. Inform yourself, what amd64 is in contrast to x86/ia32. |
|
Back to top |
|
|
prymitive Apprentice
Joined: 13 Jun 2004 Posts: 260
|
Posted: Fri May 26, 2006 10:26 am Post subject: |
|
|
PrakashP wrote: | prymitive wrote: | PrakashP wrote: | GetCool wrote: | zietbukuel wrote: | Are this CFLAGS safe for gcc-4.1.1?
Code: | CFLAGS="-mtune=athlon64 -O2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -m3dnow |
Thanks |
Yes, those are safe for a Venice core (or X2), but a better (less complex) way to write them is:
Code: | CFLAGS="-march=athlon64 -O2 -pipe -msse3" |
The above will achieve the same effect. |
Only if u use AMD64. The same flags work on x86, (with Athlon64 inside) but then are different. |
What's the difference?? I've got Turion laptop and I'm running x86 gentoo, amd64 gives me more memory usage and nothing else. |
I was talking about the flags on both arches, not the arches as such. Inform yourself, what amd64 is in contrast to x86/ia32. |
I know what's the difference between amd64 and x86, I tired gentoo under both archs and under my every day work (inet, mp3/divx, enemy territory sometimes) it didn't gave me any performance boost, it just eats more memory mostly due the fact that I'm running 32 bit and 64 bit apps at the same time so I got many libraries loaded twice. I've got 512MB ram and under 32 bit swap is empty most the time, under 64 bits it's used very often, all I need to do is start enemy territory.
You said that those flags are different under x86 and amd64, do You mean that they work different or You write them down different? All I know that -march=athlon64 implies sse, 3dnow and mmx flags but that is true for x86 and amd64 if I'm correct so I'm curious about this difference. |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Fri May 26, 2006 10:35 am Post subject: |
|
|
Well, you overlooked -fomit-frame-pointer. This is only implied on AMD64 and not on x86. |
|
Back to top |
|
|
prymitive Apprentice
Joined: 13 Jun 2004 Posts: 260
|
Posted: Fri May 26, 2006 10:39 am Post subject: |
|
|
PrakashP wrote: | Well, you overlooked -fomit-frame-pointer. This is only implied on AMD64 and not on x86. |
Oh yes, it breaks debuging on x86 and not on amd64 if I'm right? |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Fri May 26, 2006 11:14 am Post subject: |
|
|
prymitive wrote: | Oh yes, it breaks debuging on x86 and not on amd64 if I'm right? |
AFAIK not with newer versions of gdb. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
chtephan Apprentice
Joined: 03 Feb 2004 Posts: 266 Location: Offenburg, Germany
|
Posted: Fri May 26, 2006 12:35 pm Post subject: |
|
|
gcc 4 can generate "location lists" with the object code so that gdb can produce valid backtraces without frame pointers. But these "location lists" are debugging info (generated by -g) and debugging is usually stripped away by portage if not disabled.
I have added -g to my CFLAGS and added "splitdebug" to my FEATURES variable. This way every binary will be splitted into actual binary and debugging info, the latter going into /usr/lib/debug where gdb can find it, but the binary itself will be stripped as usual. |
|
Back to top |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Sat May 27, 2006 9:36 am Post subject: following the gcc hype |
|
|
I just tried re-emerging world on two difrent pcs, and got ERROR: sys-devel/gcc-4.1.1 failed
one is a pentium-4 with CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" ; CXXFLAGS="${CFLAGS}"
other is a athlon-xp with CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -ffast-math -ftracer -fprefetch-loop-arrays -fno-ident"
the log for the athlon pc is here www.cs.bgu.ac.il/~nivv/gcc-4.11.fail.tar.bz2
uname -r for the athlon: 2.6.16-ck11
I used to have nosrip in both machines in the FEATURES , and just took it out.
I couldnt find any open bug , or issues in the forums.
Thanks,
NIv |
|
Back to top |
|
|
chtephan Apprentice
Joined: 03 Feb 2004 Posts: 266 Location: Offenburg, Germany
|
Posted: Sat May 27, 2006 12:14 pm Post subject: |
|
|
This is strange. I can see tons of "file not found" errors in your log.
Starting with fixincludes, where they are not fatal:
Cannot access fltk-1.1/FL/x.h from /usr/include
error 2 (No such file or directory)
[...] (lots of them, what's going on there, can you take a look?)
Then here are the fatal ones:
/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/reload1.c:24:23: error: coretypes.h: No such file or directory
In file included from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/reload1.c:25:
./tm.h:5:31: error: config/i386/i386.h: No such file or directory
./tm.h:6:31: error: config/i386/unix.h: No such file or directory
./tm.h:7:30: error: config/i386/att.h: No such file or directory
Which looks like gcc can't find the files that were supposed to be in the source archive. (???) |
|
Back to top |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Sat May 27, 2006 12:45 pm Post subject: |
|
|
I am very gratfull for your help
chtephan wrote: |
Cannot access fltk-1.1/FL/x.h from /usr/include
error 2 (No such file or directory)
[...] (lots of them, what's going on there, can you take a look?)
|
ls -la /usr/include/fltk-1.1/FL/x.h
gives me a red flashing lrwxrwxrwx 1 root root 3 2006-02-06 23:02 /usr/include/fltk-1.1/FL/x.h -> x.H
so I guess its broken
I used to have gcc 3.4.6-r1 over this pc
[EDIT] I now see that /usr/include/fltk-1.1/FL was full of bad symlinks.
I also notice that /usr/include/fltk-1.1/FL was created on Feb 2 ??
equery belongs x.h - didnt supply the culpit
chtephan wrote: |
/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/reload1.c:24:23: error: coretypes.h: No such file or directory
In file included from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/reload1.c:25:
./tm.h:5:31: error: config/i386/i386.h: No such file or directory
./tm.h:6:31: error: config/i386/unix.h: No such file or directory
./tm.h:7:30: error: config/i386/att.h: No such file or directory
|
correct - I cant locate these files.
I will try to rm the x.h ,sync and try again. but as I did it on two different pcs , I think we need more positive response to 4.1 b4 unmask
after I rm -rf /usr/include/fltk-1.1 and emerged gcc again - it worked!!!
Niv
Last edited by nivw on Sat May 27, 2006 2:27 pm; edited 2 times in total |
|
Back to top |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Sat May 27, 2006 1:19 pm Post subject: |
|
|
btw /usr/include/fltk-1.1/FL/ is OK on the first machine:
2.6.17-rc3 , gcc- 3.4.5-r1
other log: www.cs.bgu.ac.il/~nivv/gcc411.bigone.tar.bz2
I see:
Quote: |
mv: cannot stat `libgcc/*.vis': No such file or directory
make[3]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/gcc'
subdirs="cp fortran build"; for dir in $subdirs; \
do \
if [ -d stage1/$dir ] ; then true ; else mkdir stage1/$dir ; fi ; \
done
rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcov.a
rm -f stage1/libgcc_s*.so
rm -f stage1/libunwind.a stage1/libunwind*.so
mv specs stage1/specs
mv *.o s-* xgcc cpp cc1 cc1*-dummy crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o gcc-cross protoize unprotoize specs collect2 gcov-iov gcov gcov-dump *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk g++ g++-cross cc1plus gfortran f951 stage1
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `crtfastmath.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
mv: cannot stat `protoize': No such file or directory
mv: cannot stat `unprotoize': No such file or directory
mv: cannot stat `specs': No such file or directory
mv: cannot stat `gcov-iov': No such file or directory
mv: cannot stat `gcov': No such file or directory
mv: cannot stat `gcov-dump': No such file or directory
mv: cannot stat `*.[0-9][0-9].*': No such file or directory
mv: cannot stat `*.[si]': No such file or directory
mv: cannot stat `g++-cross': No such file or directory
mv: cannot stat `cc1plus': No such file or directory
mv: cannot stat `f951': No such file or directory
make[2]: [stage1-start] Error 1 (ignored)
|
locate crtbegin.o
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/crtbegin.o
cant locate a lib named libgcc.
answer: I erased /var/tmp/portage/gcc-4.1.1 and emerged gcc again - solved
Last edited by nivw on Sat May 27, 2006 6:05 pm; edited 2 times in total |
|
Back to top |
|
|
Halcy0n Developer
Joined: 17 Sep 2003 Posts: 1682 Location: Freehold, NJ
|
Posted: Sat May 27, 2006 4:19 pm Post subject: |
|
|
For anyone doing an upgrade from 3.4->4.1, I was wrong in saying you could have a mixed install of 3.4 and 4.1. The soname was the same, and I did not run into any problems, but it seems the ABI is slightly different, so you should follow the GCC Upgrading Guide.[/url] _________________ Mark Loeser
http://www.halcy0n.com |
|
Back to top |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Sun May 28, 2006 5:57 pm Post subject: |
|
|
I found it nececery to add dev-lang/swig ~x86 to /etc/portage/package.keywords
in order to get emerge -e world
[edit] also echo dev-util/subversion ~x86 >> /etc/portage/package.keywords |
|
Back to top |
|
|
syouth Apprentice
Joined: 18 Sep 2004 Posts: 275
|
Posted: Sun May 28, 2006 10:10 pm Post subject: |
|
|
Here's what I did. Upgraded from gcc 3.4.6 to 4.1.1, did emerge -e system and emerge -e world successfully. Then came back from weekend trip and rebuilt kernel with new complier and rebooted. And it all ended like I knew. Everything seems to be working fine and that's it.
Thank devs and all who did give their contribution. |
|
Back to top |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Sun May 28, 2006 10:45 pm Post subject: |
|
|
well I have three pcs in two lacations.
near pc is a athlon-XP +3200 1.5 Gb
far pc P4 1.8A 0.5Gb
far laptop P3 750Mhz 256Mb
sure would be helpfull to add a time estimation to the tutorial.
I mean, I palnned to upgrade my internet connection tomorrow , but all pcs - are still quite busy.. |
|
Back to top |
|
|
GetCool Guru
Joined: 23 Nov 2003 Posts: 324 Location: Madison, Wisconsin
|
Posted: Mon May 29, 2006 1:36 am Post subject: |
|
|
nivw wrote: | sure would be helpfull to add a time estimation to the tutorial. |
I don't see how any such estimation could be accurately given. Compilation times can be affected by many different factors, and whenever you do an "emerge -e system/world" command, you should expect your PC to be busy for quite some time...
Also, as has been discussed at length, performing:
Code: | emerge -e system
emerge -e world |
...is not always enough to ensure that your system is completely up-to-date. A complete recompilation of the entire system will include:
Code: | emerge -e system
emerge -e system
emerge -e world
emerge -e world |
...which will of course take quite a bit of time. |
|
Back to top |
|
|
VanDan Guru
Joined: 30 Sep 2002 Posts: 586 Location: Australia
|
Posted: Wed May 31, 2006 12:12 am Post subject: Not worth it, but safe |
|
|
I've been testing out various versions of gcc on various computers, and here are my conclusions.
Firstly, for everything that I do ( primary desktop usage machines here ), gcc-4.1.x is safe.
On PPC systems, gcc-4.1.x is also ever so slightly faster. On my Turion64 notebook, running a 64-bit system, though, there is a performance drop.
The test:
I compiled Enlightenment-0.17 and all of it's dependancies with both compilers. I then started Enlightenment ( with no modules running, no animated backgrounds, etc ), and ran evas_software_x11_test 4 times. I then switched compilers, recompiled all dependancies, restarted E, and re-tested.
CFLAGS="-march=k8 -O2 -pipe -fweb -ftracer" with both compilers.
The systems:
15i Apple Powerbook ( TiBook ) with 1Ghz G4 and 1GB RAM.
17i Turion64 Notebook with 2.2Ghz Turion and 1GB RAM.
The results ( evas benchmark scores ):
G4 / gcc-3.4.4
2.237
2.238
2.229
2.237
G4 / gcc-4.1.0-beta20050902 ( and yes I realise this is old ... it was a while ago )
2.293
2.286
2.299
2.306
So we're looking at about a 2 - 3.5 % increase from gcc-3.4.4 to gcc-4.1.0. Not too bad. Certainly not a compelling reason in itself to upgrade, but it's better than a kick up the arse.
Turion64 / gcc-3.4.6
8.312
8.287
8.348
8.341
Turion64 / gcc-4.1.1
8.124
8.098
8.130
8.154
Here we've got a 2 % decrease in performance.
Now of course there are benchmarks, and then there are benchmarks. This is one benchmark. Read into it what you will, but I'm seeing a small gain for PPC systems, and a small loss for AMD64 systems. _________________ David Hicks' plea. Was it:
a) I plead guilty, or
b) Please let me out of here and end the torture |
|
Back to top |
|
|
Corpse Fiend n00b
Joined: 21 Jun 2005 Posts: 12
|
Posted: Wed May 31, 2006 12:28 am Post subject: |
|
|
Recently I've performed a full stage1 install on a pentium3 machine with gcc-4.1.1. Bootstrap and emerge -e system went without significant errors (only portage screwing dependencies sometimes, easy to resolve). The only issue was what I've already mentioned in this topic. |
|
Back to top |
|
|
engineermdr Apprentice
Joined: 08 Nov 2003 Posts: 295 Location: Altoona, WI, USA
|
Posted: Wed May 31, 2006 2:35 pm Post subject: Re: Not worth it, but safe |
|
|
VanDan wrote: | The systems:
15i Apple Powerbook ( TiBook ) with 1Ghz G4 and 1GB RAM.
17i Turion64 Notebook with 2.2Ghz Turion and 1GB RAM.
The results ( evas benchmark scores ):
G4 / gcc-3.4.4
2.237
2.238
2.229
2.237
G4 / gcc-4.1.0-beta20050902 ( and yes I realise this is old ... it was a while ago )
2.293
2.286
2.299
2.306
So we're looking at about a 2 - 3.5 % increase from gcc-3.4.4 to gcc-4.1.0. Not too bad. Certainly not a compelling reason in itself to upgrade, but it's better than a kick up the arse.
Turion64 / gcc-3.4.6
8.312
8.287
8.348
8.341
Turion64 / gcc-4.1.1
8.124
8.098
8.130
8.154
Here we've got a 2 % decrease in performance.
Now of course there are benchmarks, and then there are benchmarks. This is one benchmark. Read into it what you will, but I'm seeing a small gain for PPC systems, and a small loss for AMD64 systems. |
I came to about the same conclusion using my unofficial Athlon64 benchmarks using gzip, bzip2, lame, flac, gpg. But honestly, the machine as a whole seems to rip through configure scripts and compiling a little faster. The big push for me was gcc-4.1.1 was the first time I was able to get the KDE visibility and as-needed stuff to work right and that did make a big difference.
What's really surprising though, is how much faster the G4 is compared to the Turion64/Athlon64. Is the Turion that much slower or do you think this is just an issue of the benchmark of choice? |
|
Back to top |
|
|
Xithix Apprentice
Joined: 31 Dec 2004 Posts: 228
|
Posted: Wed May 31, 2006 2:57 pm Post subject: |
|
|
Higher is better. The Turion was much faster. |
|
Back to top |
|
|
engineermdr Apprentice
Joined: 08 Nov 2003 Posts: 295 Location: Altoona, WI, USA
|
Posted: Wed May 31, 2006 3:24 pm Post subject: |
|
|
Ah, that makes sense then. I thought those numbers were execution time in seconds. |
|
Back to top |
|
|
<3 Veteran
Joined: 21 Oct 2004 Posts: 1081
|
Posted: Thu Jun 01, 2006 5:44 am Post subject: |
|
|
Just upgraded to gcc 4.1.1 and rebuild toolchain + world with very few problems. I have not done any benchmarks but imo my systems seems to be running noticably smoother. The only packages that I was not able to get to compile were wine, unrar and gaim-encryption. I would suggest that everyone that has not done so upgrade to gcc 4.1.1 its worth it. |
|
Back to top |
|
|
Bloop n00b
Joined: 07 Oct 2005 Posts: 26 Location: Germany
|
Posted: Thu Jun 01, 2006 6:52 am Post subject: |
|
|
Hey
I'm just compiling world (435 packages) with GCC 4.1.1 .
went smoothy atfer I removed pam-login cause it was blocking shadow.
No reboot done since recompilation of the system. I will report my progress when all is done.
Greetz |
|
Back to top |
|
|
|