Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892694 - clang support for sys-kernel/zenpower3
Summary: clang support for sys-kernel/zenpower3
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: ARM64 Linux
: Normal normal
Assignee: GURU project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-31 07:51 UTC by Mitch
Modified: 2024-03-25 20:55 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mitch 2023-01-31 07:51:23 UTC
any chance we can support building this module with clang please?

or let me know what I need to modify on the ebuild?

➜ ebuild zenpower3-0.2.0.ebuild merge
 * zenpower3-0.2.0.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.8-gentoo-xanmod1
 * Checking for suitable kernel configuration options ...                                                                                                              [ ok ]
>>> Unpacking source...
>>> Unpacking zenpower3-0.2.0.tar.gz to /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work
>>> Source unpacked in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work
>>> Preparing source in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0 ...
 * Applying zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch ...                                                                                             [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0 ...
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.8-xanmod'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: clang version 15.0.7
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo Hardened 12.2.1_p20230121-r1 p10) 12.2.1 20230121
  CC [M]  /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0/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 ‘-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’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-frandomize-layout-seed-file=./scripts/basic/randstruct.seed’
make[2]: *** [scripts/Makefile.build:250: /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0/zenpower.o] Error 1
make[1]: *** [Makefile:2135: /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0] Error 2
make[1]: Leaving directory '/usr/src/linux-6.1.8-xanmod'
make: *** [Makefile:27: modules] Error 2
 * ERROR: sys-kernel/zenpower3-0.2.0::guru failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/zenpower3-0.2.0::guru'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/zenpower3-0.2.0::guru'`.
 * The complete build log is located at '/var/log/portage/build/sys-kernel/zenpower3-0.2.0:20230131-074808.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0'
 * S: '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0'

 * Messages for package sys-kernel/zenpower3-0.2.0:
 * Log file: /var/log/portage/build/sys-kernel/zenpower3-0.2.0:20230131-074808.log

 * Package:    sys-kernel/zenpower3-0.2.0:0
 * Repository: guru
 * Maintainer: lssndrbarbieri@gmail.com
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Package:    sys-kernel/zenpower3-0.2.0:0
 * Repository: guru
 * Maintainer: lssndrbarbieri@gmail.com
 * 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.8-gentoo-xanmod1
 * Checking for suitable kernel configuration options ...
 * Applying zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch ...
 * Preparing zenpower module
Comment 1 Mitch 2023-01-31 07:53:29 UTC
using portage

emerge -1av sys-kernel/zenpower3::guru

These are the packages that would be merged, in order:

Calculating dependencies                                    ... done!
[ebuild  N    ~] sys-kernel/zenpower3-0.2.0::guru  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/zenpower3-0.2.0::guru
 * zenpower3-0.2.0.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.8-gentoo-xanmod1
 * Checking for suitable kernel configuration options ...                                                                                                              [ ok ]
>>> Unpacking source...
>>> Unpacking zenpower3-0.2.0.tar.gz to /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work
>>> Source unpacked in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work
>>> Preparing source in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0 ...
 * Applying zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch ...                                                                                             [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0 ...
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.8-xanmod'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: clang version 15.0.7
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo Hardened 12.2.1_p20230121-r1 p10) 12.2.1 20230121
  CC [M]  /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0/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 ‘-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’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-frandomize-layout-seed-file=./scripts/basic/randstruct.seed’
make[2]: *** [scripts/Makefile.build:250: /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0/zenpower.o] Error 1
make[1]: *** [Makefile:2135: /var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0] Error 2
make[1]: Leaving directory '/usr/src/linux-6.1.8-xanmod'
make: *** [Makefile:27: modules] Error 2
 * ERROR: sys-kernel/zenpower3-0.2.0::guru failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/zenpower3-0.2.0::guru'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/zenpower3-0.2.0::guru'`.
 * The complete build log is located at '/var/log/portage/build/sys-kernel/zenpower3-0.2.0:20230131-075258.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0'
 * S: '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0'

>>> Failed to emerge sys-kernel/zenpower3-0.2.0, Log file:

>>>  '/var/log/portage/build/sys-kernel/zenpower3-0.2.0:20230131-075258.log'

 * Messages for package sys-kernel/zenpower3-0.2.0:
 * Log file: /var/log/portage/build/sys-kernel/zenpower3-0.2.0:20230131-075258.log

 * Package:    sys-kernel/zenpower3-0.2.0:0
 * Repository: guru
 * Maintainer: lssndrbarbieri@gmail.com
 * 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.8-gentoo-xanmod1
 * Checking for suitable kernel configuration options ...
 * Applying zenpower3-0.2.0-use-symlink-to-detect-kernel-version.patch ...
 * Preparing zenpower module
 * ERROR: sys-kernel/zenpower3-0.2.0::guru failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/zenpower3-0.2.0::guru'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/zenpower3-0.2.0::guru'`.
 * The complete build log is located at '/var/log/portage/build/sys-kernel/zenpower3-0.2.0:20230131-075258.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0'
 * S: '/var/tmp/portage/sys-kernel/zenpower3-0.2.0/work/zenpower3-0.2.0'
Comment 2 Mitch 2023-01-31 07:54:22 UTC
and zenpower has been added to my clang-env https://github.com/mrturcot/Gentoo-Stuff/blob/master/portage/env/compiler-clang/default-libstdc%2B%2B so I dont understand why its trying to use GCC anyway?