Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 881969 - app-admin/ryzen_smu-0.1.2_p20211205 fails to compile (CLANG-STRICTER-SYSTEM): sh: line 1: ld.lld: command not found
Summary: app-admin/ryzen_smu-0.1.2_p20211205 fails to compile (CLANG-STRICTER-SYSTEM):...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Piotr Karbowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-19 08:34 UTC by Agostino Sarubbo
Modified: 2022-11-21 20:30 UTC (History)
0 users

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


Attachments
build.log (build.log,67.70 KB, text/plain)
2022-11-19 08:34 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-11-19 08:34:02 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-admin/ryzen_smu-0.1.2_p20211205 fails to compile (CLANG-STRICTER-SYSTEM).
Discovered on: amd64 (internal ref: clang-stricter_tinderbox)

NOTE:
(CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode

This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types -Werror=deprecated-non-prototype

See also:
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
https://wiki.gentoo.org/wiki/Modern_C_porting
Comment 1 Agostino Sarubbo gentoo-dev 2022-11-19 08:34:04 UTC
Created attachment 833605 [details]
build.log

build log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-19 08:41:54 UTC
No idea where lld is coming from. kernel config?
Comment 3 Piotr Karbowski (RETIRED) gentoo-dev 2022-11-19 09:50:07 UTC
The ebuild sets LD=ld.lld if CONFIG_CC_IS_CLANG in kernel config, this is to be able to build it if kernel was built with LLVM=1. 

@ago you will need to have sys-devel/lld-toolchain-symlinks and sys-devel/lld around alongside clang to make it working.

Nothing to fix here unless you do have them all installed, care to share more details?
Comment 4 Agostino Sarubbo gentoo-dev 2022-11-19 10:25:17 UTC
(In reply to Piotr Karbowski from comment #3)
> The ebuild sets LD=ld.lld if CONFIG_CC_IS_CLANG in kernel config, this is to
> be able to build it if kernel was built with LLVM=1. 
> 
> @ago you will need to have sys-devel/lld-toolchain-symlinks and
> sys-devel/lld around alongside clang to make it working.
> 
> Nothing to fix here unless you do have them all installed, care to share
> more details?

I have only clang but not lld. The list of installed packages is in the build log.

If you tell me exactly what I can provide I'll be glad.
Comment 5 Piotr Karbowski (RETIRED) gentoo-dev 2022-11-19 12:00:26 UTC
I do not think we can do anything here. If your kernel is built with clang, ebuild injects full LLVM toolchain there while building the image, this is the same flow that nvidia-drivers goes to support clang-built kernel.

We do not have interfaces in portage that could pull in the additonal lld packages if kernel's config has CONFIG_CC_IS_CLANG=y.

I think this is entirely resonable to expect people who build kernel with clang to have sys-devel/clang, sys-devel/lld and sys-devel/lld-toolchain-symlinks installed. This is not the default code path and you need to really get out of your way to get kernel built with clang in first place.

Unless you have any suggestion how else we could handle support for out of tree kernel modules for kernels built with LLVM, I'd like to close it with CANTFIX and request you to moving forward please always have (matching) lld/lld-toolchain-symlinks installed alongside clang when you do clang runs.
Comment 6 Piotr Karbowski (RETIRED) gentoo-dev 2022-11-21 20:30:47 UTC
Feel free to reopen if new ideasa arrive, otherwise CANTFIX.