<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-13.0.0: NetBSD<10 does not provide state_not_recoverable"
   href="https://bugs.llvm.org/show_bug.cgi?id=52587">52587</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-13.0.0: NetBSD<10 does not provide state_not_recoverable
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>13.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>NetBSD
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tk@giga.or.at
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>