https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-dialup/ppp-2.4.9-r5 fails to compile. Discovered on: amd64 (internal ref: tinderbox) NOTE: This machine uses CLANG as a compiler and LLD as a linker
Created attachment 762332 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: ./configure: line 10: CC: command not found ./configure: line 23: CFLAGS: command not found clang-13: error: unsupported option '--print-sysroot'
Created attachment 779363 [details, diff] Patch to fix problems with clang I've written this patch to fix these problems with clang. The patch moves three nested functions in eap-tls.c file to the outside scope, as clang does not support them nested. It also removes the "$(CC) --print-sysroot" from the include prefix, as clang also does not support it. Can someone please review and test this patch? Thanks!
Tested here. sudo emerge net-dialup/ppp Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) net-dialup/ppp-2.4.9-r7::gentoo >>> Installing (1 of 1) net-dialup/ppp-2.4.9-r7::gentoo >>> Recording net-dialup/ppp in "world" favorites file... >>> Jobs: 1 of 1 complete Load avg: 0.87, 0.35, 0.13 >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. Gentoo with Clang/Musl globally, withouth GCC.
(In reply to Leonardo Neumann from comment #3) > Created attachment 779363 [details, diff] [details, diff] > Patch to fix problems with clang > > I've written this patch to fix these problems with clang. The patch moves > three nested functions in eap-tls.c file to the outside scope, as clang does > not support them nested. It also removes the "$(CC) --print-sysroot" from > the include prefix, as clang also does not support it. Can someone please > review and test this patch? Thanks! Could you please submit this upstream and link it here? Thanks a lot!
I just noticed that a similar solution to the first part of the patch was already upstreamed (https://github.com/ppp-project/ppp/commit/6e6a48fe628b76ec368277fd52685428e3dc8766). I couldn't find information about the second part, but it seems they fixed it as well. So, I guess we just have to wait for a new release.
(In reply to Leonardo Neumann from comment #6) > I just noticed that a similar solution to the first part of the patch was > already upstreamed > (https://github.com/ppp-project/ppp/commit/ > 6e6a48fe628b76ec368277fd52685428e3dc8766). I couldn't find information about > the second part, but it seems they fixed it as well. So, I guess we just > have to wait for a new release. If it's fixed ~identically upstream, then I don't have an issue with applying it. Your patch seems reasonable anyway, I just: 1. like stuff being upstreamed; 2. was reluctant to add to our very very large heap of patches; 3. wanted to get this in before the new release they keep saying is around the corner ;) But yeah, that seems irrelevant now. I'll apply yours.
fwiw the sysroot part got fixed in the full autotoolsification of ppp which was merged a few months ago
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=868a874d9e6cb7f604cf6400f75da559a971a339 commit 868a874d9e6cb7f604cf6400f75da559a971a339 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-18 03:04:25 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-18 03:04:25 +0000 net-dialup/ppp: fix build with clang Revbump as the nested functions bit can/will affect codegen (trampolines...). Closes: https://bugs.gentoo.org/831305 Thanks-to: Leonardo Neumann <leonardo@neumann.dev.br> Signed-off-by: Sam James <sam@gentoo.org> .../ppp-2.4.9-fix-clang-nested-functions.patch | 65 ++++++ .../ppp-2.4.9-fix-openssl-sysroot-clang.patch | 14 ++ net-dialup/ppp/ppp-2.4.9-r8.ebuild | 256 +++++++++++++++++++++ 3 files changed, 335 insertions(+)