Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: cmake error on libkdepim compile
Date: Thu, 22 Jan 2009 18:11:55
Message-Id: pan.2009.01.22.18.11.43@cox.net
In Reply to: Re: [gentoo-amd64] Re: cmake error on libkdepim compile by Mark Haney
1 "Mark Haney" <mhaney@××××××××××××.org> posted
2 49788889.1080808@××××××××××××.org, excerpted below, on Thu, 22 Jan 2009
3 09:54:01 -0500:
4
5 > One more thing, when I looked at gcc versions available on my system
6 > 4.1.2 is the latest stable one. I take it that 4.3.2 is in ~amd64?
7
8 Yes. One nice thing about Gentoo is that the way it uses gcc-config, you
9 can have several gcc versions merged and switch between them. With the
10 exception of C++ programs using libstdc++, there's very little reason to
11 worry about switching between versions causing problems, and it's very
12 convenient to have multiple versions available to test with, if a compile
13 is breaking with one.
14
15 As for libstdc++, in the bad old days (early gcc 3, I think, it was
16 really before I got into compiling stuff much and possibly before I got
17 into Linux much at all), different minor gcc versions sometimes had
18 dramatic libstdc++ incompatibilities, but for quite some time it has been
19 generally backward compatible and with only a few exceptions, usually
20 forward compatible as well.
21
22 The one set of exceptions I am aware of was that earlier KDE 3 used a few
23 of the (then) newer libstdc++ functions from I believe it was gcc 4.0 or
24 4.1 if they were available at compile time, and that specific bit of kde
25 (generally Internet related, local stuff seemed to work fine) would fail
26 to work if compiled with the newer version then set to run against (due
27 to gcc-config-ing back to) the older gcc/libstdc++. However, that only
28 happened if it was compiled against the newer libstdc++ version then was
29 run against the older one. If one compiled with the older version, it
30 ran just fine against the newer version. And I was able to work with it
31 just fine compiled against the newer version even when gcc-config-ed to
32 an older version -- I just didn't use the broken bits, all Internet
33 related, while pointing at the old version, and gcc-config-ed back to the
34 newer version as soon as possible. IOW, I just had gcc-config pointing
35 at the old version long enough to compile whatever it was that was still
36 giving me trouble in the new version, then switched back to the new
37 version, which I was using for normal system operations.
38
39 So in general you should be pretty safe installing multiple gcc versions,
40 then using gcc-config to temporarily point at whatever one you want to
41 try. Just keep track of which one you're pointed at, and try to keep as
42 much of the system as possible compiled with a single version. Newer
43 versions will at first be hard-masked, but due to gcc-config, I've never
44 had a problem installing them and even compiling nearly everything with
45 them. At that early stage, there will definitely be packages that won't
46 compile and you'll either need to switch back to an early gcc for those
47 packages, or search bugzilla and apply necesary patches -- there's very
48 often bugs already filed and patches already posted, since some people
49 try it before gcc ever gets out of beta, upstream. Later, certainly as
50 gcc-4.3 is now, it has been around long enough that many of those patches
51 have already been applied in the newest versions of various ~arch
52 packages in the tree. But if you're conservative, you can still install
53 the newer versions and keep gcc-config pointed at your older versions for
54 the system in general, only using the newer versions for testing or
55 specific packages. There should be even less problems with that, and
56 since you're using the old versions most of the time anyway, you won't
57 run into the packages still broken with the new compiler.
58
59 Just what I've found. It should be perfectly safe to have the new
60 compilers installed but still point to the old ones for most stuff. If
61 you do want to run the newer compilers for most of your system, you'll
62 probably want to run ~arch at least, since otherwise you'll have lots of
63 packages with broken compiles because the patches aren't yet backported
64 to stable, since that version of gcc isn't yet close to being keyworded
65 stable.
66
67 --
68 Duncan - List replies preferred. No HTML msgs.
69 "Every nonfree program has a lord, a master --
70 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: cmake error on libkdepim compile - Solved Mark Haney <mhaney@××××××××××××.org>
Re: [gentoo-amd64] Re: cmake error on libkdepim compile - Solved - update Mark Haney <mhaney@××××××××××××.org>