Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 815340 - acpi_call 1.2.1 and 1.2.2 cant built with a clang built kernel
Summary: acpi_call 1.2.1 and 1.2.2 cant built with a clang built kernel
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-09-29 08:36 UTC by Cihan Özakça
Modified: 2021-10-08 22:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to build acpi_call module with clang built kernel (01-clangacpi_call.patch,535 bytes, patch)
2021-09-29 08:36 UTC, Cihan Özakça
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cihan Özakça 2021-09-29 08:36:47 UTC
Created attachment 741963 [details, diff]
Patch to build acpi_call module with clang built kernel

I have tried to build acpi_call on my clang built 5.14.7 kernel with no luck. username1234 created a patch to make it apply but this time it fails because my kernel is built with lto
build log of acpi_call without ebuild is patched :

 * Package:    sys-power/acpi_call-1.2.1
 * Repository: gentoo
 * Maintainer: conikost@gentoo.org
 * Upstream:   https://github.com/nix-community/acpi_call/issues
 * USE:        abi_x86_64 amd64 dist-kernel 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:
 *     5.14.7-gentoo
 * Checking for suitable kernel configuration options...
 [ ok ]
>>> Unpacking source...
>>> Unpacking acpi_call-1.2.1.tar.gz to /var/tmp/portage/sys-power/acpi_call-1.2.1/work
>>> Source unpacked in /var/tmp/portage/sys-power/acpi_call-1.2.1/work
>>> Preparing source in /var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1 ...
 * Applying acpi_call-1.2.1-kernel-5.13.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1 ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing acpi_call module
make -j16 HOSTCC=clang 'LDFLAGS=-m elf_x86_64' KDIR=/usr/src/linux M=/var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1 default 
make -C /usr/src/linux M=/var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1 modules
make[1]: Entering directory '/usr/src/linux-5.14.7-gentoo'
  CC [M]  /var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1/acpi_call.o
[01m[Kx86_64-pc-linux-gnu-gcc:[m[K [01;31m[Kerror: [m[Kunrecognized command-line option ‘[01m[K-Qunused-arguments[m[K’
[01m[Kx86_64-pc-linux-gnu-gcc:[m[K [01;31m[Kerror: [m[Kunrecognized command-line option ‘[01m[K-mno-global-merge[m[K’
make[2]: *** [scripts/Makefile.build:271: /var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1/acpi_call.o] Error 1
make[1]: *** [Makefile:1858: /var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1] Error 2
make[1]: Leaving directory '/usr/src/linux-5.14.7-gentoo'
make: *** [Makefile:8: default] Error 2
 * ERROR: sys-power/acpi_call-1.2.1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-power/acpi_call-1.2.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-power/acpi_call-1.2.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-power/acpi_call-1.2.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-power/acpi_call-1.2.1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1'
 * S: '/var/tmp/portage/sys-power/acpi_call-1.2.1/work/acpi_call-1.2.1'

Build log of acpi_call with username1234's patch applied to acpi_call-1.2.2.ebuild :

 * Package:    sys-power/acpi_call-1.2.2
 * Repository: gentoo
 * Maintainer: conikost@gentoo.org
 * Upstream:   https://github.com/nix-community/acpi_call/issues
 * USE:        abi_x86_64 amd64 dist-kernel 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:
 *     5.14.7-gentoo
 * Checking for suitable kernel configuration options...
 [ ok ]
>>> Unpacking source...
>>> Unpacking acpi_call-1.2.2.tar.gz to /var/tmp/portage/sys-power/acpi_call-1.2.2/work
>>> Source unpacked in /var/tmp/portage/sys-power/acpi_call-1.2.2/work
>>> Preparing source in /var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2 ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing acpi_call module
make -j16 HOSTCC=clang 'LDFLAGS=-m elf_x86_64' KDIR=/usr/src/linux M=/var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2 CC=clang default 
make -C /usr/src/linux M=/var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2 modules
make[1]: Entering directory '/usr/src/linux-5.14.7-gentoo'
  CC [M]  /var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2/acpi_call.o
  LTO [M] /var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2/acpi_call.lto.o
x86_64-pc-linux-gnu-ld: unrecognised emulation mode: llvm
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om
make[2]: *** [scripts/Makefile.modpost:134: /var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2/acpi_call.lto.o] Error 1
make[1]: *** [Makefile:1773: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-5.14.7-gentoo'
make: *** [Makefile:8: default] Error 2
 * ERROR: sys-power/acpi_call-1.2.2::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-power/acpi_call-1.2.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-power/acpi_call-1.2.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-power/acpi_call-1.2.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-power/acpi_call-1.2.2/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2'
 * S: '/var/tmp/portage/sys-power/acpi_call-1.2.2/work/acpi_call-1.2.2'
Comment 1 Conrad Kostecki gentoo-dev 2021-10-08 22:31:30 UTC
Sorry, it's currently not possible to use clang.