[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AX_PTHREAD requiring _REETRANT that clang's scan-build doesn't define

From: Antonin Décimo
Subject: AX_PTHREAD requiring _REETRANT that clang's scan-build doesn't define
Date: Wed, 31 May 2023 16:16:07 +0200

Dear autoconf-archive-maintainers, dear Mr. Stevens,

I hope this is the best way of reporting problems with AX_PTHREAD. If
not, please let me know.

AX_PTHREAD is erroring if the macro _REENTRANT isn't defined. That
macro is now deprecated, although I can't find information on when it
was deprecated exactly, and on which platforms apart from glibc.

My problem is that clang's scan-build [1] doesn't define this macro,
even when all sorts of -pthreads flags are given to it. Apparently,
stock clang does define this macro. The issue has also been raised to
LLVM's bug tracker, but has not been picked up.

It seems that this macro isn't required anymore to get reentrant
functions from the system. I suggest AX_PTHREAD be changed not to
require this macro. Maybe checking if a program using pthreads works
is enough?

This problem has been reported on stackoverflow already:

If you want to reproduce this error, from a Debian (derivative),
here's an example using the ocaml compiler:

    # apt-get install build-essential clang-tools git
    $ git clone --depth=1 && cd ocaml
    $ scan-build ./configure


Thank you,

-- Antonin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]