'clang-analyzer: scan-build ./configure fails looking for pthread support: "_REENTRANT must be defined"
I'm using pthreads and my scan-build action has failed:
https://github.com/SentryPeer/SentryPeer/runs/5034401493?check_suite_focus=true
I see this:
cat clang_output_*
conftest.c:59:26: error: "_REENTRANT must be defined"
# error "_REENTRANT must be defined"
^
and
checking whether /usr/bin/../libexec/ccc-analyzer is Clang... rm: cannot remove 'conftest.plist': Is a directory
no
checking whether pthreads work with "-pthread" and "-lpthread"... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
configure: error: POSIX threads support is required
scan-build: Analysis run complete.
scan-build: Removing directory '/tmp/scan-build-2022-02-02-202911-1481984-1' because it contains no reports.
scan-build: No bugs found.
Version: clang-analyzer-13.0.0-3.fc35.noarch
My autotools builds fine without scan-build on the same Ubuntu version, as per:
https://github.com/SentryPeer/SentryPeer/actions/runs/1783127976
Any tips here? Not sure if this is a bug nor where to ask. I've raised it here too - https://github.com/llvm/llvm-project/issues/53552
Thanks for reading, Gavin.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
