Created attachment 148912 [details] Patch that fixes compilation error SUMMARY make check fails at compilation stage with multiple errors (only first of them is "real" error). System: aarch64-linux (native compilation), musl C library. STEPS TO REPRODUCE 1. git clone git://sourceware.org/git/valgrind.git 2. cd valgrind 3. ./autogen.sh 4. ./configure 5. make check OBSERVED RESULT > In file included from scalar.c:5: > scalar.h: In function 'syscall': > scalar.h:17:49: error: expected declaration specifiers before '__THROW' > 17 | extern long int syscall (long int __sysno, ...) __THROW; > | ^~~~~~~ </code> > /* Cascade of "wrong syntax" errors */ EXPECTED RESULT make check ends without errors SOFTWARE/OS VERSIONS Valgrind 3.18.1 OS Alpine Linux Musl C Library aarch64-linux Kernel 5.17.0-rc7 ADDITIONAL INFORMATION Error analysis: The error comes from file memcheck/tests/arm64-linux/scalar.h: > extern long int syscall (long int __sysno, ...) __THROW; __THROW macro is glibc-specific. There is no such macro in Musl, thus, that is undefined. Proposed fix: check if __THROW is defined, and if not define it to empty. https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-multimedia/cdrkit/files/0001-define-__THROW-to-avoid-build-issue-with-musl.patch?h=rocko Possibly there is another similar issue with file memcheck/tests/x86-linux/scalar.h: > extern long int syscall (long int __sysno, ...) __THROW; I do not have proper HW to test.
*** This bug has been marked as a duplicate of bug 382034 ***