Forums

Skip to content

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

GCC 4.0 (part 2)

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Locked
Advanced search
811 posts
  • Page 1 of 33
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 33
  • Next
Author
Message
pilla
Bodhisattva
Bodhisattva
User avatar
Posts: 7732
Joined: Wed Aug 07, 2002 8:19 pm
Location: Underworld

GCC 4.0 (part 2)

Post by pilla » Fri Apr 22, 2005 2:10 pm

Continuation of GCC 4.0
"I'm just very selective about the reality I choose to accept." -- Calvin
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

Post by kimchi_sg » Fri Apr 22, 2005 2:16 pm

irf2003 and friends: Maybe it will be helpful for you guys to summarise, once and for all, the steps needed to be done for a successful run of

Code: Select all

emerge -e system
using gcc 4.0.0 final? Wading through 32 pages of threads is not easy.
Top
Gandalf98
Guru
Guru
User avatar
Posts: 472
Joined: Fri Feb 28, 2003 10:00 pm
Location: Loano

Post by Gandalf98 » Fri Apr 22, 2005 8:05 pm

Ok, I think that I'll wait for a while

Thanks
Top
sir_tez
n00b
n00b
Posts: 69
Joined: Wed Mar 26, 2003 7:20 pm

Post by sir_tez » Fri Apr 22, 2005 8:39 pm

kimchi_sg wrote:irf2003 and friends: Maybe it will be helpful for you guys to summarise, once and for all, the steps needed to be done for a successful run of

Code: Select all

emerge -e system
using gcc 4.0.0 final? Wading through 32 pages of threads is not easy.
So far compiled glibc-2.3.5, gcc-4.0.0.ebuild and emerge -e system is on 66 of 106.
Top
sir_tez
n00b
n00b
Posts: 69
Joined: Wed Mar 26, 2003 7:20 pm

Post by sir_tez » Fri Apr 22, 2005 9:29 pm

I can't recompile glibc 2.3.5 because it's not adhering to gcc 4.0's new strictness.
Top
tchak
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Tue Aug 19, 2003 6:48 pm
Location: France/Russia
Contact:
Contact tchak
Website

Post by tchak » Fri Apr 22, 2005 9:52 pm

emerge -e system on my amd64 system with gcc4.0.0 from portage and glibc-2.3.5.20050418 was ok exept for :
-wget
-openssh
-e2fsprogs
maybe this world is another planet's hell...
Athlon64 | ATI Mobility Radeon 9700 | Netgear (Prism54) + ASUS (USB2 ZD1211)
Top
^PsYcHo
n00b
n00b
User avatar
Posts: 25
Joined: Sun Feb 27, 2005 6:14 am

Post by ^PsYcHo » Sat Apr 23, 2005 1:46 am

tchak wrote:emerge -e system on my amd64 system with gcc4.0.0 from portage and glibc-2.3.5.20050418 was ok exept for :
-wget
-openssh
-e2fsprogs
Do you realize any type of improvments? Think I might try upgrading.
-m3h s3x11 sCr33n1e-
Top
sir_tez
n00b
n00b
Posts: 69
Joined: Wed Mar 26, 2003 7:20 pm

Post by sir_tez » Sat Apr 23, 2005 2:45 am

tchak wrote:emerge -e system on my amd64 system with gcc4.0.0 from portage and glibc-2.3.5.20050418 was ok exept for :
-wget
-openssh
-e2fsprogs
Where'd you get the latest version of glibc? Clearly 2.3.5 won't work.
Top
younker
Apprentice
Apprentice
Posts: 281
Joined: Wed Feb 18, 2004 3:25 am
Location: China

emerge mysql 4.0 or mysql 4.1 error

Post by younker » Sat Apr 23, 2005 3:26 am

Code: Select all

if i686-pc-linux-gnu-gcc -DDEFAULT_BASEDIR=\"/usr\" -DDATADIR="\"/var/lib/mysql\"" -DDEFAULT_CHARSET_HOME="\"/usr\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I.    -O3 -DDBUG_OFF -O2 -march=pentium4 -mtune=pentium4 -mfpmath=sse -msse2 -fforce-addr -momit-leaf-frame-pointer -pipe -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS   -MT my_port.o -MD -MP -MF ".deps/my_port.Tpo" -c -o my_port.o my_port.c; \
then mv -f ".deps/my_port.Tpo" ".deps/my_port.Po"; else rm -f ".deps/my_port.Tpo"; exit 1; fi
default.c: In function ¡®search_default_file_with_ext¡¯:
default.c:346: internal compiler error: in get_indirect_ref_operands, at tree-ssa-operands.c:1449
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
raid.cc: In member function ¡®int RaidFd::Write(const byte*, uint, myf)¡¯:
raid.cc:560: warning: minimum/maximum operators are deprecated
raid.cc: In member function ¡®int RaidFd::Read(const byte*, uint, myf)¡¯:
raid.cc:601: warning: minimum/maximum operators are deprecated
raid.cc: In member function ¡®int RaidFd::Lock(int, my_off_t, my_off_t, myf)¡¯:
raid.cc:633: warning: minimum/maximum operators are deprecated
if i686-pc-linux-gnu-gcc -DDEFAULT_BASEDIR=\"/usr\" -DDATADIR="\"/var/lib/mysql\"" -DDEFAULT_CHARSET_HOME="\"/usr\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I.    -O3 -DDBUG_OFF -O2 -march=pentium4 -mtune=pentium4 -mfpmath=sse -msse2 -fforce-addr -momit-leaf-frame-pointer -pipe -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS   -MT my_sleep.o -MD -MP -MF ".deps/my_sleep.Tpo" -c -o my_sleep.o my_sleep.c; \
then mv -f ".deps/my_sleep.Tpo" ".deps/my_sleep.Po"; else rm -f ".deps/my_sleep.Tpo"; exit 1; fi
Preprocessed source stored into /var/tmp/portage/mysql-4.1.11/temp/ccxXd9d9.out file, please attach this to your bugreport.
make[2]: *** [default.o] ´íÎó 1
make[2]: *** ÕýÔڵȴýδÍê³ÉµÄÈÎÎñ....
make[2]: Leaving directory `/var/tmp/portage/mysql-4.1.11/work/mysql-4.1.11/mysys'
make[1]: *** [all-recursive] ´íÎó 1
make[1]: Leaving directory `/var/tmp/portage/mysql-4.1.11/work/mysql-4.1.11'
make: *** [all] ´íÎó 2

!!! ERROR: dev-db/mysql-4.1.11 failed.
!!! Function src_compile, Line 177, Exitcode 2
!!! compile problem
!!! If you need support, post the topmost build error, NOT this status message.
gcc4.0.0 with the following patch

Code: Select all

    epatch ${FILESDIR}/fedora/gcc4-ice-hack.patch
    epatch ${FILESDIR}/fedora/gcc4-gnuc-rh-release.patch
    epatch ${FILESDIR}/fedora/gcc4-java-nomulti.patch
    epatch ${FILESDIR}/fedora/gcc4-pr20973.patch
    epatch ${FILESDIR}/fedora/gcc4-gfortran-pr13082.patch
    epatch ${FILESDIR}/fedora/gcc4-gfortran-pr18824.patch
    epatch ${FILESDIR}/fedora/gcc4-gfortran-pr13082-mixed.patch
    epatch ${FILESDIR}/fedora/gcc4-gfortran-entry-character.patch
    epatch ${FILESDIR}/fedora/gcc4-pr20768.patch
    epatch ${FILESDIR}/fedora/gcc4-libstdc++-mt-alloc.patch
    epatch ${FILESDIR}/fedora/gcc4-pr20991.patch
Top
irf2003
Veteran
Veteran
Posts: 1078
Joined: Wed Sep 10, 2003 12:57 pm

Post by irf2003 » Sat Apr 23, 2005 3:49 am

1) Make sure that your current system is consistant.
2) Upgrade to at least binutils-2.15.94.0.2.2 with the ld script patch.
3) Shorten your build path e.g. PORTAGE_TMPDIR=/t (this is necessary, otherwise you will get execvp error when installing glibc.
4) You will need glibc weekly HEAD snapshot, or HEAD cvs checkout for gcc4 support.
5) If you are on nptl, make sure to add nptlony to your USE flags.
6) LEAVE YOUR LDFLAGS ALONE, also LEAVE the COMPILER VISIBILITY FLAGS ALONE.
7) Take it easy with your compiler flags, some suggestions:
Sane:-

Code: Select all

CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe "
CXXFLAGS=${CFLAGS}
Less Sane:-

Code: Select all

CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -mfpmath=sse -msse2 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -pipe "
CXXFLAGS=${CFLAGS}
7) Setup an overlay, sources for overlays:

Code: Select all

Mafteah:
http://overlay.mafteah.co.il/
Halcy0n (gentoo dev):
http://dev.gentoo.org/~halcy0n/
I've dumped my overlay here:
http://bugs.gentoo.org/show_bug.cgi?id=90097
dirtyepic, also has an overlay, however, not sure whether he is offering it to th public.
9) Do not ditch your other compiler, as you may need it for those packages which do not yet compile with gcc4.
10) If package compiles fine but segfaults, recompile with -O1 or O0, this may help.
11) Happy compiling :-)
HTH
CAVEATS:
1) If you have a working system back it.
2) It is better to play with gcc4 in a chrooted environment, or a spare partition.
Top
Halcy0n
Developer
Developer
User avatar
Posts: 1682
Joined: Wed Sep 17, 2003 5:09 am
Location: Freehold, NJ
Contact:
Contact Halcy0n
Website

Post by Halcy0n » Sat Apr 23, 2005 4:48 am

tchak wrote:emerge -e system on my amd64 system with gcc4.0.0 from portage and glibc-2.3.5.20050418 was ok exept for :
-wget
-openssh
-e2fsprogs
Could you please post the failures for these and the output of `emerge info', or better yet, email them to me as well as posting them here. They all compile fine here. Could always be an amd64 thing, I have no idea.
Mark Loeser
http://www.halcy0n.com
Top
rhill
Retired Dev
Retired Dev
User avatar
Posts: 1629
Joined: Fri Oct 22, 2004 9:58 am
Location: sk.ca

Post by rhill » Sat Apr 23, 2005 5:33 am

thanks pilla!

1) listen to irf2003.
2) see number 1.

especially about:

- Make sure that your current system is consistant.
- If you have a working system back it.
- It is better to play with gcc4 in a chrooted environment, or a spare partition.

i just want to emphasize that the optimization process has been completely reworked in 4.0, so a lot of what you knew about CFLAGS has been tossed out the window. start with sane flags, build a stable system, and then and only then experiment.

i've been running emerge -e system on a near continuous loop, adding in patches after each pass (and very often restoring from backup after everything broke), for the last month. i've found 4.0 to be slower than 3.4.3 in terms of compile speed and runtime speed, about the same on binary size using -O2, and hella smaller on binary size using -Os. the idea behind 4.0 wasn't to build a better compiler than 3.4.3, but to build a foundation to build that compiler in the future. 4.1 will probably be the one to watch out for.

couple links for the geeks:
C++ Visibility Support (this is also in Gentoo's 3.4.3 snapshot)
Some of the changes made to 4.0
The Tree-SSA infrastructure
Autovectorization
Swing Modulo Scheduling
Currently known regressions
GCC 4.1
Last edited by rhill on Sun Apr 24, 2005 12:25 am, edited 1 time in total.
by design, by neglect
for a fact or just for effect
Top
brantgurga
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 75
Joined: Tue Dec 30, 2003 9:30 am
Location: Indianapolis, IN
Contact:
Contact brantgurga
Website

Post by brantgurga » Sat Apr 23, 2005 6:58 am

dbus does not compile with gcc4, anybody got patches for it?
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

Post by kimchi_sg » Sat Apr 23, 2005 7:05 am

brantgurga wrote:dbus does not compile with gcc4
Post the emerge error (last 10-15 lines) so that our experts know what to patch. :)
Top
irf2003
Veteran
Veteran
Posts: 1078
Joined: Wed Sep 10, 2003 12:57 pm

Post by irf2003 » Sat Apr 23, 2005 7:17 am

@younker,
This is a regression, you should report it.
Meanwhile, change -O2 to -O0 by editing the ebuild as follows:

Code: Select all

inherit eutils flag-o-matic toolchain-funcs

Code: Select all

src_unpack() {
append-flags -O0
HTH
PS O1 does not work, trying with -O0
Top
Halcy0n
Developer
Developer
User avatar
Posts: 1682
Joined: Wed Sep 17, 2003 5:09 am
Location: Freehold, NJ
Contact:
Contact Halcy0n
Website

Post by Halcy0n » Sat Apr 23, 2005 7:21 am

irf2003 wrote:@younker,
This is a regression, you should report it.
Seems to be reported already: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21167
Mark Loeser
http://www.halcy0n.com
Top
irf2003
Veteran
Veteran
Posts: 1078
Joined: Wed Sep 10, 2003 12:57 pm

Post by irf2003 » Sat Apr 23, 2005 8:22 am

@brantgurga,
re-emerge pyrex, applying the patch at http://bugs.gentoo.org/show_bug.cgi?id=87807
afterwhich re-emerge dbus
hth
Top
fuoco
Guru
Guru
Posts: 386
Joined: Sun May 23, 2004 3:19 pm
Location: Israel

Post by fuoco » Sat Apr 23, 2005 10:01 am

If gcc-4.0 has so many problems, incompaibilities and break so many stuff, how come distros, like Fedora Core, are completely built with it?
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

Post by kimchi_sg » Sat Apr 23, 2005 10:04 am

fuoco wrote:If gcc-4.0 has so many problems, incompaibilities and break so many stuff, how come distros, like Fedora Core, are completely built with it?
They write patches?

Or they will cheat and compile their binaries with gcc 3.4. Who needs a compiler on a binary-only distro anyway?

You have to understand, this new gcc 4.0 is like gcc 1.0 all over again, large parts have been totally rewritten.
Top
PrakashP
Veteran
Veteran
User avatar
Posts: 1249
Joined: Mon Oct 27, 2003 4:10 pm
Location: C.C.A.A., Germania

Post by PrakashP » Sat Apr 23, 2005 10:06 am

Anybody able to complie kdevelop or gdb with gcc4 (w/ fedora patches)? I get various ICEs (even with stripped down CFLAGS). It only seems to compile with -O0.:?
Top
fuoco
Guru
Guru
Posts: 386
Joined: Sun May 23, 2004 3:19 pm
Location: Israel

Post by fuoco » Sat Apr 23, 2005 10:08 am

OK, though still many binary distros include a compiler too (and even apple's OS X will sheep with gcc-4.0). But say they are writing patches - since many of the apps are GPL they have to give back the patches to the community, and by that allow to very quickly 'port' everything to gcc-4.0. I believe they will even to the same with LGPL apps and others...
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

Post by kimchi_sg » Sat Apr 23, 2005 10:09 am

fuoco wrote:OK, though still many binary distros include a compiler too (and even apple's OS X will sheep with gcc-4.0). But say they are writing patches - since many of the apps are GPL they have to give back the patches to the community, and by that allow to very quickly 'port' everything to gcc-4.0. I believe they will even to the same with LGPL apps and others...
Yes, then we will hopefully benefit as well.
Top
Mafteah
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Fri May 30, 2003 2:15 pm
Location: IL
Contact:
Contact Mafteah
Website

Post by Mafteah » Sat Apr 23, 2005 10:35 am

sys-devel/binutils-2.15.97 seems to work without any patches.
http://www.mafteah.co.il
Top
tchak
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Tue Aug 19, 2003 6:48 pm
Location: France/Russia
Contact:
Contact tchak
Website

Post by tchak » Sat Apr 23, 2005 10:44 am

The most requrent error i have for many packages (openssh e2fsprogs xorg) :

Code: Select all

/lib64/libdl.so.2: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib64/libdl.so.2: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib64/libdl.so.2: undefined reference to `_dl_rtld_di_serinfo@GLIBC_PRIVATE'
What is this? Could it be my insane CFLAGS? :)

Code: Select all

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-4.0.0, glibc-2.3.5.20050418-r0, 2.6.11-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r6 x86_64 Mobile AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.11
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr 22 2005, 18:24:59)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.6.3, 1.9.4, 1.7.9-r1, 1.4_p6
sys-devel/binutils:  2.16.90.0.1
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O3 -pipe -ftracer -funit-at-a-time -fforce-addr -fpeel-loops -funswitch-loops -ffast-math"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -ftracer -funit-at-a-time -fforce-addr -fpeel-loops -funswitch-loops -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--strip-all"
LINGUAS="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlay2"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aalib acpi alsa avi bash-completion berkdb bitmap-fonts cdparanoia cdr crypt cups dbus dvd dvdr encode esd ethereal fam ffmpeg firefox flac fortran gif gimpprint gmail gnome gphoto2 gstreamer gtk gtk2 hal imagemagick jp2 jpeg libcaca lzw lzw-tiff mad mikmod mozsvg mp3 mpeg ncurses nls nowin nptl nptlonly offensive ogg opengl pam pcmcia perl pic png ppds python quicktime readline real rtc scanner sox ssl svg symlink tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales v4l2 vorbis xml2 xpm xrandr xv xvid zlib linguas_en_US.UTF-8"
Unset:  ASFLAGS, CBUILD, CTARGET
maybe this world is another planet's hell...
Athlon64 | ATI Mobility Radeon 9700 | Netgear (Prism54) + ASUS (USB2 ZD1211)
Top
thersites
Tux's lil' helper
Tux's lil' helper
Posts: 101
Joined: Tue Oct 12, 2004 10:12 pm
Location: South West China

Post by thersites » Sat Apr 23, 2005 10:50 am

Mafteah wrote:sys-devel/binutils-2.15.97 seems to work without any patches.
yep, had it for a couple of days, emerged glibc-cvs and gcc and a few other things, but no -e system.
no problems yet.

Edit - a suggestion to the devs - could some of the patches from the overlays go into portage, but only be applied with a USE flag - USE="unsupported_gcc4_fix" emerge mozilla-firefox for example?
Top
Locked

811 posts
  • Page 1 of 33
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 33
  • 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