View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1533
|
Posted: Sun Feb 13, 2022 4:05 am Post subject: unable to compile a non-gentoo kernel |
|
|
Hello everyone, I'm trying to install gentoo to my galaxy note3 mobile phone.
I have downloaded a stage 3 and setup my chroot, instead of downloading gentoo sources and having to go through all sorts of hell trying to find the kernel patches from samsung ...etc I chose to downlaod a note3 kernel from the internet:
https://github.com/flashka07/android_kernel_samsung_ha3g
this is a very old kerenl version(3.4) that requires gcc4 or 3:
Code: | localhost /root/kernel/android_kernel_samsung_ha3g/include/linux # ls *gcc*
compiler-gcc.h compiler-gcc3.h compiler-gcc4.h |
so i created a symbolic link in this directory called compiler-gcc11.h and had it point to compiler-gcc.h
I can begin the compilation process but it's not long before I get:
Code: | localhost /root/kernel/android_kernel_samsung_ha3g # make -j4
CHK include/linux/version.h
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
In file included from include/linux/compiler.h:48,
from include/linux/stddef.h:4,
from include/linux/posix_types.h:4,
from include/linux/types.h:17,
from include/linux/page-flags.h:8,
from kernel/bounds.c:9:
include/linux/compiler-gcc.h:3:2: error: #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
3 | #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
| ^~~~~
In file included from /root/kernel/android_kernel_samsung_ha3g/arch/arm/include/asm/bug.h:59,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
include/asm-generic/bug.h:64:17: error: expected declaration specifiers or '...' before numeric constant
64 | extern __printf(3, 4)
| ^
include/asm-generic/bug.h:64:20: error: expected declaration specifiers or '...' before numeric constant
64 | extern __printf(3, 4)
| ^
include/asm-generic/bug.h:67:17: error: expected declaration specifiers or '...' before numeric constant
67 | extern __printf(4, 5)
| ^
include/asm-generic/bug.h:67:20: error: expected declaration specifiers or '...' before numeric constant
67 | extern __printf(4, 5)
| ^
make[1]: *** [/root/kernel/android_kernel_samsung_ha3g/./Kbuild:36: kernel/bounds.s] Error 1
make: *** [Makefile:992: prepare0] Error 2
make: *** Waiting for unfinished jobs....
HOSTLD scripts/mod/modpost |
any idea what I should do here? |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1717 Location: South America
|
Posted: Sun Feb 13, 2022 2:02 pm Post subject: Re: unable to compile a non-gentoo kernel |
|
|
Adel Ahmed wrote: | I chose to downlaod a note3 kernel from the internet:
https://github.com/flashka07/android_kernel_samsung_ha3g
this is a very old kerenl version(3.4) that requires gcc4 or 3:
Code: | localhost /root/kernel/android_kernel_samsung_ha3g/include/linux # ls *gcc*
compiler-gcc.h compiler-gcc3.h compiler-gcc4.h |
[...]
any idea what I should do here? |
Have you tried building that kernel with the unmodified files? include/linux/compiler-gcc3.h and include/linux/compiler-gcc4.h only contain less than / greater than [or equal to] GCC version comparisons. I wouldn't touch them unless you are getting an actual build failure which these files are directly responsible of. |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1533
|
Posted: Mon Feb 14, 2022 9:20 am Post subject: |
|
|
I tried compiling by linking to gcc3 and gcc4 files but I got the exact same result. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1717 Location: South America
|
Posted: Mon Feb 14, 2022 11:29 am Post subject: |
|
|
Adel Ahmed wrote: | I tried compiling by linking to gcc3 and gcc4 files but I got the exact same result. |
What did you link to what? Don't do that. Looking at the Git repository, none of the compiler*.h files is a symlink. |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1533
|
Posted: Mon Feb 14, 2022 11:54 am Post subject: |
|
|
I used to set compiler-gcc11.h as a symbolic link to compiler-gcc.h, can't even remember why i did that.
I removed the symbolic link anyway and I'm getting the same error |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1717 Location: South America
|
Posted: Mon Feb 14, 2022 12:23 pm Post subject: |
|
|
Is include/linux/compiler.h (without -gcc ) a symlink? Can you post the output of ls -l /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler*? |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1533
|
Posted: Mon Feb 14, 2022 1:55 pm Post subject: |
|
|
Code: |
localhost /root/kernel/android_kernel_samsung_ha3g # ls -l /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler*
-rw-r--r-- 1 root root 4547 Feb 13 03:46 /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler-gcc.h
-rw-r--r-- 1 root root 631 Feb 9 14:25 /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler-gcc3.h
-rw-r--r-- 1 root root 2143 Feb 9 14:25 /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler-gcc4.h
-rw-r--r-- 1 root root 746 Feb 9 14:25 /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler-intel.h
-rw-r--r-- 1 root root 8694 Feb 9 14:25 /root/kernel/android_kernel_samsung_ha3g/include/linux/compiler.h
|
|
|
Back to top |
|
|
|