Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 3.2 is here: Now is the time to rebuild everything. How?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Tuxisuau
Apprentice
Apprentice


Joined: 04 May 2002
Posts: 213
Location: Catalunya (Europe)

PostPosted: Fri Aug 16, 2002 12:57 am    Post subject: GCC 3.2 is here: Now is the time to rebuild everything. How? Reply with quote

Well, as you all have seen, the definitive gcc 3.2 is here. As you know, the ABI changed and we have to rebuild EVERYTHING again.

The problem is... how?

By the way, emerge -e world does the thing... but what if a ebuild fails? Starting from scratch?

Well, some Gentoo people made some scripts for that (i've seen them in older posts).

Now it's the time to paste them all here and to try to make the most perfect version.

Nice ideas would be fallback CFLAGS/CPPFLAGS (If a ebuild fails retry with a alternative set of CFLAGS and CPPFLAGS), resuming in the case of failure... etc.
_________________
IM me at tuxisuau@jabber.7a69ezine.org
Back to top
View user's profile Send private message
Dolio
l33t
l33t


Joined: 17 Jun 2002
Posts: 650

PostPosted: Fri Aug 16, 2002 3:19 am    Post subject: Reply with quote

Use my program rmerge. It lets you resume emerge -e

You can download a copy at the bug report that I submitted to have it added to the portage tree here.

If you get the latest version, you should be able to dump it into the portage tree and actually emerge it.

However, that's not really necessary. You can just run the script directly from wherever you you put it.

Cheers.
_________________
They don't have a good bathroom to do coke in.
Back to top
View user's profile Send private message
Dolio
l33t
l33t


Joined: 17 Jun 2002
Posts: 650

PostPosted: Fri Aug 16, 2002 3:32 am    Post subject: Reply with quote

One thing (for those that don't want to read the whole manual :)):

It'd be wise to use the (update: see below) --lock option, which makes it so that you don't 'accidentally' upgrade any packages you don't want to (like upgrading to Gnome2 stuff). If you don't use this option, some stuff won't get recompiled with gcc3 (assuming there's an unwanted upgrade).

Also, you may or may not want to use the --force option. It would let you keep going if one insignificant package failed, but if you failed on an important library, then your stuff would be linked to the non-gcc3 build, so you'd probably have to start again from that point anyway (not a good thing).

Finally, please be sure to let me know of any bugs you encounter. It's worked for me, but I don't recompile my system every day to test it, so it could have bugs. If you let me know of a bug, I'll get it fixed as soon as possible.

P.S: If you really want fallback CFLAGS and CXXFLAGS, I could implement that. However, you'd have to make them pretty least-common-denominator (like dropping down from -O3 + a bunch of other stuff to plain -O1 -mno-mmx -mno-sse ... or something). I'm not sure that's the best way to do things (certain packages might need one flag removed, but collectively they might need many removed), since it'd be difficult to have special CFLAGS tailored to each package with this program. Perhaps a better solution would be to be able to fix the problem yourself, and then resume one package ahead (which would be simple to implement as well), but, of course, that wouldn't be as automated.

Comments are welcome.

(update:) Looking at my own documentation, :) it appears I was confused. The --lock option is what locks the files to the appropriate versions.

However, those who look at bug 5667 will note that this doesn't always display the proper behavior (if you have both qt2 and qt3, only qt3 will be emerged, and it will be emerged twice). I have written a fix for this, but I want to give it a cursory test before loosing it on the world. :)
_________________
They don't have a good bathroom to do coke in.


Last edited by Dolio on Sat Aug 17, 2002 6:21 am; edited 1 time in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Aug 16, 2002 4:08 am    Post subject: Reply with quote

This thread has been made sticky in the hopes that it will become the official repository for GCC 3.2 upgrade advice and discussion. Please post here instead of starting separate GCC 3.2 upgrade-related threads, so that everyone will have a single place to look. Thanks.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
blunted
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2002
Posts: 89
Location: Winnipeg, MB

PostPosted: Fri Aug 16, 2002 4:56 am    Post subject: what should one do for a fresh gcc 3.2 install? Reply with quote

would it be best to start an install with a gentoo 1.2 cd and emerge gcc3.2 then continue the install or would it be better to install from a 1.4 cd?
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Fri Aug 16, 2002 5:05 am    Post subject: Reply with quote

damn i am just emerging with 3.1.1.....is 3.2 in the profiles already?
Back to top
View user's profile Send private message
El_Presidente_Pufferfish
Veteran
Veteran


Joined: 11 Jul 2002
Posts: 1179
Location: Seattle

PostPosted: Fri Aug 16, 2002 5:12 am    Post subject: Reply with quote

3.2 is in default-x86-2.0 profile i think
Back to top
View user's profile Send private message
Dolio
l33t
l33t


Joined: 17 Jun 2002
Posts: 650

PostPosted: Fri Aug 16, 2002 5:15 am    Post subject: Reply with quote

Well, the best way to go would probably to use a 1.4 CD (if they're available). If you want to use a 1.2 CD, you'd need to change your /etc/make.profile link to point to /usr/portage/profiles/default-x86-2.0/ or changing 'x86' to 'ppc' or 'sparc64' (doesn't seem to be a default-sparc-2.0) before you do any bootstrapping or emerging.

I think that's the only change, but I guess it might not be. The safest way to go is to use a 1.4 stage 1. You should be able to boot from any type of cd, though, as long as you're using the 1.4 tarball.
_________________
They don't have a good bathroom to do coke in.
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Fri Aug 16, 2002 5:32 am    Post subject: Reply with quote

lol...crap i guess i know what i am doing tomorrow...i didnt even look for x86-2.0

well i just looked and it still refers to 3.2_pre....thats not the stable release is it?
Back to top
View user's profile Send private message
Beforegod
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 1494
Location: Frankfurt/Main

PostPosted: Fri Aug 16, 2002 6:11 am    Post subject: Reply with quote

You shouldn't recompile all or?
I think the only changes where made to the C++ ABI so only c++ Programms should be recompiled.

We can start a list of which packages should be re-emerged so you haven't got to recompile the whole system.

[edit]
My System was compiled with gcc 3.1
[/edit]


Last edited by Beforegod on Fri Aug 16, 2002 7:14 am; edited 1 time in total
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Fri Aug 16, 2002 6:57 am    Post subject: Reply with quote

So in order to use GCC 3.2, in plain english without jumping around subject to subject, what do I have to do?
repoint /etc/make.profile to /usr/portage/profiles/defaul-x86-2.0,
then emerge gcc3 (I just checked, I can't find gcc3.. I can only find gcc 2.95.3.. after an rsync a sec ago)?
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Fri Aug 16, 2002 7:10 am    Post subject: Reply with quote

boot from gentoo 1.2 cd

follow instructions but extract 1.4-stage1 iso to /mnt/gentoo.

follow instructions and chroot into your new system.

before you bootstrap, run "emerge rsync"

NOW

run "emerge -e world"

this will download gcc 3.2 (and someother things) and compile them

upon completion, bootstrap and continue as normal.


am I on the right track guys ?
Back to top
View user's profile Send private message
Russki
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2002
Posts: 119
Location: Prague, Czech Republic

PostPosted: Fri Aug 16, 2002 9:16 am    Post subject: Reply with quote

Yesterday I started upgrade from GCC 3.2_pre_r1 to GCC3.2 and this morning when I woke up my system was ready! It took about 6.30 hours to recompile everything, which is about as long as it would take with GCC 3.1 or GCC 3.2_pre.
Note: with GCC3.2_pre_r1 I had many packages broken, many programs wouldn't start (this thread)
It seems to be fixed with GCC3.2.

My question: do I have a system as Gentoo 1.4 is going to be? Or will be there more updates which will need to recompile my system again?

Greetings.
_________________
Facts are stupid things.
-Ronald Reagan
[img]http://www.danasoft.com/vipersig.jpg[/img]
Back to top
View user's profile Send private message
ShoX
n00b
n00b


Joined: 16 Aug 2002
Posts: 12
Location: Freiburg, Germany

PostPosted: Fri Aug 16, 2002 9:57 am    Post subject: Reply with quote

So I have been running Gentoo1.2 before, GCC version 2.95.3. I changed the link to default-x86-2.0 and did an emerge gcc which surely installed me the GCC 3.2. As it appears to me now, I do have both versions installed as i find a /usr/bin/gcc-3.2 and everything else, but gcc -v still shows me 2.95.3. What steps do I have to do to make 3.2 my only version installed on the system? Unmerge gcc2.95.3? But which symlinks do I have to create then? I know there were several people asking this question, but I haven't found a suitable answer yet..
Back to top
View user's profile Send private message
nono
n00b
n00b


Joined: 04 Jul 2002
Posts: 26
Location: Dresden, Germany

PostPosted: Fri Aug 16, 2002 10:13 am    Post subject: Reply with quote

Hi,

it would be helpful, if anybody which has successfully updated his/her system would post here a step-by-step manual, because i'm relatively new to gentoo and i don't want to cause damage on my system...

Thanx a lot,
Nono.
Back to top
View user's profile Send private message
DaDude
n00b
n00b


Joined: 07 Aug 2002
Posts: 2

PostPosted: Fri Aug 16, 2002 11:02 am    Post subject: Reply with quote

ShoX wrote:
What steps do I have to do to make 3.2 my only version installed on the system? Unmerge gcc2.95.3? But which symlinks do I have to create then? I know there were several people asking this question, but I haven't found a suitable answer yet..

You have to change the link to the correct GCC version you want to use. The file is "/etc/env.d/05gcc".

Then you have to unmerge the old GCC version (for example with "emerge clean") and do a "emerge -e world" which builds the whole system from the scratch using the new GCC version.

The last step is important because as you may know the new GCC is incompatible with the old one.

The rebuild of your system can take about a day. Of course it depends on your packages installed.

DaDude

BTW @ nono: I updated my system from GCC 3.1 to GCC 3.1.1 with this method and it works.... :D
Back to top
View user's profile Send private message
okram
n00b
n00b


Joined: 06 Aug 2002
Posts: 74
Location: Taipei, Taiwan

PostPosted: Fri Aug 16, 2002 11:45 am    Post subject: Rebuild system with gcc-3.2 Reply with quote

What I don't quite understand is at what point should you recompile your kernel? As far as I can tell, gentoo doesn't actually recompile the kernel for you -- or have I got that wrong?
Back to top
View user's profile Send private message
nexus
n00b
n00b


Joined: 14 Aug 2002
Posts: 13
Location: Hamburg

PostPosted: Fri Aug 16, 2002 3:13 pm    Post subject: Reply with quote

Hmm, I have the same problem like ShoX. I made emerge gee and it worked fine. gcc3.2 is installed. But emerge clean doesn't uninstall gcc2.95.3.
How can I remove gcc2.95.3 ?

The hint from DaDude doesn't work for me :(
Back to top
View user's profile Send private message
jeb-c4
n00b
n00b


Joined: 27 Jul 2002
Posts: 35

PostPosted: Fri Aug 16, 2002 3:20 pm    Post subject: Optimizations Reply with quote

Any tips on what compiler flags to use?

Anything known not to work, or any good ones would be great.

Jeb
Back to top
View user's profile Send private message
aardvark
Guru
Guru


Joined: 30 Jun 2002
Posts: 576

PostPosted: Fri Aug 16, 2002 3:23 pm    Post subject: Reply with quote

I dare not ask, but has anyone bootstrapped (clean install) a gcc3.2 (based on 1.4beta) system yet? :roll:
Well I tried a few times now ,with different settings, but it fails in the last phase where it emerges gcc for the last time.
Everytime, it stops at libiberty.la thingy.

Hmm I guess we'll have to wait for the official 1.4 release fot this :(
Back to top
View user's profile Send private message
aardvark
Guru
Guru


Joined: 30 Jun 2002
Posts: 576

PostPosted: Fri Aug 16, 2002 3:25 pm    Post subject: Reply with quote

nono wrote:
Hi,

it would be helpful, if anybody which has successfully updated his/her system would post here a step-by-step manual, because i'm relatively new to gentoo and i don't want to cause damage on my system...

Thanx a lot,
Nono.


If you want to run little risk, try an install on another partition!
Furthemore wait for an official gentoo 3.2 release (1.4?)
Back to top
View user's profile Send private message
aardvark
Guru
Guru


Joined: 30 Jun 2002
Posts: 576

PostPosted: Fri Aug 16, 2002 3:26 pm    Post subject: Re: what should one do for a fresh gcc 3.2 install? Reply with quote

blunted wrote:
would it be best to start an install with a gentoo 1.2 cd and emerge gcc3.2 then continue the install or would it be better to install from a 1.4 cd?


I tried a few times with 1.4 beta, but it fails in my case :(
See my other post.
Back to top
View user's profile Send private message
Tuxisuau
Apprentice
Apprentice


Joined: 04 May 2002
Posts: 213
Location: Catalunya (Europe)

PostPosted: Fri Aug 16, 2002 5:02 pm    Post subject: The thruth moment approaches Reply with quote

Well, i cross fingers and i'm going to start that big rmerge.
_________________
IM me at tuxisuau@jabber.7a69ezine.org
Back to top
View user's profile Send private message
IWBCMAN
Guru
Guru


Joined: 25 Jun 2002
Posts: 474

PostPosted: Fri Aug 16, 2002 5:21 pm    Post subject: Reply with quote

Dolio,

(and I believe the other co-coder was nicknamed fhelgar (?) -great job!)

your script appears to be working great !
I did a
./rmerge -f | tee rmerge.txt
with the text file I can check which programs failed to comply(ie. w/ nano ctrl-w "aborting")...that way I can go back and compile those (few) with less aggressive optimizations(-msse2 is implemented in 3.2-not in 3.2_pre) ....


at any rate (hin,hint) could you share some of your coding magic with us as to how we can have fall back optimizations.....my life and the life of countless others would profit immeasurably from such a kind gesture on your behalf.... :roll:
thanks......


addendum...well it worked great for a while and then it started reporting to me that the ebuilds were to big....!!!!!!!!
--------
make[1]: Leaving directory `/var/tmp/portage/bash-2.05a-r2/work/bash-2.05a/doc'
info:
gzipping GNU info file bash.info
strip:
/var/tmp/portage/bash-2.05a-r2/image/bin/bash
>>> Completed installing into /var/tmp/portage/bash-2.05a-r2/image/

/usr/sbin/ebuild.sh: source: /usr/portage/sys-apps/bash/bash-2.05a-r2.ebuild: file is too large
...done!
>>> emerge sys-apps/bash-2.05a-r2 to /
>>> md5 ;-) bash-2.05a.tar.gz
>>> Merging sys-apps/bash-2.05a-r2 to /
--- /usr/
--- /usr/bin/
>>> /usr/bin/bashbug
--- /usr/share/
--- /usr/share/man/
--- /usr/share/man/man1/
>>> /usr/share/man/man1/rbash.1.gz
>>> /usr/share/man/man1/bash.1.gz
>>> /usr/share/man/man1/bashbug.1.gz
>>> /usr/share/man/man1/builtins.1.gz
--- /usr/share/info/
>>> /usr/share/info/bash.info.gz
--- /usr/share/doc/
--- /usr/share/doc/bash-2.05a-r2/
>>> /usr/share/doc/bash-2.05a-r2/README.gz
>>> /usr/share/doc/bash-2.05a-r2/NEWS.gz
>>> /usr/share/doc/bash-2.05a-r2/AUTHORS.gz
>>> /usr/share/doc/bash-2.05a-r2/CHANGES.gz
>>> /usr/share/doc/bash-2.05a-r2/COMPAT.gz
>>> /usr/share/doc/bash-2.05a-r2/COPYING.gz
>>> /usr/share/doc/bash-2.05a-r2/Y2K.gz
>>> /usr/share/doc/bash-2.05a-r2/FAQ.gz
>>> /usr/share/doc/bash-2.05a-r2/INTRO.gz
--- /bin/
>>> /bin/bash
>>> /bin/sh -> bash

>>> Safely unmerging already-installed instance...
--- !mtime obj /usr/share/man/man1/rbash.1.gz
--- !mtime obj /usr/share/man/man1/builtins.1.gz
--- !mtime obj /usr/share/man/man1/bashbug.1.gz
--- !mtime obj /usr/share/man/man1/bash.1.gz
--- !mtime obj /usr/share/info/bash.info.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/Y2K.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/README.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/NEWS.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/INTRO.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/FAQ.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/COPYING.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/COMPAT.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/CHANGES.gz
--- !mtime obj /usr/share/doc/bash-2.05a-r2/AUTHORS.gz
--- !mtime obj /usr/bin/bashbug
--- !mtime obj /bin/bash
--- !empty dir /usr/share/man/man1
--- !empty dir /usr/share/man
--- !empty dir /usr/share/info
--- !empty dir /usr/share/doc/bash-2.05a-r2
--- !empty dir /usr/share/doc
--- !empty dir /usr/share
--- !empty dir /usr/bin
--- !empty dir /usr
--- !empty dir /bin
--- !targe sym /bin/sh
>>> original instance of package unmerged safely.
!!! pkg_postinst() script failed; exiting.
Calculating dependencies \/usr/sbin/ebuild.sh: source: /usr/portage/dev-libs/expat/expat-1.95.4.ebuild: file is too large
...done!
>>> emerge dev-libs/expat-1.95.4 to /
!!! emerge aborting on /usr/portage/dev-libs/expat/expat-1.95.4.ebuild .
Calculating dependencies \/usr/sbin/ebuild.sh: source: /usr/portage/dev-lang/python/python-2.2.1-r2.ebuild: file is too large
...done!
>>> emerge dev-lang/python-2.2.1-r2 to /
!!! emerge aborting on /usr/portage/dev-lang/python/python-2.2.1-r2.ebuild .
Calculating dependencies \/usr/sbin/ebuild.sh: source: /usr/portage/sys-apps/debianutils/debianutils-1.16.ebuild: file is too large
...done!
>>> emerge sys-apps/debianutils-1.16 to /
!!! emerge aborting on /usr/portage/sys-apps/debianutils/debianutils-1.16.ebuild .
Calculating dependencies \/usr/sbin/ebuild.sh: source: /usr/portage/sys-apps/fileutils/fileutils-4.1.8-r2.ebuild: file is too large
...done!
>>> emerge sys-apps/fileutils-4.1.8-r2 to /
!!! emerge aborting on /usr/portage/sys-apps/fileutils/fileutils-4.1.8-r2.ebuild .
Calculating dependencies \/usr/sbin/ebuild.sh: source: /usr/portage/sys-apps/portage/portage-2.0.27.ebuild: file is too large
...done!
:(
Back to top
View user's profile Send private message
jackp
n00b
n00b


Joined: 05 Jun 2002
Posts: 12

PostPosted: Fri Aug 16, 2002 5:28 pm    Post subject: upgrade from gcc-3.2_pre necessary? Reply with quote

I just recently set up gentoo 1.4beta with gcc-3.2_pre. For the most part things went pretty smoothly. Now, my question is, is there a drastic change between 3.2_pre and 3.2 that requires me to recompile ALL my packages, including my kernel? AFAIU the C++ ABI changed from 3.1.1 to 3.2, so would that be pretty much stabilized now (even with that, that only affects C++ code, so I can track down the C++ packages and recompile those if necessary)? Shouldn't the two compiler versions be compatible with each other at least to generate similar enough binary code such that my old packages would run in a "gcc 3.2 environment"?

Or do you think I should play it safe and do an 'emerge -e world' anyway?

EDIT: I think my first question is better rephrased as: are there significant library incompatibilities between 3.2_pre and 3.2? Will things immediately break after I update?
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, 4, 5, 6, 7, 8  Next
Page 1 of 8

 
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