1 |
A quick Google with keyword "R_X86_64_PC64 uclibc" shows that uclibc is missing some ELF definitions that are needed for newer kernels: |
2 |
|
3 |
https://gogs.waldemar-brodkorb.de/oss/uclibc-ng/issues/2 |
4 |
|
5 |
You may try the proposed solution there (to insert the definition into /usr/include/elf.h), but IMHO this should be handled by uclibc-ng themselves or a patch in Gentoo. As it seems like you've packaged uclibc-ng yourself (sys-libs/uclibc-ng: 1.0.33::akater) maybe you would want to add a patch there instead. |
6 |
|
7 |
Regards, |
8 |
-- |
9 |
Pengcheng Xu |
10 |
https://jsteward.moe |
11 |
|
12 |
> -----Original Message----- |
13 |
> From: akater <nuclearspace@×××××.com> |
14 |
> Sent: Friday, May 8, 2020 7:43 PM |
15 |
> To: gentoo-user@l.g.o |
16 |
> Subject: [gentoo-user] 5.4 kernels won't compile |
17 |
> |
18 |
> Neither linux-5.4.28-gentoo nor linux-5.4.38-gentoo would compile, with the |
19 |
> following error: |
20 |
> |
21 |
> > CFLAGS="-Wno-error=undef" make && make modules_install |
22 |
> > HOSTCC scripts/basic/fixdep |
23 |
> > HOSTCC arch/x86/tools/relocs_32.o |
24 |
> > HOSTCC arch/x86/tools/relocs_64.o |
25 |
> > In file included from arch/x86/tools/relocs_64.c:18: |
26 |
> > arch/x86/tools/relocs.c: In function 'rel_type': |
27 |
> > arch/x86/tools/relocs.c:201:12: error: 'R_X86_64_PC64' undeclared (first use |
28 |
> in this function); did you mean 'R_X86_64_64'? |
29 |
> > 201 | REL_TYPE(R_X86_64_PC64), |
30 |
> > | ^~~~~~~~~~~~~ |
31 |
> > arch/x86/tools/relocs.c:197:22: note: in definition of macro 'REL_TYPE' |
32 |
> > 197 | #define REL_TYPE(X) [X] = #X |
33 |
> > | ^ |
34 |
> > arch/x86/tools/relocs.c:201:12: note: each undeclared identifier is reported |
35 |
> only once for each function it appears in |
36 |
> > 201 | REL_TYPE(R_X86_64_PC64), |
37 |
> > | ^~~~~~~~~~~~~ |
38 |
> > arch/x86/tools/relocs.c:197:22: note: in definition of macro 'REL_TYPE' |
39 |
> > 197 | #define REL_TYPE(X) [X] = #X |
40 |
> > | ^ |
41 |
> > arch/x86/tools/relocs.c:201:12: error: array index in initializer not of |
42 |
> integer type |
43 |
> > 201 | REL_TYPE(R_X86_64_PC64), |
44 |
> > | ^~~~~~~~~~~~~ |
45 |
> > arch/x86/tools/relocs.c:197:22: note: in definition of macro 'REL_TYPE' |
46 |
> > 197 | #define REL_TYPE(X) [X] = #X |
47 |
> > | ^ |
48 |
> > arch/x86/tools/relocs.c:201:12: note: (near initialization for 'type_name') |
49 |
> > 201 | REL_TYPE(R_X86_64_PC64), |
50 |
> > | ^~~~~~~~~~~~~ |
51 |
> > arch/x86/tools/relocs.c:197:22: note: in definition of macro 'REL_TYPE' |
52 |
> > 197 | #define REL_TYPE(X) [X] = #X |
53 |
> > | ^ |
54 |
> > arch/x86/tools/relocs.c: In function 'do_reloc64': |
55 |
> > arch/x86/tools/relocs.c:802:7: error: 'R_X86_64_PC64' undeclared (first use |
56 |
> in this function); did you mean 'R_X86_64_64'? |
57 |
> > 802 | case R_X86_64_PC64: |
58 |
> > | ^~~~~~~~~~~~~ |
59 |
> > | R_X86_64_64 |
60 |
> > make[1]: *** [scripts/Makefile.host:124: arch/x86/tools/relocs_64.o] |
61 |
> > Error 1 |
62 |
> > make: *** [arch/x86/Makefile:232: archscripts] Error 2 |
63 |
> |
64 |
> I did not find anything relevant on Gentoo forums or on this mailing list. |
65 |
> Configuration is a little non-standard. The first lines of emerge --info: |
66 |
> |
67 |
> > Portage 2.3.99 (python 3.7.7-final-0, |
68 |
> > default/linux/amd64/17.0/uclibc/hardened, gcc-9.3.0, uclibc-ng-1.0.33, |
69 |
> > 4.19.97-gentoo-poseidon x86_64) |
70 |
> > ================================================================= |
71 |
> > System uname: |
72 |
> Linux-4.19.97-gentoo-poseidon-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L9400_@_1. |
73 |
> 86GHz-with-gentoo-2.6 |
74 |
> > KiB Mem: 1929164 total, 152428 free |
75 |
> > KiB Swap: 0 total, 0 free |
76 |
> > Timestamp of repository gentoo: Fri, 08 May 2020 05:00:01 +0000 Head |
77 |
> > commit of repository gentoo: 92957d0a4e66217194d92beb864ef7b9f2c04cbb |
78 |
> > sh bash 5.0_p17 |
79 |
> > ld GNU ld (Gentoo 2.33.1 p2) 2.33.1 |
80 |
> > ccache version 3.7.7 [enabled] |
81 |
> > app-shells/bash: 5.0_p17::gentoo |
82 |
> > dev-lang/perl: 5.30.1::gentoo |
83 |
> > dev-lang/python: 2.7.18::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo |
84 |
> > dev-util/ccache: 3.7.7-r1::gentoo |
85 |
> > dev-util/cmake: 3.16.5::akater |
86 |
> > sys-apps/baselayout: 2.6-r1::gentoo |
87 |
> > sys-apps/openrc: 0.42.1::gentoo |
88 |
> > sys-apps/sandbox: 2.13::gentoo |
89 |
> > sys-devel/autoconf: 2.69-r4::gentoo |
90 |
> > sys-devel/automake: 1.16.1-r1::gentoo |
91 |
> > sys-devel/binutils: 2.33.1-r1::gentoo |
92 |
> > sys-devel/gcc: 9.3.0::gentoo |
93 |
> > sys-devel/gcc-config: 2.2.1::gentoo |
94 |
> > sys-devel/libtool: 2.4.6-r6::gentoo |
95 |
> > sys-devel/make: 4.2.1-r4::gentoo |
96 |
> > sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers) |
97 |
> > sys-libs/uclibc-ng: 1.0.33::akater |
98 |
> |
99 |
> Please help. |