View previous topic :: View next topic |
Author |
Message |
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7729 Location: Underworld
|
Posted: Fri Apr 22, 2005 2:10 pm Post subject: GCC 4.0 (part 2) |
|
|
Continuation of GCC 4.0 _________________ "I'm just very selective about the reality I choose to accept." -- Calvin |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 2968
|
Posted: Fri Apr 22, 2005 2:16 pm Post subject: |
|
|
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 using gcc 4.0.0 final? Wading through 32 pages of threads is not easy. |
|
Back to top |
|
|
Gandalf98 Guru
Joined: 28 Feb 2003 Posts: 472 Location: Loano
|
Posted: Fri Apr 22, 2005 8:05 pm Post subject: |
|
|
Ok, I think that I'll wait for a while
Thanks |
|
Back to top |
|
|
sir_tez n00b
Joined: 26 Mar 2003 Posts: 69
|
Posted: Fri Apr 22, 2005 8:39 pm Post subject: |
|
|
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 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. |
|
Back to top |
|
|
sir_tez n00b
Joined: 26 Mar 2003 Posts: 69
|
Posted: Fri Apr 22, 2005 9:29 pm Post subject: |
|
|
I can't recompile glibc 2.3.5 because it's not adhering to gcc 4.0's new strictness. |
|
Back to top |
|
|
tchak Tux's lil' helper
Joined: 19 Aug 2003 Posts: 124 Location: France/Russia
|
Posted: Fri Apr 22, 2005 9:52 pm Post subject: |
|
|
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) |
|
Back to top |
|
|
^PsYcHo n00b
Joined: 27 Feb 2005 Posts: 25
|
Posted: Sat Apr 23, 2005 1:46 am Post subject: |
|
|
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- |
|
Back to top |
|
|
sir_tez n00b
Joined: 26 Mar 2003 Posts: 69
|
Posted: Sat Apr 23, 2005 2:45 am Post subject: |
|
|
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. |
|
Back to top |
|
|
younker Apprentice
Joined: 18 Feb 2004 Posts: 280 Location: China
|
Posted: Sat Apr 23, 2005 3:26 am Post subject: emerge mysql 4.0 or mysql 4.1 error |
|
|
Code: | 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: | 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
|
|
|
Back to top |
|
|
irf2003 Veteran
Joined: 10 Sep 2003 Posts: 1078
|
Posted: Sat Apr 23, 2005 3:49 am Post subject: |
|
|
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: |
CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe "
CXXFLAGS=${CFLAGS}
|
Less Sane:-
Code: |
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: |
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. |
|
Back to top |
|
|
Halcy0n Developer
Joined: 17 Sep 2003 Posts: 1682 Location: Freehold, NJ
|
Posted: Sat Apr 23, 2005 4:48 am Post subject: |
|
|
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 |
|
Back to top |
|
|
rhill Retired Dev
Joined: 22 Oct 2004 Posts: 1629 Location: sk.ca
|
Posted: Sat Apr 23, 2005 5:33 am Post subject: |
|
|
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 _________________ by design, by neglect
for a fact or just for effect
Last edited by rhill on Sun Apr 24, 2005 12:25 am; edited 1 time in total |
|
Back to top |
|
|
brantgurga Tux's lil' helper
Joined: 30 Dec 2003 Posts: 75 Location: Indianapolis, IN
|
Posted: Sat Apr 23, 2005 6:58 am Post subject: |
|
|
dbus does not compile with gcc4, anybody got patches for it? |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 2968
|
Posted: Sat Apr 23, 2005 7:05 am Post subject: |
|
|
brantgurga wrote: | dbus does not compile with gcc4 |
Post the emerge error (last 10-15 lines) so that our experts know what to patch. |
|
Back to top |
|
|
irf2003 Veteran
Joined: 10 Sep 2003 Posts: 1078
|
Posted: Sat Apr 23, 2005 7:17 am Post subject: |
|
|
@younker,
This is a regression, you should report it.
Meanwhile, change -O2 to -O0 by editing the ebuild as follows:
Code: |
inherit eutils flag-o-matic toolchain-funcs
|
Code: |
src_unpack() {
append-flags -O0
|
HTH
PS O1 does not work, trying with -O0 |
|
Back to top |
|
|
Halcy0n Developer
Joined: 17 Sep 2003 Posts: 1682 Location: Freehold, NJ
|
|
Back to top |
|
|
irf2003 Veteran
Joined: 10 Sep 2003 Posts: 1078
|
|
Back to top |
|
|
fuoco Guru
Joined: 23 May 2004 Posts: 386 Location: Israel
|
Posted: Sat Apr 23, 2005 10:01 am Post subject: |
|
|
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? |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 2968
|
Posted: Sat Apr 23, 2005 10:04 am Post subject: |
|
|
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. |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Sat Apr 23, 2005 10:06 am Post subject: |
|
|
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. |
|
Back to top |
|
|
fuoco Guru
Joined: 23 May 2004 Posts: 386 Location: Israel
|
Posted: Sat Apr 23, 2005 10:08 am Post subject: |
|
|
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... |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 2968
|
Posted: Sat Apr 23, 2005 10:09 am Post subject: |
|
|
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. |
|
Back to top |
|
|
Mafteah Apprentice
Joined: 30 May 2003 Posts: 265 Location: IL
|
Posted: Sat Apr 23, 2005 10:35 am Post subject: |
|
|
sys-devel/binutils-2.15.97 seems to work without any patches. _________________ http://www.mafteah.co.il |
|
Back to top |
|
|
tchak Tux's lil' helper
Joined: 19 Aug 2003 Posts: 124 Location: France/Russia
|
Posted: Sat Apr 23, 2005 10:44 am Post subject: |
|
|
The most requrent error i have for many packages (openssh e2fsprogs xorg) :
Code: |
/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: |
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) |
|
Back to top |
|
|
thersites Tux's lil' helper
Joined: 12 Oct 2004 Posts: 101 Location: South West China
|
Posted: Sat Apr 23, 2005 10:50 am Post subject: |
|
|
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? |
|
Back to top |
|
|
|