Skip to content

scan-build ./configure fails looking for pthread support: "_REENTRANT must be defined" #53552

@ghenry

Description

@ghenry

Hi all,

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 as per:

https://github.com/SentryPeer/SentryPeer/actions/runs/1783127976

Any tips here? Not sure if this is a bug nor where to ask.

Thanks for reading,
Gavin.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions