Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895048 - dev-libs/libsecp256k1-0.4.1 fails to compile (MUSL-CLANG-SYSTEM): x86_64-gentoo-linux-musl-gcc: error: unrecognized command-line option -Wconditional-uninitialized
Summary: dev-libs/libsecp256k1-0.4.1 fails to compile (MUSL-CLANG-SYSTEM): x86_64-gent...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Luke-Jr
Depends on:
Reported: 2023-02-17 08:16 UTC by Agostino Sarubbo
Modified: 2024-02-06 16:23 UTC (History)
2 users (show)

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

build.log (build.log,54.92 KB, text/plain)
2023-02-17 08:16 UTC, Agostino Sarubbo

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-17 08:16:29 UTC

Issue: dev-libs/libsecp256k1-0.2.0-r2 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-17 08:16:31 UTC
Created attachment 851962 [details]

build log and emerge --info
Comment 2 Kenton Groombridge gentoo-dev 2023-05-26 15:16:52 UTC
I spent about 10 minutes on this and found that the included patch with the ebuild seems to introduce a bug to the build system where it properly selects clang as the host compiler to use, but fails to actually use it during the build (defaulting to GCC).

As a workaround I added this snippet to the ebuild which at least got it building with clang, though I'm unsure if this breaks any of the cross-compiling logic:

src_install() {
    emake CC_FOR_BUILD="${CC}"

Comment 3 Agostino Sarubbo gentoo-dev 2024-02-06 16:23:28 UTC
clang-lld_tinderbox has reproduced this issue with version 0.4.1 - Updating summary.