Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 4.1
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Mon Jul 11, 2005 8:37 am    Post subject: GCC 4.1 Reply with quote

This thread is a continuation of the GCC 4.0 thread in Portage and Programming. GCC 4.1 hit stage 3 on July 8th, meaning that all the major projects have more or less been committed and the branch is open for regression fixes only.

GCC 4.1 is still very alpha software. It does contain major bugs, known and unknown, and will not give you a stable system. People who might be interested in using 4.1 now are people who want to help debug the compiler itself or developers who want to see how their code will work with future versions. If you decide to try out 4.1, expect that things will break badly and often, and you will need to fix them on your own. :wink:

Projects contributed in stage 1 and 2
New C Parser
LibAda GNATTools Branch
Code Sinking
Improved phi-opt
Structure Aliasing Part I
Autovectorization Enhancements
Hot and Cold Partitioning
SMS Improvements
Integrated Immediate Uses
Tree Optimizer Cleanups
Variable-argument Optimization
Redesigned VEC API
IPA Infrastructure
Altivec Rewrite
Warning Message Control
New SSA Operand Cache Implementation
Structure Aliasing Part II
Safe Builtins
Reimplementation of IBM Pro Police Stack Detector (-fstack-protector)
New DECL hierarchy
Compilation Level Analysis of Types and Static Variables

Known regressions
http://gcc.gnu.org/wiki/Regressions

Helpful Links
GCC Wiki - http://gcc.gnu.org/wiki/
GCC Development Manual - http://gcc.gnu.org/onlinedocs/gcc/
GCC Development Internals Documentation - http://gcc.gnu.org/onlinedocs/gccint/
GCC Bugs Guide - http://gcc.gnu.org/bugs.html
Testing GCC - http://gcc.gnu.org/wiki/TestingGCC
Debugging GCC - http://gcc.gnu.org/wiki/DebuggingGCC
_________________
by design, by neglect
for a fact or just for effect


Last edited by rhill on Sun Jul 17, 2005 6:46 pm; edited 2 times in total
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Tue Jul 12, 2005 3:06 pm    Post subject: Reply with quote

guess we'll start seeing actual performance increases over the 3.4 series now, anyone have any numbers comparing gcc4 and 4.1?
Back to top
View user's profile Send private message
scoobydu
Veteran
Veteran


Joined: 16 Feb 2003
Posts: 1076
Location: 'Mind the Gap'

PostPosted: Tue Jul 12, 2005 4:31 pm    Post subject: Reply with quote

Whats the general opinion on support for gcc4.x?

Is it ready for a non techie to try? ;)

I tried early 4 but without much success ..
_________________
Tyan Tiger K8W, 2xOpteron 240,Powerbook5,6 15" 1.5g, Macbook Black 2g, Mac Mini 1g, Ipod P60g.
| Linux - From a windows user perspective|
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Tue Jul 12, 2005 4:48 pm    Post subject: Reply with quote

ProPolice is now integrated into vanilla gcc ? I suppose it works the same way with the same flags as with the patch ?

What's the difference between ProPolice and FORTIFY_SOURCE - or whatever it's called ?
Back to top
View user's profile Send private message
aspenhydrowave
n00b
n00b


Joined: 08 Dec 2004
Posts: 41

PostPosted: Tue Jul 12, 2005 6:53 pm    Post subject: Reply with quote

neuron wrote:
guess we'll start seeing actual performance increases over the 3.4 series now, anyone have any numbers comparing gcc4 and 4.1?


Running some numerical simulation, I've seen the best performance with gcc 3.4. 4.0 was 30% slower and 4.1.0-20050709 is 15% slower. So I guess we're waiting for 4.2 to actually see performance gains... sigh

of course this is just one isolated example; it may be faster in many other areas.
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Tue Jul 12, 2005 6:55 pm    Post subject: Reply with quote

aspenhydrowave wrote:
neuron wrote:
guess we'll start seeing actual performance increases over the 3.4 series now, anyone have any numbers comparing gcc4 and 4.1?


Running some numerical simulation, I've seen the best performance with gcc 3.4. 4.0 was 30% slower and 4.1.0-20050709 is 15% slower. So I guess we're waiting for 4.2 to actually see performance gains... sigh

of course this is just one isolated example; it may be faster in many other areas.


well have you tried current 4.1? There are a few things in the links in the first post that should have performance improvements.
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Tue Jul 12, 2005 11:05 pm    Post subject: Reply with quote

Can I install gcc 4.1 on another slot and use it ??
From what I recall this wasn't possible before due to some conflicts with glibc I guess.

If I want to use gcc 4.1, can I just install it and keep changing it with gcc-config ?
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Tue Jul 12, 2005 11:56 pm    Post subject: Reply with quote

luisfelipe wrote:
Can I install gcc 4.1 on another slot and use it ??
From what I recall this wasn't possible before due to some conflicts with glibc I guess.

If I want to use gcc 4.1, can I just install it and keep changing it with gcc-config ?


emerge -p on gcc4 shows NS for me (new, slot), so it seems so.

I sure hope so because that's what I'm planning to do, just to test it a bit performance wise ;)
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Wed Jul 13, 2005 12:19 am    Post subject: Reply with quote

I tought I read it somewhere that it wasn't working, but the GCC 4.x threads are so big I can't
find it again :P

Well, just finishing compiling kdelibs, gonna try to install that later and see how it goes.
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Wed Jul 13, 2005 7:11 am    Post subject: Reply with quote

Well, I'm trying to install it, and I'm getting this error :

/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c: In function 'build_tree_conflict_graph':
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c:1463: error: corrupted profile info: number of executions for edge 97-121 thought to be 6280
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c:1463: error: corrupted profile info: number of executions for edge 97-98 thought to be -3705
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c:1463: error: corrupted profile info: number of executions for edge 147-143 thought to be -2308
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c:1463: error: corrupted profile info: number of executions for edge 147-148 thought to be 3592
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c:1463: error: corrupted profile info: number of executions for edge 149-147 thought to be -1291
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/tree-ssa-live.c:1463: error: corrupted profile info: number of executions for edge 149-150 thought to be 9503
make[2]: *** [tree-ssa-live.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.0_beta20050709/work/build/gcc'
make[1]: *** [stagefeedback_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.0_beta20050709/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.0_beta20050709 failed.
!!! Function gcc_do_make, Line 1211, Exitcode 2
Back to top
View user's profile Send private message
thersites
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2004
Posts: 101
Location: South West China

PostPosted: Wed Jul 13, 2005 11:58 am    Post subject: Reply with quote

I've been running a gcc-4.1 built system since 20050502.
With binutils-2.16.91.0.1 mozilla-firefox, the last package that was broken with gcc-4.1, sucessfully builds and runs.
However, still, if binutils is built with -O1, the gcc build fails.

So my CFLAGS ...
Code:
CFLAGS="-march=i686 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -pipe"

which is about half of -O1.
With these I can emerge -e world - no kde/gnome! - with only libvorbis patched/hacked.

linux-2.6.13-rc* boots when built with gcc-4.1, but the iptable_filter module will not load and intel8x0/snd_ac97_codec give me no sound. I also have this sound problem when 2.6.13-rc*'s are built with gcc-4.0.1. linux-2.6.12 doesn't boot when built with 4.1
Back to top
View user's profile Send private message
scoobydu
Veteran
Veteran


Joined: 16 Feb 2003
Posts: 1076
Location: 'Mind the Gap'

PostPosted: Wed Jul 13, 2005 12:32 pm    Post subject: Reply with quote

thersites wrote:
I've been running a gcc-4.1 built system since 20050502.
With binutils-2.16.91.0.1 mozilla-firefox, the last package that was broken with gcc-4.1, sucessfully builds and runs.
However, still, if binutils is built with -O1, the gcc build fails.

So my CFLAGS ...
Code:
CFLAGS="-march=i686 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -pipe"

which is about half of -O1.
With these I can emerge -e world - no kde/gnome! - with only libvorbis patched/hacked.

linux-2.6.13-rc* boots when built with gcc-4.1, but the iptable_filter module will not load and intel8x0/snd_ac97_codec give me no sound. I also have this sound problem when 2.6.13-rc*'s are built with gcc-4.0.1. linux-2.6.12 doesn't boot when built with 4.1


Thx for the info :)
_________________
Tyan Tiger K8W, 2xOpteron 240,Powerbook5,6 15" 1.5g, Macbook Black 2g, Mac Mini 1g, Ipod P60g.
| Linux - From a windows user perspective|
Back to top
View user's profile Send private message
Gestalt73
n00b
n00b


Joined: 02 Jun 2004
Posts: 29

PostPosted: Wed Jul 13, 2005 9:11 pm    Post subject: Compile error for 4.1.0_beta20050709 [SOLVED] Reply with quote

UPDATE: Relaxed my CFLAGS to "-01 -march=athlon-xp -pipe" and was able to compete the compile.

The compile failed with my "agressive" flags: "-O3 -march=athlon-xp -fomit-frame-pointer -pipe -ffast-math"
Still a bit early for those I suppose.

Tried twice compiling with GCC 4.0.1 and GCC 3.4.3 and the compile fails here:

Code:
: In function 'loop_delete_branch_edge':
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/cfgloopmanip.c:791: error: coverage mismatch for function 'loop_delete_branch_edge' while reading counter 'arcs'
/var/tmp/portage/gcc-4.1.0_beta20050709/work/gcc-4.1-20050709/gcc/cfgloopmanip.c:791: error: number of counters is 14 instead of 15
make[2]: *** [cfgloopmanip.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.0_beta20050709/work/build/gcc'
make[1]: *** [stagefeedback_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.0_beta20050709/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.0_beta20050709 failed.
!!! Function gcc_do_make, Line 1211, Exitcode 2
!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.


UPDATED: to show more of error message
UPDATED: to show successful compile

Alan
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sat Jul 16, 2005 5:35 am    Post subject: Reply with quote

A couple automated benchmarks:
http://www.inf.u-szeged.hu/csibe/
http://people.redhat.com/dnovillo/spec2000/gcc/individual-run-ratio.html

For those having trouble compiling GCC, it could be the snapshot was taken at a time the tree was broken. You could try another snapshot or pull the code from CVS. Instructions are linked to on the GCC home page.
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
m0p
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 205
Location: en_GB

PostPosted: Sun Jul 17, 2005 3:55 am    Post subject: Reply with quote

I am going to install gcc 4.1 to test certain apps, so, before I emerged it, I ran it with -p to see what dependencies it would need. It seems it needs a new binutils. Would I need to use this new binutils for executing apps generated by the new gcc, or only for compiling them, or, is it neccesary to use the new one at all?
Back to top
View user's profile Send private message
voidengineer
n00b
n00b


Joined: 11 Feb 2005
Posts: 54

PostPosted: Sun Jul 17, 2005 11:13 am    Post subject: Re: Compile error for 4.1.0_beta20050709 [SOLVED] Reply with quote

Gestalt73 wrote:
UPDATE: Relaxed my CFLAGS to "-01 -march=athlon-xp -pipe" and was able to compete the compile.

The compile failed with my "agressive" flags: "-O3 -march=athlon-xp -fomit-frame-pointer -pipe -ffast-math"
Still a bit early for those I suppose.

Alan


It is ALWAYS going to be to "early" or unwise to compile with -ffast-math. This compiler flag really should only be explicitly defined on a per file basis like in makefiles for example.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sun Jul 17, 2005 12:08 pm    Post subject: Reply with quote

m0p wrote:
I am going to install gcc 4.1 to test certain apps, so, before I emerged it, I ran it with -p to see what dependencies it would need. It seems it needs a new binutils. Would I need to use this new binutils for executing apps generated by the new gcc, or only for compiling them, or, is it neccesary to use the new one at all?


I don't think it's neccessary but it doesn't hurt. Just turn on the multislot USE flag and install the new binutils in parallel to the old one and you can play with both. ;) Any version above 2.16 will work, and you should probably use the newer binutils to build gcc itself. I haven't tried building gcc with unmasked versions of binutils or glibc for a quite a while so I don't know if it even works.
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
pgrdsl
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2002
Posts: 93
Location: Southampton, UK

PostPosted: Sun Jul 17, 2005 3:27 pm    Post subject: Is it just me, or are the installation directories screwed? Reply with quote

I'm trying to work out what has changed between the 4.0* family and 4.1* with regards to the ebuild/installation process.

My installation of 4.1-beta20050709 has some things installed in /usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050709 and some in /usr/lib/gcc/i686-pc-linux-gnu/4.1.0.
Unfortunately, the stuff in 4.1.0 are things like: fixincludes'd headers and libstdc++, and gcc-config is helpfully suggesting that binaries and libraries are in the other one.
Yes, I can frig things to get things to work, but this split installation directory doesn't seem right to me.

I raised this on the gcc bugs and got an immediate response of: --enable-version-specific-runtime-libs overrides all the other directories listed in configure.
Which is fair enough, and what the makefiles say - so why is --enable-version-specific-runtime-libs there?

Anyway, I'm intrigued: how come other people's 4.1 installs are working?
_________________
pihl
Back to top
View user's profile Send private message
m0p
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 205
Location: en_GB

PostPosted: Sun Jul 17, 2005 4:03 pm    Post subject: Reply with quote

According to "emerge -p =gcc-4.1.0_beta20050709", the new binutils won't install into another slot, it just upgrades, is there any bugs in the newer binutils?

EDIT: And which binutils should I install out of this list:
Code:
sys-devel/binutils-2.16.1
sys-devel/binutils-2.16-r1
sys-devel/binutils-2.16.91.0.1
sys-devel/binutils-2.16.90.0.3
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sun Jul 17, 2005 4:29 pm    Post subject: Reply with quote

did you add multislot to your USE flags in make.conf? if you did, try just emerge -pv binutils and see if that comes up as a slotted install.

any of those is fine. i have them all installed. ;P 2.16.1 is the latest testing version and fixes some bugs that were in 2.16, so maybe that would be the one to start with.
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
m0p
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 205
Location: en_GB

PostPosted: Sun Jul 17, 2005 4:32 pm    Post subject: Reply with quote

Yes, I have multislot, but emerge -pv still doesnt say about creating a new slot.
Back to top
View user's profile Send private message
m0p
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 205
Location: en_GB

PostPosted: Tue Jul 19, 2005 6:48 am    Post subject: Reply with quote

Oh, got it installed now. I have run gcc-config as root, and ran env-update && source /etc/profile but gcc --version still says 3.4.4, but if I run as root it says 4.1.0. What is wrong?

Edit: Woops, selected wrong profile! disregard this post.
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Tue Jul 19, 2005 3:50 pm    Post subject: Re: GCC 4.1 Reply with quote

@everyone, don't play with gcc-4.1 on a live system unless u do not mind it borking, play with it on a spare partition or in a chrooted environment. And while you are playing with it, take it easy with your compiler flags, -O1 in gcc-4.1 land, is beaucoup optimizations, which may or may not work, at the time of writing.
happy Gentooing
Back to top
View user's profile Send private message
m0p
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 205
Location: en_GB

PostPosted: Tue Jul 19, 2005 4:06 pm    Post subject: Reply with quote

I am using gcc 4.1, for external use. I am not compiling anything in portage with it. For example, I am using it to build the nightly sources of Firefox and Thunderbird, but with no good results! Here is the output of the firefox startup script after compiling the latest nightly with 4.1, and a stripped down set of CFLAGS:

Code:
joe@mopbox ~/Firefox_Source/mozilla/dist/bin $ ./firefox
./run-mozilla.sh: line 131:  2456 Segmentation fault      "$prog" ${1+"$@"}


Pretty crappy, eh? :(
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Tue Jul 19, 2005 4:09 pm    Post subject: Reply with quote

well nobody said it was stable yet, just that it's getting there ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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