Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] duplicate gentoo system - errors
Date: Mon, 23 Nov 2020 22:46:59
Message-Id: 37a81521-18d0-b403-652c-a804106b9de6@iinet.net.au
In Reply to: Re: [gentoo-user] duplicate gentoo system - errors by Walter Dnes
1 On 23/11/20 10:10 pm, Walter Dnes wrote:
2 > On Sun, Nov 22, 2020 at 04:39:44PM -0700, thelma@×××××××××××.com wrote
3 >> Duplicating was easy, but when I try to recompile a kernel I get an error:
4 >>
5 >> make menuconfig
6 >> HOSTCC script/kconfig/mconf.o
7 >> <build-in> : internal compiler error: Illegal instruction
8 >>
9 >> Even if I try to run: emerge --info I get:
10 >> Illegal instruction
11 > Ouch! Are the CPUs exactly identical? If not, then you may get the
12 > "Illegal instruction" error. This is a "feature" of Gentoo, which is
13 > often user-optimized for a specific CPU. What's the CPU on the source
14 > machine and what's the CPU on the target machine? If in doubt,
15 > execute...
16 >
17 > gcc -c -Q -march=native --help=target | grep march=
18 >
19 > ...on each machine. There are 3 sub-families of "Intel" machines.
20 >
21 > 1) bog-standard Intel code, e.g. core2, also runs on AMD and Intel Atom
22 > CPUs at least as new or newer.
23 >
24 > 2) Intel Atom code runs only on same or newer Intel Atom, because it has
25 > the MOVBE instruction set the others lack.
26 >
27 > 3) AMD code runs only on same or newer AMD, because it has the 3DNow!
28 > instruction set the others lack.
29 >
30 > If you have such a mismatch, your only option may be to rebuild from
31 > scratch.
32 >
33 quick package the toolchain packages from the wanted cpu system, untar
34 them in the root of the new system so they overwrite the existing
35 package files, do an emerge -e @system, then follow with another for
36 world.  Can also use the install CD packages - I have used some quite
37 different versions when recovering a broken system so it <can> work :).
38
39 Have done it a few times, its a bit messier than than just
40 gcc/glibc/libtool/binutils for the toolchain but does work.  The two
41 emerge -e shouldn't be strictly necessary, but it seems to get a better
42 result than just doing world.
43
44
45 BillK