You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed since version 2.19.0 building with musl libc (alpine for example). I get the following error:
/dev/cppcheck/cli/stacktrace.cpp:29:10: fatal error: execinfo.h: No such file or directory
29 | #include <execinfo.h>
| ^~~~~~~~~~~~
Documentation mentions explicitly that execinfo.h is not available on the following platforms: musl libc, FreeBSD 9.3, NetBSD 6.1, OpenBSD 6.9, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin, mingw, MSVC 14, Android 9.0
We dropped this change since it doesn't work. __GLIBC__ is not a built-in define but defined by the used libc and requires an include beforehand.
The correct handling would be to detect if the include is available. Unfortunately __has_include is not available until C++17. Using CMake we can detect if the include exists but that still leaves the regular Makefile.
Knowing the use case of musl (although I think nobody should ever be using it as it violates the spec) to reproduce it I will take a look on fixing this properly. This also allows us to add a step to the CI to make sure it doesn't break in the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've noticed since version 2.19.0 building with musl libc (alpine for example). I get the following error:
Documentation mentions explicitly that
execinfo.his not available on the following platforms:musl libc, FreeBSD 9.3, NetBSD 6.1, OpenBSD 6.9, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin, mingw, MSVC 14, Android 9.0