Created attachment 622922 [details] build.log ... x86_64-gentoo-linux-musl-gcc -DEXEEXT=\"\" -I. -I./lib -I. -I./lib -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\" -O2 -pipe -march=native -fdiagnostics-show-option -frecord-gcc-switches -O2 -pipe -march=native -fdiagnostics-color=always -c -o lib/libbison_a-bitsetv.o `test -f 'lib/bitsetv.c' || echo './'`lib/bitsetv.c x86_64-gentoo-linux-musl-gcc -DEXEEXT=\"\" -I. -I./lib -I. -I./lib -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\" -O2 -pipe -march=native -fdiagnostics-show-option -frecord-gcc-switches -O2 -pipe -march=native -fdiagnostics-color=always -c -o lib/libbison_a-c-ctype.o `test -f 'lib/c-ctype.c' || echo './'`lib/c-ctype.c x86_64-gentoo-linux-musl-gcc -DEXEEXT=\"\" -I. -I./lib -I. -I./lib -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\" -O2 -pipe -march=native -fdiagnostics-show-option -frecord-gcc-switches -O2 -pipe -march=native -fdiagnostics-color=always -c -o lib/libbison_a-c-strcasecmp.o `test -f 'lib/c-strcasecmp.c' || echo './'`lib/c-strcasecmp.c x86_64-gentoo-linux-musl-gcc -DEXEEXT=\"\" -I. -I./lib -I. -I./lib -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\" -O2 -pipe -march=native -fdiagnostics-show-option -frecord-gcc-switches -O2 -pipe -march=native -fdiagnostics-color=always -c -o lib/libbison_a-c-strncasecmp.o `test -f 'lib/c-strncasecmp.c' || echo './'`lib/c-strncasecmp.c x86_64-gentoo-linux-musl-gcc -DEXEEXT=\"\" -I. -I./lib -I. -I./lib -DDEFAULT_TEXT_DOMAIN=\"bison-gnulib\" -O2 -pipe -march=native -fdiagnostics-show-option -frecord-gcc-switches -O2 -pipe -march=native -fdiagnostics-color=always -c -o lib/libbison_a-careadlinkat.o `test -f 'lib/careadlinkat.c' || echo './'`lib/careadlinkat.c In file included from lib/careadlinkat.h:24, from lib/careadlinkat.c:23: ./lib/unistd.h:616:11: fatal error: getopt-cdefs.h: No such file or directory 616 | # include <getopt-cdefs.h> | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:4650: lib/libbison_a-careadlinkat.o] Error 1
Created attachment 622924 [details] emerge --info
musl upstream has a FAQ entry specifically for this error: https://wiki.musl-libc.org/faq.html#Q:-When-compiling-something-against-musl,-I-get-error-messages-about-%3Ccode%3Esys/cdefs.h%3C/code%3E We will need to check/report upstream and patch affected code temporarily.
sys-devel/bison-3.7.2 builds fine on musl(tested on big-endian ppc64) without any patches or workarounds. this bug is not actually musl specific. you can still build older version of bison (tested 3.6.4 and 3.7.1) with MAKEOPTS="-j1" the problem was a race in makefile, look at https://bugs.gentoo.org/716516 race just manifested for musl in the same header file every time. commit fixing it: https://github.com/akimd/bison/commit/f7b642cff76d3b412fe3565b245f320fa205a4a0
(In reply to Georgy Yakovlev from comment #3) > sys-devel/bison-3.7.2 builds fine on musl(tested on big-endian ppc64) > without any patches or workarounds. > > this bug is not actually musl specific. > you can still build older version of bison (tested 3.6.4 and 3.7.1) with > MAKEOPTS="-j1" > > the problem was a race in makefile, look at https://bugs.gentoo.org/716516 > > race just manifested for musl in the same header file every time. > > > commit fixing it: > https://github.com/akimd/bison/commit/ > f7b642cff76d3b412fe3565b245f320fa205a4a0 I missed this comment, thank you!