Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Upgrading your system to gcc 3.4(.4)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3 ... 13, 14, 15  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Wed Nov 30, 2005 10:28 pm    Post subject: Upgrading your system to gcc 3.4(.4) Reply with quote

Mark Loeser on the announcement list wrote:

GCC 3.4 has finally been marked stable on x86. No one will have their compiler automatically switched to gcc-3.4 after it is installed, so you can handle the migration to using it as your system compiler when you have time.
To assist you in the migration we have made a GCC migration guide[1].

For support issues, #gentoo is the place to receive help. Bugs found in the course of this upgrade should be filed under the "Gentoo Linux" product, and "GCC Porting" component on Gentoo's Bugzilla[2].

That being said, I will be committing it in approximately 1 hour, which means you will need to wait for it to get all of the mirrors, which will take a bit longer after that.

[1] http://www.gentoo.org/proj/en/base/x86/gcc-upgrading-guide.xml
[2] https://bugs.gentoo.org


If you want to talk about this topic in general and don't have specific support questions regarding the update, please use Gentoo switches to gcc 3.4.4 on x86 in Gentoo Chat.
_________________
Dinosaur week! (Ok, this thread is so last week)


Last edited by amne on Fri Dec 02, 2005 11:19 pm; edited 10 times in total
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Thu Dec 01, 2005 1:24 pm    Post subject: Reply with quote

Thanks for posting this; It's good to get those thousands of emails summarized in one place. Now maybe I won't have to read any more of them. :)
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Thu Dec 01, 2005 1:58 pm    Post subject: Reply with quote

Thanks. :D
Btw, this thread will be moved to the public forums once gcc 3.4.4 gets stabled on x86.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Fri Dec 02, 2005 7:28 pm    Post subject: Reply with quote

I know this is absolutely the wrong place to post this info, but I had to do this on a fresh AMD64 install to have that library available at all. I'll look into bugging this over the weekend if it's not already there.
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Fri Dec 02, 2005 10:09 pm    Post subject: Reply with quote

Moved from a very secret place to Portage & Programming. ;)
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
DerRalf
n00b
n00b


Joined: 13 Dec 2003
Posts: 34
Location: Bay Area, CA

PostPosted: Fri Dec 02, 2005 11:07 pm    Post subject: Reason for recompiling Reply with quote

Can someone briefly explain why it is necessary to recompile the system? I switched between compiler versions before and so far didn't run into any problems. What consequences will it have if I switch to the new version and only use if for packages I emerge from now on?
Back to top
View user's profile Send private message
Halcy0n
Developer
Developer


Joined: 17 Sep 2003
Posts: 1682
Location: Freehold, NJ

PostPosted: Fri Dec 02, 2005 11:23 pm    Post subject: Re: Reason for recompiling Reply with quote

DerRalf wrote:
Can someone briefly explain why it is necessary to recompile the system? I switched between compiler versions before and so far didn't run into any problems. What consequences will it have if I switch to the new version and only use if for packages I emerge from now on?

GCC-3.3 and GCC-3.4 are not binary compatible when it comes to C++ apps, so things will break when you try to link gcc-3.3 libraries with gcc-3.4 ones.
_________________
Mark Loeser
http://www.halcy0n.com
Back to top
View user's profile Send private message
BoNd60
n00b
n00b


Joined: 17 Nov 2005
Posts: 73
Location: Paris, France

PostPosted: Fri Dec 02, 2005 11:41 pm    Post subject: Reply with quote

The guide tells we don't have to set some CFLAGS, but I didn't understand when exactly we can set them or we hav to disable them. Do they have to be disable when compiling the new gcc or when rebuilding system and world or both?
Please help me.
_________________
Oops, I think I'm not DOS compatible

In every situation, don't forget that the answer is 42
Back to top
View user's profile Send private message
dbergst
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 88

PostPosted: Sat Dec 03, 2005 12:20 am    Post subject: Reply with quote

BoNd60 wrote:
The guide tells we don't have to set some CFLAGS, but I didn't understand when exactly we can set them or we hav to disable them. Do they have to be disable when compiling the new gcc or when rebuilding system and world or both?
Please help me.


Ditto on the question above, also on first run for emerge -uav gcc, I ended up with the following issue:

Code:
/bin/sh /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/mkconfig.sh tconfig.h
./xgcc -B./ -B/usr/i686-pc-linux-gnu/bin/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -L/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc/../ld -fno-stack-protector-all -O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc -I/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/. -I/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/../include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer \
   -c /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
In file included from ./include/limits.h:11,
                 from /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/tsystem.h:97,
                 from /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/crtstuff.c:62:
./include/syslimits.h:12:26: sys/limits.h: No such file or directory
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc'
make: *** [profiledbootstrap] Error 2

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


EDIT - Below is output from emerge --info:

Code:

Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.14-gentoo-r2 i686)
=================================================================
System uname: 2.6.14-gentoo-r2 i686 AMD Athlon(tm) XP 2100+
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/ ftp://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d aalib acl alsa apm arts audiofile avi berkdb bitmap-fonts bonobo bzip2 cdr crypt cups curl dvb dvd dvdr dvdread emboss encode esd ethereal exif expat fam ffmpeg flac foomaticdb fortran gd gdbm gif glut gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile idn imagemagick imlib ipv6 jack java jpeg junit kde lcms ldap libg++ libwww mad mikmod mng motif mp3 mpeg ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline recode scanner sdl slang speex spell ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb v4l v4l2 vorbis win32codecs xine xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Back to top
View user's profile Send private message
Q-collective
Advocate
Advocate


Joined: 22 Mar 2004
Posts: 2070

PostPosted: Sat Dec 03, 2005 12:40 am    Post subject: Reply with quote

/me starts on his emerge gcc && emerge gcc binutils glibc && emerge system -e && emerge world -e && emerge libstdc++-V3 && emerge =gcc-3.3.6 -C
This will be fun :P
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Sat Dec 03, 2005 12:42 am    Post subject: Reply with quote

BoNd60 wrote:
The guide tells we don't have to set some CFLAGS, but I didn't understand when exactly we can set them or we hav to disable them. Do they have to be disable when compiling the new gcc or when rebuilding system and world or both?
Please help me.

Gcc 3.4.4. has some new CFLAGS like support for Pentium-M. If you compile gcc 3.3.x with CFLAGS that are only supported in 3.4.4, it will fail. Gcc 3.3.6 will be rebuilt during the upgrade when doing emerge -e world/system and probably by revdep-rebuild (not 100% sure about that). So the best thing is to enable 3.4.4 specific CFLAGS after you are finished with the upgrade. You don't have to disable any CFLAGS already used with 3.3.6, just don't add any new ones.

dbergst: Are you sure linux-headers are installed and OK?
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
dbergst
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 88

PostPosted: Sat Dec 03, 2005 12:53 am    Post subject: Reply with quote

amne wrote:

dbergst: Are you sure linux-headers are installed and OK?


amne,
linux-headers are installed on my system: (I also checked to make sure the files were there)

Code:

Name        : linux-headers
Version     : 2.6.11
Release     : 2                                   Slot: 0
Install date: Tue Jul  5 23:55:07 2005      Build Host: rebel.drb.net
Group       : sys-kernel                       License: GPL-2
Size        : 5104444
Packager    : plasmaroo
URL         : http://www.kernel.org/ http://www.gentoo.org/
Summary     : Linux system headers


I re-checked the files in /var/tmp/portage/gcc-3.4.4-r1/work/build/gcc/include, the contents of the offending one is listed below:

Code:
cat  syslimits.h

/*  DO NOT EDIT THIS FILE.

    It has been auto-edited by fixincludes from:

        "/usr/include/limits.h"

    This had to be done to correct non-standard usages in the
    original, manufacturer supplied header file.  */

#ifndef _LIMITS_INCLUDED
  #define _LIMITS_INCLUDED
  #include <sys/limits.h>
#endif /* _LIMITS_INCLUDED */


There does not seem to be a sys/limits.h file on my system either under /usr/include or in the portage work directory for the gcc build.


Last edited by dbergst on Sat Dec 03, 2005 1:15 am; edited 1 time in total
Back to top
View user's profile Send private message
Halcy0n
Developer
Developer


Joined: 17 Sep 2003
Posts: 1682
Location: Freehold, NJ

PostPosted: Sat Dec 03, 2005 1:09 am    Post subject: Reply with quote

BoNd60 wrote:
The guide tells we don't have to set some CFLAGS, but I didn't understand when exactly we can set them or we hav to disable them. Do they have to be disable when compiling the new gcc or when rebuilding system and world or both?
Please help me.

Like amne said above, that's the reasoning. I added something to the doc to make it a little more clear when you can add them.
_________________
Mark Loeser
http://www.halcy0n.com
Back to top
View user's profile Send private message
RiverRat
n00b
n00b


Joined: 07 Oct 2004
Posts: 65
Location: Colorado

PostPosted: Sat Dec 03, 2005 2:05 am    Post subject: Reply with quote

gcc-3.3 is still part of world and gcc is built in either 2 or 3 stages. The first stage builds the compiler with whatever is available on the system. The second stage builds gcc with the results of the first stage and if enabled the third stage builds it again with the reults of the second stage and compares the result with the second stage result to ensure that they are identical. If not that is an error. Anyway, the second (and potentially the third) stage of gcc-3.3 will be built with a gcc-3.3 (even though gcc-3.4 is the chosen compiler) and it won't understand the pentium-m flag and will therefore fail. That is why the flags can't be added while gcc-3.3 is still installed on the system.
_________________
RiverRat
Back to top
View user's profile Send private message
guyr
Apprentice
Apprentice


Joined: 17 Aug 2004
Posts: 237

PostPosted: Sat Dec 03, 2005 3:57 am    Post subject: Reply with quote

Q-collective wrote:
/me starts on his emerge gcc && emerge gcc binutils glibc && emerge system -e && emerge world -e && emerge libstdc++-V3 && emerge =gcc-3.3.6 -C
This will be fun :P


Don't you need to take a break after that first step to run gcc-config and make 3.4.4 your active compiler?
_________________
Guy Rouillier
Back to top
View user's profile Send private message
Iron_DragonLord
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 273

PostPosted: Sat Dec 03, 2005 4:21 am    Post subject: Reply with quote

Can anyone post some spiffy GCC-3.4.4 specific CFLAG that would be handy for anyone?
Back to top
View user's profile Send private message
dragonian
n00b
n00b


Joined: 22 Feb 2005
Posts: 41

PostPosted: Sat Dec 03, 2005 4:33 am    Post subject: Reply with quote

I'm having problems with revdep-rebuild. emerge doesn't seem to understand "--library"

Code:

# revdep-rebuild --library libstdc++.so.5 -- -pv
--- snip----
All prepared. Starting rebuild...
emerge --oneshot --nodeps --library libstdc++.so.5 -- -pv =mail-client/mozilla-thunderbird-bin-1.0 =net-www/mozilla-firefox-bin-1.0
..........
!!! Error: --library is an invalid option.

or
Code:

# emerge --library foo                         
!!! Error: --library is an invalid option.


This seems to be the case on two systems that I've tried
tried portage 2.0.51.22-r3 and 2.0.53
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Sat Dec 03, 2005 5:43 am    Post subject: Reply with quote

dragonian wrote:
I'm having problems with revdep-rebuild. emerge doesn't seem to understand "--library"

From the --help output of revdep-rebuild I'd guess it should be --soname rather than --library. That said, --library is working in my revdep-rebuild (from app-portage/gentoolkit-0.2.0-r3) and the code implies that it is equivalent to --soname-regexp
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein


Last edited by Chris W on Sat Dec 03, 2005 6:43 am; edited 1 time in total
Back to top
View user's profile Send private message
tuxp3
n00b
n00b


Joined: 28 May 2004
Posts: 61

PostPosted: Sat Dec 03, 2005 5:57 am    Post subject: Reply with quote

what about glibc, is the version thats marked stable upto the task of working with 3.4 gcc ?
tux
Back to top
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Sat Dec 03, 2005 7:12 am    Post subject: its easier Reply with quote

and for those that want to upgrade do this

Code:
emerge --sync && emerge -u gcc && gcc-config i686-pc-linux-gnu-3.4.4 && source /etc/profile && emerge gcc binutils glibc libstdc++-v3 && emerge -P gcc && emerge -e system && emerge -e world


should be safe to use ssh make sure gcc-config 6 changes to gcc 3.4.4 you may want to run that code in two sections like this

Code:
emerge --sync && emerge -u gcc && gcc-config i686-pc-linux-gnu-3.4.4 && source /etc/profile
Code:
gcc-config -l
make sure gcc 3.4.4 has a green star by it
Code:
emerge gcc binutils glibc libstdc++-v3 && emerge -P gcc && emerge -e system && emerge -e world
Back to top
View user's profile Send private message
Q-collective
Advocate
Advocate


Joined: 22 Mar 2004
Posts: 2070

PostPosted: Sat Dec 03, 2005 10:17 am    Post subject: Reply with quote

guyr wrote:
Q-collective wrote:
/me starts on his emerge gcc && emerge gcc binutils glibc && emerge system -e && emerge world -e && emerge libstdc++-V3 && emerge =gcc-3.3.6 -C
This will be fun :P


Don't you need to take a break after that first step to run gcc-config and make 3.4.4 your active compiler?

No, because that was already done (gcc was already upgraded and all).
Just started emerge world -e: now at 18 of 832 :P
Back to top
View user's profile Send private message
thomasvk
Guru
Guru


Joined: 19 Mar 2005
Posts: 597

PostPosted: Sat Dec 03, 2005 10:35 am    Post subject: Reply with quote

Can I just keep on working on my computer while everything is compiling? Because I bet it will take a few days, but I need my computer for work.
Back to top
View user's profile Send private message
UncleOwen
Veteran
Veteran


Joined: 27 Feb 2003
Posts: 1493
Location: Germany, Hamburg

PostPosted: Sat Dec 03, 2005 10:36 am    Post subject: Reply with quote

Iron_DragonLord wrote:
Can anyone post some spiffy GCC-3.4.4 specific CFLAG that would be handy for anyone?


Code:
CFLAGS="-O2 -march=whatever -pipe"

hth.
Back to top
View user's profile Send private message
phsdv
Guru
Guru


Joined: 13 Mar 2005
Posts: 372
Location: Europe

PostPosted: Sat Dec 03, 2005 10:45 am    Post subject: Reply with quote

I am using gcc-3.4.3 since some time. Should I follow a similar upgrade path when going to gcc-3.4.4? Or are these 2 version binary compatible?
Back to top
View user's profile Send private message
Paapaa
l33t
l33t


Joined: 14 Aug 2005
Posts: 955
Location: Finland

PostPosted: Sat Dec 03, 2005 10:48 am    Post subject: Reply with quote

Hmm, it seemed that Portage automatically switched my system to use the new gcc-3.4.4 right after emerging it.
Code:
* Switching native-compiler to i686-pc-linux-gnu-3.4.4 ...                                                   [ ok ]

* If you intend to use the gcc from the new profile in an already
* running shell, please remember to do:

*   # source /etc/profile


This was verified by the next command:
Code:

$ gcc-config -l
 [1] i686-pc-linux-gnu-3.3.6
 [2] i686-pc-linux-gnu-3.3.6-hardened
 [3] i686-pc-linux-gnu-3.3.6-hardenednopie
 [4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i686-pc-linux-gnu-3.3.6-hardenednossp
 [6] i686-pc-linux-gnu-3.4.4 *
 [7] i686-pc-linux-gnu-3.4.4-hardened
 [8] i686-pc-linux-gnu-3.4.4-hardenednopie
 [9] i686-pc-linux-gnu-3.4.4-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.4-hardenednossp


So the next command in the migration guide was not needed:
Code:

gcc-config i686-pc-linux-gnu-3.4.4


Is this really intended behaviour? I thought emerging gcc-3.4.4 should NOT make it the default compiler automagically?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2, 3 ... 13, 14, 15  Next
Page 1 of 15

 
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