pkgsrc-Users archive

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

'state_not_recoverable' is not a member of 'std::errc' on clang build (was: clang-13.0.1nb1 build from pkgsrc 2022Q2 fails on NetBSD-9.2_STABLE (2022-07-01))



Hello all,

i have since a while the problem that i can't get clang built from the current pkgsrc 2022q2 on NetBSD 9.2. The original mail can be found below, here I'd like to share some more specific findings that I made with the help of #netbsd.

Boundary conditions:

- the problem does not occur on a native NetBSD 9.2 host

- the problem only occurs on a NetBSD 9.2 sandbox (chroot) running on a NetBSD 9.99.98 host

- the problem occurs both during build by pbulk and via direct "make install".

The failing compile step is:

```
/tmp/work/.gcc/bin/g++ -Wl,-zrelro -std=c++14 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/work/build/lib/Interpreter -I/tmp/work/clang-13.0.1.src/lib/Interpreter -I/tmp/work/clang-13.0.1.src/include -I/tmp/work/build/include -I/tmp/work/.buildlink/include -O2 -fPIC -D_FORTIFY_SOURCE=2 -I/tmp/work/.buildlink/include/python3.9 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -DNDEBUG -fno-exceptions -std=c++14 -MD -MT lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o -MF CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o.d -o CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o -c /tmp/work/clang-13.0.1.src/lib/Interpreter/IncrementalParser.cpp -fPIC -fstack-protector-strong
```

The error message is:

```
[ 76%] Built target obj.clangFormat [ 76%] Building CXX object lib/Testing/CMakeFiles/obj.clangTesting.dir/CommandLi neArgs.cpp.o [ 76%] Built target obj.clangTesting [ 76%] Building CXX object lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/I ncrementalExecutor.cpp.o [ 76%] Building CXX object lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/I ncrementalParser.cpp.o /tmp/work/clang-13.0.1.src/lib/Interpreter/IncrementalParser.cpp: In lambda func tion: /tmp/work/clang-13.0.1.src/lib/Interpreter/IncrementalParser.cpp:56:28: error: ' state_not_recoverable' is not a member of 'std::errc'
                 std::errc::state_not_recoverable,
                            ^~~~~~~~~~~~~~~~~~~~~
*** [lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o ] Error code 1

make[2]: stopped in /tmp/work/build
1 error
```

The supposedly undefined constant state_not_recoverable is "actually" located in /usr/include/g++/bits/error_constants, but is used there only conditionally:

```
namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION


enum class errc { address_family_not_supported = EAFNOSUPPORT,
      address_in_use =                          EADDRINUSE,
      .....
#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE state_not_recoverable = ENOTRECOVERABLE,
      #endif
```

So hopefully my concern sounds a little more concrete now: Is it possible that _GLIBCXX_HAVE_ENOTRECOVERABLE is not defined in the scenario described in the boundary conditions, and what are the possible reasons for this?

Could it be that due to the fact that my NetBSD 9.2 sandbox is running on a NetBSD 9.99.98 kernel, a decision is made at some point in a build (such as a dependent package?) that leads to this? The list of installed dependencies on the affected sandbox are:

```
cwrappers-20220403  pkgsrc compiler wrappers
digest-20220214     Message digest wrapper utility
gmake-4.3nb3        GNU version of 'make' utility
m4-1.4.19nb1        GNU version of UNIX m4 macro language processor
libtool-base-2.4.6nb3 Generic shared library support script (the script itself)
perl-5.34.1         Practical Extraction and Report Language
p5-gettext-1.07nb6  Perl5 module interface to C I18N functions
help2man-1.49.2     Generate simple manual pages from program output
autoconf-2.71nb1    Generates automatic source code configuration scripts
automake-1.16.5nb1  GNU Standards-compliant Makefile generator
pkgconf-1.8.0       API-driven pkg-config replacement
libuv-1.44.1nb1     Cross-platform asychronous I/O
rhash-1.4.3 Calculate/check CRC32, MD5, SHA1, GOST, TTH, BTIH or other hash sums
libunistring-1.0    Unicode string library
libidn2-2.3.2 Convert internationalized domain names to/from ASCII Encoding
readline-8.1.2      GNU library that can recall and edit previous input
libffi-3.4.2nb2     Foreign function interface
libuuid-2.32.1nb1   Generate unique identifiers for objects
python39-3.9.13 Interpreted, interactive, object-oriented programming language
xmlcatmgr-2.2nb1    XML and SGML catalog manager
libxml2-2.9.14      XML parser library from the GNOME project
nghttp2-1.47.0nb1   Implementation of HTTP/2 in C
curl-7.84.0         Client that groks URLs
cmake-3.23.2        Cross platform make
llvm-13.0.1nb1      Low Level Virtual Machine compiler infrastructure
```

I'm not so deep into the details that I can derive this on my own in a reasonable amount of time, and would appreciate a helpful hint.

Kind regards
Matthias



On 10.07.22 09:17, Matthias Petermann wrote:
Hello,

After several retries, most recently with only one parallel make job, I
unfortunately now find that clang 13.0.1 does not build in my
environment, nor do a large number of packages that depend on it.
Unfortunately I can't do anything with the error description in the
build.log:

```
[ 76%] Building CXX object
lib/Testing/CMakeFiles/obj.clangTesting.dir/CommandLineArgs.cpp.o [
76%] Built target obj.clangTesting [ 76%] Building CXX object
lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalExecutor.cpp.o
[ 76%] Building CXX object
lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o
/tmp/work/clang-13.0.1.src/lib/Interpreter/IncrementalParser.cpp: In
lambda function:
/tmp/work/clang-13.0.1.src/lib/Interpreter/IncrementalParser.cpp:56:28:
error: 'state_not_recoverable' is not a member of 'std::errc'
std::errc::state_not_recoverable, ^~~~~~~~~~~~~~~~~~~~~ ***
[lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalParser.cpp.o]
Error code 1

make[2]: stopped in /tmp/work/build
1 error

make[2]: stopped in /tmp/work/build
*** [lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/all] Error
code 2

make[1]: stopped in /tmp/work/build
1 error

make[1]: stopped in /tmp/work/build
*** [all] Error code 2

make: stopped in /tmp/work/build
1 error

make: stopped in /tmp/work/build
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/lang/clang
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/clang
```

Did anyone run into the same issue or is there a known workaround?

Kind regards
Matthias


--
Petermann IT
Matthias Petermann
Wildparkring 13, 01458 Ottendorf-Okrilla

Telefon: +49 (0)35205 597 991
E-Mail: mp%petermann-it.de@localhost
Website:  https://www.petermann-it.de
Plattform der EU-Kommission zur Online-Streitbeilegung: https://www.ec.europa.eu/consumers/odr Unsere Datenschutzhinweise können Sie einsehen unter: https://www.petermann-it.de/privacy

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Home | Main Index | Thread Index | Old Index