[llvm-bugs] [Bug 52587] New: clang-13.0.0: NetBSD<10 does not provide state_not_recoverable

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 22 15:53:26 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=52587

            Bug ID: 52587
           Summary: clang-13.0.0: NetBSD<10 does not provide
                    state_not_recoverable
           Product: clang
           Version: 13.0
          Hardware: All
                OS: NetBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tk at giga.or.at
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

In NetBSD before release 10 (which is not out yet), the C headers do not
provide ENOTRECOVERABLE, and thus the C++ headers do not provide
std::errc::state_not_recoverable.

This leads to the following compilation problem on NetBSD 9:

[ 65%] Building CXX object
lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o
/usr/pkgsrc/lang/clang/work/clang-13.0.0.src/lib/Interpreter/IncrementalParser.cpp:
In lambda function:
/usr/pkgsrc/lang/clang/work/clang-13.0.0.src/lib/Interpreter/IncrementalParser.cpp:56:28:
error: 'state_not_recoverable' is not a member of 'std::errc'
                 std::errc::state_not_recoverable,
                            ^~~~~~~~~~~~~~~~~~~~~
*** Error code 1


As a workaround I used:
CXXFLAGS=-D_GLIBCXX_HAVE_ENOTRECOVERABLE=1 -DENOTRECOVERABLE=98
and clang-13.0.0 built successfully.

I don't know the proper fix. Can a different std::errc code be used in
IncrementalParser.cpp?

(This problem does not occur any longer on NetBSD-current and will be fixed in
NetBSD 10.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211122/a7f19a35/attachment-0001.html>


More information about the llvm-bugs mailing list