Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 854969 - dev-libs/elfutils-0.187 MUSL fails to build (MIPS?)
Summary: dev-libs/elfutils-0.187 MUSL fails to build (MIPS?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-29 02:17 UTC by immolo
Modified: 2022-06-30 10:37 UTC (History)
1 user (show)

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


Attachments
emerge --info for crossdev (cross-emerge-info.txt,3.78 KB, text/plain)
2022-06-29 02:17 UTC, immolo
Details
With USE build.log (withuse-build.log,214.33 KB, text/x-log)
2022-06-29 02:18 UTC, immolo
Details
Without USE build.log (nouse-build.log,926.27 KB, text/x-log)
2022-06-29 02:18 UTC, immolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description immolo 2022-06-29 02:17:18 UTC
Created attachment 788561 [details]
emerge --info for crossdev

When trying to cross compile elfutils-0.187 for a MIPS device it fails with various errors depending on the USE flags set.

With USE="bzip2 nls threads utils" I get a number of undefined variables with the final error "being undefined reference to `assert_perror'"

With USE="-*" then it becomes:

 213 |       if (fnmatch (pattern->pattern, name, FNM_EXTMATCH) == 0)
      |                                            ^~~~~~~~~~~~
      |                                            FNM_NOMATCH
/usr/mipsr5900el-unknown-linux-musl/tmp/portage/dev-libs/elfutils-0.187/work/elfutils-0.187/src/strip.c:213:44: note: each undeclared identifier is reported only once for each function it appears in
/usr/mipsr5900el-unknown-linux-musl/tmp/portage/dev-libs/elfutils-0.187/work/elfutils-0.187/src/strip.c: In function ‘parse_opt’:
/usr/mipsr5900el-unknown-linux-musl/tmp/portage/dev-libs/elfutils-0.187/work/elfutils-0.187/src/strip.c:329:37: error: ‘FNM_EXTMATCH’ undeclared (first use in this function); did you mean ‘FNM_NOMATCH’?
  329 |       if (fnmatch (arg, ".comment", FNM_EXTMATCH) == 0)
      |                                     ^~~~~~~~~~~~
      |                                     FNM_NOMATCH

I believe but not confirmed this is a MIPS issues as the ebuild for 185 in the MUSL overlay also fails with the same issue so I need to run some further tests on other arches.
Comment 1 immolo 2022-06-29 02:18:04 UTC
Created attachment 788564 [details]
With USE build.log
Comment 2 immolo 2022-06-29 02:18:35 UTC
Created attachment 788567 [details]
Without USE build.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-30 10:23:13 UTC
We discussed this on IRC and the -* / FNM error should be ignored because w/ crossdev, elibc_musl isn't forced, so you end up not getting the musl patches.

We need to focus on the assert_perror one.
Comment 4 immolo 2022-06-30 10:37:06 UTC
The threads USE flag is the cause of this bug so disabling solves this issue.