Forums

Skip to content

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

Why run emerge -e system twice?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
Kosa
Tux's lil' helper
Tux's lil' helper
Posts: 106
Joined: Tue May 03, 2005 9:18 pm
Location: Prague
Contact:
Contact Kosa
Website

Why run emerge -e system twice?

  • Quote

Post by Kosa » Thu May 18, 2006 11:53 am

Sometimes i can see someone recommending this after changing CHOST, CFLAGS etc.:

Code: Select all

emerge -e system
emerge -e system
emerge -e world
emerge -e world
Does it have some advantages? Or is it just great waste of time as i see it? I'm installing stage3 fresh server install and as the first thing i had changed -mtune=i686 to -march=pentium4, executed emerge -e system && emerge -e world and went doing more interesting things :-)
Top
davidgurvich
Veteran
Veteran
User avatar
Posts: 1063
Joined: Fri Apr 23, 2004 3:16 pm

  • Quote

Post by davidgurvich » Thu May 18, 2006 12:38 pm

Build the toolchain with new tools, then rebuild the tools using the new toolchain. Finally, emerge -e world rebuilds everything with new tools and toolchain.
Top
Zarhan
Veteran
Veteran
Posts: 1020
Joined: Fri Feb 27, 2004 4:42 pm

  • Quote

Post by Zarhan » Thu May 18, 2006 2:00 pm

Why a simple "system, then world" is not enough, ie. doesn't it build the new toolchain (with emerge -e system) and then everything (including the toolchain, since system is a subset of world) with the new toolchain?
Top
mdeininger
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Jun 15, 2005 11:45 am
Location: Emerald Isles, observing Dublin's docklands
Contact:
Contact mdeininger
Website

  • Quote

Post by mdeininger » Thu May 18, 2006 2:16 pm

Zarhan wrote:Why a simple "system, then world" is not enough, ie. doesn't it build the new toolchain (with emerge -e system) and then everything (including the toolchain, since system is a subset of world) with the new toolchain?
yes, but since you rebuild everything, some things might be rebuilt before the system elements due to dependencies I guess, and then they'd have been built by a toolset that was crosscompiled, which might still be using some incorrect libraries. you should always build with a native toolchain, and the only solid way of guaranteeing that in gentoo using portage is running emerge -e system twice, then world.

of course, if you rebuild world twice... okay some things could be linked against the stuff that was created with the crosscompiled binaries, so you might still have some incorrect references left. better to just do the system thing twice, then world.
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Top
Kosa
Tux's lil' helper
Tux's lil' helper
Posts: 106
Joined: Tue May 03, 2005 9:18 pm
Location: Prague
Contact:
Contact Kosa
Website

  • Quote

Post by Kosa » Thu May 18, 2006 2:33 pm

Thanks, maybe i'll do this when server will be out :-) 1U power supplt heatsink is terrible thing to listening :-(
Top
B.marc
n00b
n00b
Posts: 40
Joined: Sun Oct 16, 2005 5:26 pm
Location: Braunschweig / Germany

Re: Why run emerge -e system twice?

  • Quote

Post by B.marc » Mon Jun 12, 2006 1:08 pm

Kosa wrote:Sometimes i can see someone recommending this after changing CHOST, CFLAGS etc.:

Code: Select all

emerge -e system
emerge -e system
emerge -e world
emerge -e world
Does it have some advantages? Or is it just great waste of time as i see it? I'm installing stage3 fresh server install and as the first thing i had changed -mtune=i686 to -march=pentium4, executed emerge -e system && emerge -e world and went doing more interesting things :-)
Well, some other people think, that this is not usefull at all. Have a look at this thread on gentoo-user list: http://www.mail-archive.com/gentoo-user ... 36343.html. I'm searching for more information about this topic, too. Perhaps we get somewhere the ultimate answer on this.

Regards,
Marc
Top
Zarhan
Veteran
Veteran
Posts: 1020
Joined: Fri Feb 27, 2004 4:42 pm

  • Quote

Post by Zarhan » Mon Jun 12, 2006 1:20 pm

That seems to clear it up quite well; Ie. an emerge -e world is enough after a gcc upgrade if you want to bother. No need to build anything twice (or more times). GCC itself compiles itself with itself (in a single emerge).
Top
B.marc
n00b
n00b
Posts: 40
Joined: Sun Oct 16, 2005 5:26 pm
Location: Braunschweig / Germany

  • Quote

Post by B.marc » Mon Jun 12, 2006 1:48 pm

Zarhan wrote:That seems to clear it up quite well; Ie. an emerge -e world is enough after a gcc upgrade if you want to bother. No need to build anything twice (or more times). GCC itself compiles itself with itself (in a single emerge).
What about the "emerge -e system" stated in gcc upgrade guide?:

Code: Select all

Code Listing 2.1: Upgrading GCC

# emerge -uav gcc

(Please substitute "i686-pc-linux-gnu-3.4.5" with the GCC
version and CHOST settings you've upgraded to:)
# gcc-config i686-pc-linux-gnu-3.4.5
# source /etc/profile

(Rebuilding libtool)
# emerge --oneshot -av libtool

Now let's rebuild toolchain and then world so we will make use of the new compiler.

Code Listing 2.2: Rebuilding system

# emerge -eav system
# emerge -eav world
It would be much more nice to rebuild only the toolchain progs (which are these exactly and in which order do you have to build them?) instead of "emerge -eav system" and then do the "emerge -eav world" for updating your system.

The idea behind building twice was (as far as I understand and which was pointed out already in this thread) was to be sure that you link yor progs to libs, which were compiled with your new correctly build toolchain. Some people say, that portage cannot do this with one build, because the build order can be borked (for examples search for emwrap on this forum). At first reading I accepted this as truth, but after reading more and more about this topic I'm not so sure anymore. Can anybody bring some more light into this?

Marc
Top
Zarhan
Veteran
Veteran
Posts: 1020
Joined: Fri Feb 27, 2004 4:42 pm

  • Quote

Post by Zarhan » Mon Jun 12, 2006 4:24 pm

B.marc wrote:
Zarhan wrote:That seems to clear it up quite well; Ie. an emerge -e world is enough after a gcc upgrade if you want to bother. No need to build anything twice (or more times). GCC itself compiles itself with itself (in a single emerge).
What about the "emerge -e system" stated in gcc upgrade guide?:
The mailing list postings make the point that since everything is dynamically linked anyway, even rebuilding toolchain (which basically means glibc) is not necessary before emerge -e world.
Top
B.marc
n00b
n00b
Posts: 40
Joined: Sun Oct 16, 2005 5:26 pm
Location: Braunschweig / Germany

  • Quote

Post by B.marc » Tue Jun 13, 2006 6:06 pm

OK, two more links for everyone who is interested:

1.) Some discussion on the dev list about removing stage 1 and 2 installitions, which is also about rebuilding your system and what to do. In the link above they recommend:

Code: Select all

emerge -e world && emerge -e world && emerge depclean
There are also more usefull infos in this long thread hidden (e.g. about a Doku about how to bootstrap, but I could not find it on gentoo.org, yet).

2.) In this diskussion they point to the faq about how to use stage3 for a stage1 rebuild:
FAQ wrote:Bootstrapping means building the toolchain (the C library and compiler) for your system after which you install all core system packages. To bootstrap the system, perform a stage3 installation. Before you start the chapter on Configuring the Kernel, modify the bootstrap.sh script to suit your needs and then run it:

Code Listing 3.7: Bootstrapping the system

# cd /usr/portage/scripts
# vi bootstrap.sh

# ./bootstrap.sh

Next, rebuild all core system packages with the newly built toolchain. We need to rebuild them since the stage3 tarball already offers them:

Code Listing 3.8: Rebuilding the core system packages

# emerge -e system

Now you can continue with Configuring the Kernel. You can not use the prebuilt GRP packages anymore though.
So looking at the bootstrap skript will give more answers how to really rebuild your toolchain (I will, when I have time). So never again two times rebuild system and world...

Regards
Marc
Top
nxsty
Veteran
Veteran
User avatar
Posts: 1556
Joined: Wed Jun 23, 2004 7:00 pm
Location: .se
Contact:
Contact nxsty
Website

  • Quote

Post by nxsty » Tue Jun 13, 2006 9:32 pm

I would say an emerge -uD world && emerge -e world is sufficent. The first ensures the toolchain and anything else important is up to date and the rest rebuilds world. Of course if gcc or binutils is updated in the first step you should switch to the new version and perhaps remove the old before rebuilding. Though an emerge -e system && emerge -e world certanly wont hurt but will take longer.
Top
Post Reply

11 posts • Page 1 of 1

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