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.
Created attachment 788564 [details] With USE build.log
Created attachment 788567 [details] Without USE build.log
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.
The threads USE flag is the cause of this bug so disabling solves this issue.