You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat /proc/version
Linux version 6.1.1-gentoo-filthy (root@GentooRig) (clang version 15.0.6, LLD 15.0.6) #1 SMP PREEMPT_DYNAMIC Wed Dec 28 12:17:33 PST 2022
This module fails to build while im using a clang-kernel. I have added zenpower to my clang-env as defined in portage/env & portage/package.env. (my clang-env https://github.com/mrturcot/Gentoo-Stuff/blob/master/portage/env/compiler-clang) It still tries uses GCC to build.... Can we detect the toolchain used to build kernel and use the necessary compiler to build module?
warning: the compiler differs from the one used to build the kernel
The kernel was built by: clang version 15.0.6
You are using: gcc (Gentoo 11.3.1_p20221209 p3) 11.3.1 20221209
Build Log
❯ emerge -1av sys-kernel/zenpower::dev1990-overlay
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ~] sys-kernel/zenpower-0.1.12::dev1990-overlay USE="-dist-kernel" 0 KiB
Total: 1 package (1 new), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-kernel/zenpower-0.1.12::dev1990-overlay
* zenpower-0.1.12.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 6.1.1-gentoo-filthy
* Checking for suitable kernel configuration options ... [ ok ]
>>> Unpacking source...
>>> Unpacking zenpower-0.1.12.tar.gz to /var/tmp/portage/sys-kernel/zenpower-0.1.12/work
>>> Source unpacked in /var/tmp/portage/sys-kernel/zenpower-0.1.12/work
>>> Preparing source in /var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12 ...
ln: failed to create symbolic link 'Module.symvers': File exists
* Preparing zenpower module
make -j12 HOSTCC=clang 'LDFLAGS=-m elf_x86_64' modules
make[1]: Entering directory '/usr/src/linux-6.1.1-gentoo'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: clang version 15.0.6
You are using: x86_64-pc-linux-gnu-gcc (Gentoo 11.3.1_p20221209 p3) 11.3.1 20221209
CC [M] /var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12/zenpower.o
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-Qunused-arguments’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-mretpoline-external-thunk’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-fsplit-lto-unit’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-Wformat-invalid-specifier’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-Wformat-insufficient-args’
make[2]: *** [scripts/Makefile.build:250: /var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12/zenpower.o] Error 1
make[1]: *** [Makefile:1992: /var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12] Error 2
make[1]: Leaving directory '/usr/src/linux-6.1.1-gentoo'
make: *** [Makefile:27: modules] Error 2
* ERROR: sys-kernel/zenpower-0.1.12::dev1990-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-kernel/zenpower-0.1.12::dev1990-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-kernel/zenpower-0.1.12::dev1990-overlay'`.
* The complete build log is located at '/var/log/portage/sys-kernel:zenpower-0.1.12:20221228-202346.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-kernel/zenpower-0.1.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-kernel/zenpower-0.1.12/temp/environment'.
* Working directory: '/var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12'
* S: '/var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12'
>>> Failed to emerge sys-kernel/zenpower-0.1.12, Log file:
>>> '/var/log/portage/sys-kernel:zenpower-0.1.12:20221228-202346.log'
* Messages for package sys-kernel/zenpower-0.1.12:
* Log file: /var/log/portage/sys-kernel:zenpower-0.1.12:20221228-202346.log
* Package: sys-kernel/zenpower-0.1.12:0
* Repository: dev1990-overlay
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
* FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 6.1.1-gentoo-filthy
* Checking for suitable kernel configuration options ...
* Preparing zenpower module
* ERROR: sys-kernel/zenpower-0.1.12::dev1990-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-kernel/zenpower-0.1.12::dev1990-overlay'`,
* the complete build log and the output of `emerge -pqv '=sys-kernel/zenpower-0.1.12::dev1990-overlay'`.
* The complete build log is located at '/var/log/portage/sys-kernel:zenpower-0.1.12:20221228-202346.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-kernel/zenpower-0.1.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-kernel/zenpower-0.1.12/temp/environment'.
* Working directory: '/var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12'
* S: '/var/tmp/portage/sys-kernel/zenpower-0.1.12/work/zenpower-0.1.12'
The text was updated successfully, but these errors were encountered:
I'm using inherit linux-info linux-mod which are standard eclasses to handle kernel module compilation, probably they should be extended in future to support clang toolchain. I'll try to fix ebuild, but unfortunately this will be blind attempt, since I don't have clang environment.
Hey, so I use clang to compile my kernel
cat /proc/version
Linux version 6.1.1-gentoo-filthy (root@GentooRig) (clang version 15.0.6, LLD 15.0.6) #1 SMP PREEMPT_DYNAMIC Wed Dec 28 12:17:33 PST 2022
This module fails to build while im using a clang-kernel. I have added zenpower to my clang-env as defined in portage/env & portage/package.env. (my clang-env https://github.com/mrturcot/Gentoo-Stuff/blob/master/portage/env/compiler-clang) It still tries uses GCC to build.... Can we detect the toolchain used to build kernel and use the necessary compiler to build module?
Similar issue that was resolved I had with xone kernel module https://gitlab.com/src_prepare/src_prepare-overlay/-/issues/43
ISSUE
Build Log
The text was updated successfully, but these errors were encountered: