https://bugs.kde.org/show_bug.cgi?id=453929
Bug ID: 453929
Summary: 3.18.1 - make check fails to compile for aarch64-linux
with musl C library. FIX PROPOSED.
Product: valgrind
Version: 3.18.1
Platform: Compiled Sources
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: memcheck
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 148912
--> https://bugs.kde.org/attachment.cgi?id=148912&action=edit
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.
--
You are receiving this mail because:
You are watching all bug changes.