Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

GCC 3.4

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Locked
Advanced search
1814 posts
  • Page 4 of 73
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 73
  • Next
Author
Message
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

Post by fca » Mon Jan 05, 2004 12:11 pm

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.
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Wed Jan 07, 2004 11:01 pm

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.
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

Post by fca » Wed Jan 07, 2004 11:25 pm

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
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Thu Jan 08, 2004 12:02 am

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.
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Thu Jan 08, 2004 5:02 am

Patched worked perfectly, and the compiler seems to work. Just built kernel 2.4.25_pre4 with it with no problems (yet)
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

Post by fca » Thu Jan 08, 2004 1:11 pm

"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?
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Thu Jan 08, 2004 7:16 pm

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: Select all

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.
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Thu Jan 08, 2004 8:20 pm

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.
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Thu Jan 08, 2004 11:14 pm

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
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Sat Jan 10, 2004 4:34 am

xfce 4.0.3 compiles and runs fine with gcc 3.4
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Sat Jan 10, 2004 10:21 pm

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: Select all

    Total Time:    1 hours 11 minutes   7.0 seconds (4267 seconds)
gcc 3.4 (snapshot 2004-01-07)

Code: Select all

    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: Select all

    Total Time:    1 hours  6 minutes  16.0 seconds (3976 seconds)
Anyone know what other apps I can use for benchmarking?
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Sun Jan 11, 2004 6:31 pm

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:
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>
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

Post by robmoss » Mon Jan 12, 2004 2:18 am

NeighborhoodGullwings wrote:gcc 3.4 (snapshot 2004-01-07)

Code: Select all

    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: Select all

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
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Mon Jan 12, 2004 4:13 am

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

Code: Select all

    Total Time:    1 hours  2 minutes  41.0 seconds (3761 seconds)
Very nice. :P
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

Post by robmoss » Mon Jan 12, 2004 9:35 pm

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

Code: Select all

    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
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Mon Jan 12, 2004 9:54 pm

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?
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

Post by robmoss » Mon Jan 12, 2004 10:07 pm

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
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

Post by robmoss » Mon Jan 12, 2004 10:19 pm

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
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

Post by fca » Mon Jan 12, 2004 10:36 pm

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 :(
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

Post by robmoss » Mon Jan 12, 2004 11:46 pm

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
Top
NeighborhoodGullwings
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Fri Dec 05, 2003 6:38 am

Post by NeighborhoodGullwings » Tue Jan 13, 2004 3:11 am

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.
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

Post by fca » Tue Jan 13, 2004 1:02 pm

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.
Top
jcmorris
Apprentice
Apprentice
Posts: 174
Joined: Wed Jun 11, 2003 10:29 pm

Post by jcmorris » Wed Jan 14, 2004 2:07 am

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
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

Post by fca » Wed Jan 14, 2004 12:56 pm

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
-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).
Top
robmoss
Retired Dev
Retired Dev
Posts: 2634
Joined: Tue May 27, 2003 4:42 pm
Location: Jesus College, Oxford
Contact:
Contact robmoss
Website

Post by robmoss » Wed Jan 14, 2004 5:00 pm

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
Top
Locked

1814 posts
  • Page 4 of 73
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 73
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic