1 |
On Fri, Mar 8, 2013 at 10:47 AM, W. Trevor King <wking@×××××××.us> wrote: |
2 |
> From: "W. Trevor King" <wking@×××××××.us> |
3 |
> |
4 |
> When using `update_seed` to get a 20121213 stage3 from |
5 |
> libmpc.so.2 to libmpc.so.3, stage2 failed with: |
6 |
> |
7 |
> /usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1: |
8 |
> error while loading shared libraries: libmpc.so.2: |
9 |
> cannot open shared object file: No such file or directory |
10 |
|
11 |
gcc installed into the stage1 should not be linked against |
12 |
libmpc.so.2. Something is wrong. |
13 |
|
14 |
> This was due to an mpc version bump in the Portage tree that was not |
15 |
> present in the stage3 I used to seed stage1. Stage1 wasn't |
16 |
> recompiling GCC against the new mpc, so it ended up with GCC linking |
17 |
> against the old mpc. |
18 |
|
19 |
This is really your problem. gcc is built in stage1 and with an |
20 |
updated mpc built during update_seed. The only way I can think of that |
21 |
gcc could be linked against libmpc.so.2 in stage1 is if a binpkg of |
22 |
gcc was used. |
23 |
|
24 |
> Heading into stage2, the old mpc (from the seed |
25 |
> stage3) was no longer present, so compilation crashed and burned. |
26 |
> |
27 |
> To fix this, we should be extra agressive about rebuilding packages |
28 |
> when their dependencies change in stage1. |
29 |
|
30 |
No, we shouldn't, because we don't care about stage1. We simply want |
31 |
the seed stage to be sufficient to produce a working stage1. By the |
32 |
time we get to stage3 everything has been rebuilt against the latest |
33 |
package versions. |
34 |
|
35 |
> The earlier update_seed |
36 |
> command was not catching the bumped mpc, so add: |
37 |
|
38 |
I think this is a false premise. If it is true, we should understand |
39 |
why and fix it. The current command is emerge --onlydeps gcc which |
40 |
should be completely sufficient to update mpc. |
41 |
|
42 |
> |
43 |
> --complete-graph --with-bdeps=y --rebuild-if-new-ver |
44 |
> |
45 |
> to toughen things up. |
46 |
> |
47 |
> This is a general dependency problem (not GCC specific), so I also |
48 |
> replaced the gcc target with: |
49 |
> |
50 |
> @world @system |
51 |
> |
52 |
> This leads to a lot of rebuilding, but it should be a stable and |
53 |
> general fix. With a general fix there should be no more need for |
54 |
> user-specific overrides via update_seed_command, but Gentoo is about |
55 |
> choice, so we keep the option. Use it at your own risk ;). |
56 |
> |
57 |
> Based-on-patch-by: Brian Dolbec <dolsen@g.o> |
58 |
> --- |
59 |
> Changes since v2: |
60 |
> * Reinstated update_seed_command, as requested by Zero_Chaos. |
61 |
> |
62 |
> doc/catalyst-spec.5.txt | 2 +- |
63 |
> targets/stage1/stage1-chroot.sh | 9 +++------ |
64 |
> 2 files changed, 4 insertions(+), 7 deletions(-) |
65 |
> |
66 |
> diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt |
67 |
> index 4a6e06c..0eb3c2f 100644 |
68 |
> --- a/doc/catalyst-spec.5.txt |
69 |
> +++ b/doc/catalyst-spec.5.txt |
70 |
> @@ -138,7 +138,7 @@ it should update the seed stage or not (valid values: `yes no`). |
71 |
> *update_seed_command*:: |
72 |
> This is an optional command to pass to emerge for updating the seed |
73 |
> stage (example: `--update dev-libs/mpfr dev-libs/mpc dev-libs/gmp`) |
74 |
> -If not specified, catalyst will update gcc deps. |
75 |
> +If not specified, catalyst will update `@system` and `@world`. |
76 |
> This setting requires enabling update_seed. |
77 |
> |
78 |
> Compilation |
79 |
> diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh |
80 |
> index 3f628c2..0e3859c 100644 |
81 |
> --- a/targets/stage1/stage1-chroot.sh |
82 |
> +++ b/targets/stage1/stage1-chroot.sh |
83 |
> @@ -26,12 +26,9 @@ clst_root_path=/ setup_pkgmgr |
84 |
> # Update stage3 |
85 |
> if [ -n "${clst_update_seed}" ]; then |
86 |
> if [ "${clst_update_seed}" == "yes" ]; then |
87 |
> - echo "Updating seed stage..." |
88 |
> - if [ -n "${clst_update_seed_command}" ]; then |
89 |
> - clst_root_path=/ run_merge "--buildpkg=n ${clst_update_seed_command}" |
90 |
> - else |
91 |
> - clst_root_path=/ run_merge "--buildpkg=n --update --deep --newuse --onlydeps gcc" |
92 |
> - fi |
93 |
> + update_cmd="${clst_update_seed_command:---update --deep --complete-graph --with-bdeps=y --rebuild-if-new-ver @world @system}" |
94 |
> + echo "--- Updating seed stage with: ${update_cmd}" |
95 |
> + clst_root_path=/ run_merge "${update_cmd}" |
96 |
> elif [ "${clst_update_seed}" != "no" ]; then |
97 |
> echo "Invalid setting for update_seed: ${clst_update_seed}" |
98 |
> exit 1 |
99 |
> -- |
100 |
> 1.8.2.rc0.16.g20a599e |