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

Goto page Previous  1, 2, 3, 4, 5 ... 71, 72, 73  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 346
Location: Netherlands

PostPosted: Mon Jan 05, 2004 12:11 pm    Post subject: Reply with quote

There is no easy way to see what is updated in each snapshot. I suggest looking at the patches mailing list and the cvs mailing list, but unfortunately, these are not really organized, and sometimes hard to understand what a patch does, and how it affects you.

The java builds just fine for me, but I'm not really into that sort of thing.
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Wed Jan 07, 2004 11:01 pm    Post subject: Reply with quote

The gcc-lib-location.patch doesn't work anymore with today's snapshot of gcc 3.4 (2004-01-07). I'm not sure how to fix it or if it even matters, though.

edit: I'm leaving this behind now. 3.4 seems too much like a moving target.
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 346
Location: Netherlands

PostPosted: Wed Jan 07, 2004 11:25 pm    Post subject: Reply with quote

Found that out just now also.
Browsing through the Changelog showed that there was a file rename.
I've uploaded the new location patch here

http://fca.shacknet.nu/files/gcc-lib-location.patch
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Thu Jan 08, 2004 12:02 am    Post subject: Reply with quote

Hmm well that was quick. You sure seem to know a lot more about this than I do. I'll give it a shot later then and let you know how it goes.
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Thu Jan 08, 2004 5:02 am    Post subject: Reply with quote

Patched worked perfectly, and the compiler seems to work. Just built kernel 2.4.25_pre4 with it with no problems (yet)
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 346
Location: Netherlands

PostPosted: Thu Jan 08, 2004 1:11 pm    Post subject: Reply with quote

"Seem" is the right word. I know next to nothing about C and such, but checking the CVS logs tells me what to do ;)

Anyway, I'm going to report on the bug that the patch is for. It's rather silly to leave this around, when the patch fixes it well, as far as I can see...

And you built kernel 2.4.25-pre4 with it? I never imagined that it would be possible to compile a 2.4.x kernel with it.
Did you have to use -fno-unit-at-a-time to compile it?
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Thu Jan 08, 2004 7:16 pm    Post subject: Reply with quote

Yes I compiled the kernel with -fno-unit-at-a-time. Worked without any errors at all (though lots of warnings but that's normal).

I'll try to keep watching the development on this for a while. Though the school semester just started for me so I may not have as much time to keep checking the latest snapshots.

Fluxbox (0.9.7) compile dies with a different weird error now (I know, I keep going back to fluxbox). It compiles a few files then does this...

Code:
g++ -DHAVE_CONFIG_H -I. -I. -I../..     -O2 -march=athlon-tbird  -I/usr/X11R6/include -DSHAPE  -I/usr/X11R6/include -I/usr/include/freetype2    -c -o Menu.o `test -f Menu.cc || echo './'`Menu.cc
Menu.cc: In member function `void FbTk::Menu::update(int)':
Menu.cc:496: error: no matching function for call to `FbTk::FbPixmap::FbPixmap(FbTk::FbPixmap&)'
which doesn't make much sense to me since the function should be there.
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Thu Jan 08, 2004 8:20 pm    Post subject: Reply with quote

openssh and cdrtools both compile with gcc 3.4. I haven't tested burning CD's yet but the "cdrecord -scanbus" option worked at least. I'll burn some this weekend.
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Thu Jan 08, 2004 11:14 pm    Post subject: Reply with quote

gimp 2.0 compiles and runs with gcc 3.4

This is the ebuild I made for the gimp 2.0

btw is anyone keeping a list of what's worked so far with 3.4? Here's the list of everything I've had success with so far, there may be more that other people have tried:

gnupg
kernel 2.4.25_pre4 (needs -fno-unit-at-a-time)
baselayout
libtool
procps
portmap
pciutils
usbutils
aterm
glibc
man
bash
shadow
xine-lib
libgd
openssl
php (both CLI and CGI)
mod_php
rsync
slocate
cdrtools
openssh
gimp 2.0

fca, have you been able to do a complete emerge system with 3.4 yet? I'm afraid to try. :P
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Sat Jan 10, 2004 4:34 am    Post subject: Reply with quote

xfce 4.0.3 compiles and runs fine with gcc 3.4
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Sat Jan 10, 2004 10:21 pm    Post subject: Reply with quote

Alright here's some numbers:

povray compiled with gcc 3.3.2 and gcc 3.4, rendering the benchmark.pov and benchmark.ini files found on this page on povray's site.

gcc 3.3.2-r5 (branch update 2003-12-18)
Code:
    Total Time:    1 hours 11 minutes   7.0 seconds (4267 seconds)


gcc 3.4 (snapshot 2004-01-07)
Code:
    Total Time:    1 hours  5 minutes  37.0 seconds (3937 seconds)


This is on an athlon-tbird @ 1ghz with 256MB of mem (povray only used about 9MB) with nothing else running during the time it was rendering.

CFLAGS used in both compiles were "-O3 -march=athlon-tbird -fomit-frame-pointer -fmove-all-movables -frename-registers -finline-functions -ffast-math -funroll-loops -fexpensive-optimizations -malign-double -foptimize-sibling-calls -minline-all-stringops -Wno-multichar"

(everything starting with -finline-functions was included by povray's configure by default)

gcc 3.4 provided a 7.73% reduction in rendering time!

And just for the sake of completeness, I also tested icc 8.0.055, using CFLAGS -O3 -xM -ip. This probably isn't quite as representative on an athlon (I don't own any pentiums) and I'm not sure what all CFLAGS I should've used besides these. Here's the time:
Code:
    Total Time:    1 hours  6 minutes  16.0 seconds (3976 seconds)


Anyone know what other apps I can use for benchmarking?
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Sun Jan 11, 2004 6:31 pm    Post subject: Reply with quote

I tried compiling koffice with gcc 3.4 and wasn't successful. I managed to get most of its dependents compiled with gcc 3.4 but koffice itself and wv2 wouldn't work.

kde-env-3-r2 (duh, this is just a single text file)
libid3tag-0.15.0b
libmad-0.15.0b-r1
arts-1.1.4
libpcre-4.4
kdelibs-3.1.4 (man this took a long time)
wv2-0.2 (used gcc 3.3.2 for this)
koffice-1.3_rc2 (used gcc 3.3.2 for this)


I ran into problems during compiling arts and kdelibs. In arts, there was an error about a semicolon on line 193 of flow/stereovolumecontrol_impl.cc. I edited the file to remove the semicolon then resumed by doing emerge path-to-arts.ebuild compile, emerge ... install, and emerge ... qmerge and it worked just fine. I suppose it has something to do with the new -pedantic behavior:

Quote:
When -pedantic is used, G++ now issues errors about spurious semicolons. For example,

namespace N {}; // Invalid semicolon.
void f() {}; // Invalid semicolon.

From this page on gcc's site.

Same problem with kdelibs in the file kmcupsfactory.cpp. Same solution as above.

How could one go about removing -pedantic (why is this even enabled?) in the ebuild? It is not set in my CFLAGS or in the ebuild.

Also during compiling wv2 there was a problem with std::ios in wvlog.h. The compiler errored with "std::ios is not a template" and I looked at the file and saw it was using std::ios<char> so I deleted the <char> part in 4 different places and that fixed it. Then later in the compile it had problems with private declarations or such so I switched to gcc 3.3.2.

koffice had problems with "no function match for ...something" with gcc 3.4 so I used gcc 3.3.2 for this as well.

I'm not that good with c++ but it seems that either gcc 3.4 is more strict or it has some issues. Probably the former in this case.


<rant>Why does koffice depend on arts, libid3tag, and libmad ? koffice is an office app, not an mp3 player</rant>
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Mon Jan 12, 2004 2:18 am    Post subject: Reply with quote

NeighborhoodGullwings wrote:
gcc 3.4 (snapshot 2004-01-07)
Code:
    Total Time:    1 hours  5 minutes  37.0 seconds (3937 seconds)


CFLAGS used in both compiles were "-O3 -march=athlon-tbird -fomit-frame-pointer -fmove-all-movables -frename-registers -finline-functions -ffast-math -funroll-loops -fexpensive-optimizations -malign-double -foptimize-sibling-calls -minline-all-stringops -Wno-multichar"


Can you benchmark again using -ftracer? This is by far and away the best available CFLAGS option I've found for most pieces of code.

My CFLAGS are:

Code:
CFLAGS="-O3 -march=athlon-xp -msse -mmmx -m3dnow -momit-leaf-frame-pointer -fomit-frame-pointer -funroll-loops -ftracer -ffast-math -fprefetch-loop-arrays -freduce-all-givs -finline-limit=600 -mfpmath=387 -pipe"


which were determined using the aforementioned acovea. I think this is close to the best possible for a system-wide CFLAGS setting for an Athlon XP. Interestingly, -mfmpath=sse and -mfpmath=sse,387 both usually return worse results than -mfpmath=387 on the Athlon XP.
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Mon Jan 12, 2004 4:13 am    Post subject: Reply with quote

robmoss2k wrote:
Can you benchmark again using -ftracer?


Sure:

Code:
    Total Time:    1 hours  2 minutes  41.0 seconds (3761 seconds)


Very nice. :P
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Mon Jan 12, 2004 9:35 pm    Post subject: Reply with quote

NeighborhoodGullwings wrote:
robmoss2k wrote:
Can you benchmark again using -ftracer?


Sure:

Code:
    Total Time:    1 hours  2 minutes  41.0 seconds (3761 seconds)


Very nice. :P


Glad it worked! That's a *massive* reduction.

To whoever got the kernel to compile with GCC 3.4 - could you please tell me exactly how you managed it? I can't get any kernel to compile. Having serious difficulties, as I kinda need one of those. However, I should report that I've managed to do a Stage 1 install using GCC 3.4 from the ground up - I may be the first to do this :D - and am only struggling a little bit now. Bloody kernel...
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Mon Jan 12, 2004 9:54 pm    Post subject: Reply with quote

robmoss2k wrote:
To whoever got the kernel to compile with GCC 3.4 - could you please tell me exactly how you managed it? I can't get any kernel to compile. Having serious difficulties, as I kinda need one of those. However, I should report that I've managed to do a Stage 1 install using GCC 3.4 from the ground up - I may be the first to do this :D - and am only struggling a little bit now. Bloody kernel...

Which kernel version? I got a 2.4 kernel to compile without any problems by just adding -fno-unit-at-a-time to the kernel's Makefile (on 2.4.25_pre4 this is on line 94 but there may be other places you could add it that would work). Then you're ready to go :)

Similar solution for 2.6 I would guess but I haven't tried it myself. I think someone else here has though, maybe fca has. Read the other pages.

How did you do an emerge system with 3.4? Did you have to edit the portage profile or anything?
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Mon Jan 12, 2004 10:07 pm    Post subject: Reply with quote

NeighborhoodGullwings wrote:
robmoss2k wrote:
To whoever got the kernel to compile with GCC 3.4 - could you please tell me exactly how you managed it? I can't get any kernel to compile. Having serious difficulties, as I kinda need one of those. However, I should report that I've managed to do a Stage 1 install using GCC 3.4 from the ground up - I may be the first to do this :D - and am only struggling a little bit now. Bloody kernel...

Which kernel version? I got a 2.4 kernel to compile without any problems by just adding -fno-unit-at-a-time to the kernel's Makefile (on 2.4.25_pre4 this is on line 94 but there may be other places you could add it that would work). Then you're ready to go :)

Similar solution for 2.6 I would guess but I haven't tried it myself. I think someone else here has though, maybe fca has. Read the other pages.

How did you do an emerge system with 3.4? Did you have to edit the portage profile or anything?


I've tried with a few - gentoo-sources, gentoo-dev-sources, development-sources and mm-sources. All terminate with this error:

fs/built-in.o(.text+0x81bf3): In function `sprintf_item_head':: undefined reference to `strcpy' / make: *** [.tmp_vmlinux1] Error 1

Doing an emerge system with 3.4 isn't too hard. You first have to put the 3.4 ebuild in /usr/local/portage, having set up make.conf correctly, and then you run bootstrap. This only builds GCC 3.4 with C support, though, so next up is emerge --oneshot gcc. Then you do an 'emerge system'. If something doesn't compile, make a note of which package it is, and do an CFLAGS="{insert flags here} -fno-unit-at-a-time" emerge --oneshot <package-name>. This works for every package, as long as you remember that openssl is a special case which doesn't compile with -freduce-all-givs, and glib-1.2.10-r5.

To compile glib-1.2.10-r5, you'll need to create a patch for the package which removes instances of G_GNUC_PRETTY_FUNCTION from gstrfuncs.c. This could, perhaps, be my kernel issue - I don't honestly know. But any ideas with regards the kernel would be good...
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Mon Jan 12, 2004 10:19 pm    Post subject: Reply with quote

Okay, I got 2.4.25-pre4 installed. It's the only one that worked. Thanks very much!

Wish me luck - I'm going to try and boot it now...
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 346
Location: Netherlands

PostPosted: Mon Jan 12, 2004 10:36 pm    Post subject: Reply with quote

Have you tried my patch?
http://fca.shacknet.nu/files/gcc34nounitatatime.patch

I got your error, before I figured out how to add -fno-unit-at-a-time in the kernel makefile. After this patch (use patch -p1 -i /path/to/patch in the kernel src directory to patch) kernel 2.6.x compiles perfectly (NeighborhoodGullwings has compiled 2.4.x succesfully with something like this)
I can't be really active with this for the next few days though, so probably no updates from me.

edit: spent too long writing my post :(
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Mon Jan 12, 2004 11:46 pm    Post subject: Reply with quote

fca wrote:
Have you tried my patch?
http://fca.shacknet.nu/files/gcc34nounitatatime.patch

I got your error, before I figured out how to add -fno-unit-at-a-time in the kernel makefile. After this patch (use patch -p1 -i /path/to/patch in the kernel src directory to patch) kernel 2.6.x compiles perfectly (NeighborhoodGullwings has compiled 2.4.x succesfully with something like this)
I can't be really active with this for the next few days though, so probably no updates from me.

edit: spent too long writing my post :(


I've successfully installed the 2.4.25-pre4 kernel using the -fno-unit-at-a-time trick, so I have a kernel. And it works :)

Now on to compiling an entire system from the ground up - lots of erroneous C++ semi-colons to deal with. This will take some time, but once I'm finished, I'll put a tarball of my portage overlay up somewhere universally accessible for the purposes of allowing others to do a completely 3.4 stage 1 install.
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
NeighborhoodGullwings
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 159

PostPosted: Tue Jan 13, 2004 3:11 am    Post subject: Reply with quote

Thanks for the work robmoss2k.

Rather than deleting the semicolons and such, I think it would be easier to hack some ebuilds to sed out the -pedantic flags from the makefiles. I've seen some ebuilds that will make a sed file then run it on the makefile. One I can think of right now is the povray 3.5 ebuild, see how it uses sed for an example.

I wonder why the gcc devs decided to make -pedantic toss errors. I thought it was only supposed to do warnings.
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 346
Location: Netherlands

PostPosted: Tue Jan 13, 2004 1:02 pm    Post subject: Reply with quote

Or even better yet, forward the patches/errors to the authors of the packages. Especially the spurious ; errors could easily be fixed. And the new parser will be used in every new GCC version, including the exciting SSA tree, so everyone better be prepared.
Back to top
View user's profile Send private message
jcmorris
Apprentice
Apprentice


Joined: 11 Jun 2003
Posts: 174

PostPosted: Wed Jan 14, 2004 2:07 am    Post subject: Reply with quote

Hey guys, I heard acovea mentioned. Anybody know where I can download it? The usual website is down. Thanks!

jcm
_________________
Desktop:
Athlon64 3000+ (Socket 939 Venice)
Asus A8N-SLI
1GB Dual-Channel DDR 3200
NVidia Geforce 6800 256MB

Laptop:
IBM R40
Pentium M 1.4 GHz
256 MB RAM
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 346
Location: Netherlands

PostPosted: Wed Jan 14, 2004 12:56 pm    Post subject: Reply with quote

mirror of acovea 3.0.0 on http://fca.shacknet.nu/files/acovea.3.0.0.tar.bz2
I don't have the new 3.3.0 version sadly.

Also found some new compiler options, which add some speed to my Lame benchmark (MP3 encoding):
-fsched2-use-superblocks and -fsched2-use-traces

Quote:
-fsched2-use-superblocks
When scheduling after register allocation, do use superblock scheduling algorithm. Superblock scheduling allows motion across basic block boundaries resulting on faster schedules. This option is experimental, as not all machine descriptions used by GCC model the CPU closely enough to avoid unreliable results from the algorithm.

This only makes sense when scheduling after register allocation, i.e. with -fschedule-insns2 or at -O2 or higher.

-fsched2-use-traces
Use -fsched2-use-superblocks algorithm when scheduling after register allocation and additionally perform code duplication in order to increase the size of superblocks using tracer pass. See -ftracer for details on trace formation.

This mode should produce faster but significantly longer programs. Also without -fbranch-probabilities the traces constructed may not match the reality and hurt the performance. This only makes sense when scheduling after register allocation, i.e. with -fschedule-insns2 or at -O2 or higher.

Expirmental, bigger programs, but somewhat faster (about 5% in my benchmark).
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Wed Jan 14, 2004 5:00 pm    Post subject: Reply with quote

I'm getting there - got most of an entire system compiled from the ground up with GCC 3.4. Only had to use 3.3 so far on about 5 or 6 packages - once I've finished I'll put a tarball of my portage overlay on my website for all to use as they see fit. The most problematic flags so far have been -funit-at-a-time and -finline-functions - there seem to have been a couple of regressions with those two.

Also, I've got the acovea-3.3.0 tarball - it's available here:

http://home.jesus.ox.ac.uk/~rmoss/acovea-3.3.0.tar.gz
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3, 4, 5 ... 71, 72, 73  Next
Page 4 of 73

 
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