wlav / cppyy

Other
400 stars 41 forks source link

cppyy fails to load nlohmann::json c++11 library on linux x86_64 #97

Closed qazi0 closed 1 year ago

qazi0 commented 1 year ago

Hi, I'm trying to cppyy.include() the nlohmann::json C++11 library on Linux x86_64 (Ubuntu 20.04.4 x86_64 on Anaconda), but it fails with:

Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyyy
>>> cppyy.include('third_party/json.hpp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda/envs/fast/lib/python3.9/site-packages/cppyy/__init__.py", line 263, in include
    raise ImportError('Failed to load header file "%s"%s' % (header, err.err))
ImportError: Failed to load header file "third_party/json.hpp"
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1214:5: error:
      exception specification in declaration does not match previous declaration
    begin(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:107:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* begin(valarray<_Tp>&);
                              ^
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1224:5: error:
      exception specification in declaration does not match previous declaration
    begin(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:108:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
                                    ^
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1234:5: error:
      exception specification in declaration does not match previous declaration
    end(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:109:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* end(valarray<_Tp>&);
                              ^
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1249:5: error:
      exception specification in declaration does not match previous declaration
    end(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:110:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
                                    ^

>>>

I'm able to successfully include and use the same json.hpp file without errors with cppyy-2.3.1 on my M1 Mac (running Anaconda on Clang 13.0.1), so the issue isn't in the library code (obv.)

Environment and version info

OS & Platform

❯ uname -a
Linux siraj-compute 5.15.0-1017-azure #20~20.04.1-Ubuntu SMP x86_64 GNU/Linux

Python

❯ python --version
Python 3.9.13

Anaconda

❯ conda --version
conda 4.13.0

cppyy

❯ pip list | grep cppyy
cppyy         2.3.1
cppyy-backend 1.14.8
cppyy-cling   6.25.3

cppyy installed with:

conda create -n fast python=3.9
conda activate fast
conda install -c conda-forge cppyy==2.3.1 

*I set the version to 2.3.1 because by running a plain conda install -c conda-forge cppyy, conda was installing cppyy==2.1.0 with gcc-9.5, and I initially thought this might be a C++ standard issue, later realized gcc-9 fully supports C++11, and nlohmann::json is a vanilla C++11-only library.

cppyy C++ version:

>>> cppyy.gbl.gInterpreter.ProcessLine('__cplusplus')
(long) 201703
201703

System GCC

❯ which gcc
/usr/bin/gcc
❯ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.

From the error traceback believe anaconda is using gcc-10.4, not the system gcc-9.4

Any ideas why the linux x64 cppyy is failing to include this C++11 library? Once again, I'm able to easily cppyy.include() the same file on my M1 Mac (with Python 3.9, Anaconda on Clang 13.0.1,) without errors, and I tested it on an Intel Mac as well, works without errors. Any help/direction for debugging would be appreciated @wlav !

qazi0 commented 1 year ago

I'm able to compile a simple C++11 nlohmann::json snippet with the system gcc-9 without errors:

// test-json.cpp

#include <iostream>
#include "third_party/json.hpp"

int main() {
    nlohmann::json j;
    j["hello"] = "world";
    j["hi"] = "C++11";

    std::cout << j << "\n";
}

Compiling and running with:

❯ g++ test-json.cpp -o testj
./testj

prints

{"hello":"world","hi":"C++11"}

Thus the issue isn't in the nlohmann::json library

wlav commented 1 year ago

The first code shows gcc-10 headers, the second shows use of gcc-9. Is there a mixup in the environment? In particular, the first shows the headers brought in by Conda, but if Cling subsequently finds the system compiler, there could be a mixup between what is in the pre-compiled header and what is seen on the system for any system files that are not part of the pre-compiled header.

Could you set the envar CLING_REBUILD_PCH=1, which will force-rebuild the pre-compiled header, to see whether that changes, and if yes, ensure that the environment is made consistent?

qazi0 commented 1 year ago

I set CLING_REBUILD_PCH=1, and relaunched the interpreter, it recompiled the headers but same results:

❯ export CLING_REBUILD_PCH=1
❯ python
Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options: -O2 -mavx); this may take a minute ...
>>> cppyy.include('third_party/json.hpp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda/envs/fast/lib/python3.9/site-packages/cppyy/__init__.py", line 263, in include
    raise ImportError('Failed to load header file "%s"%s' % (header, err.err))
ImportError: Failed to load header file "third_party/json.hpp"
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1214:5: error:
      exception specification in declaration does not match previous declaration
    begin(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:107:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* begin(valarray<_Tp>&);
                              ^
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1224:5: error:
      exception specification in declaration does not match previous declaration
    begin(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:108:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
                                    ^
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1234:5: error:
      exception specification in declaration does not match previous declaration
    end(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:109:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* end(valarray<_Tp>&);
                              ^
In file included from input_line_18:1:
In file included from ./third_party/json.hpp:170:
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1249:5: error:
      exception specification in declaration does not match previous declaration
    end(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:110:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
                                    ^

>>>

As for what you said about mixup, conda installed gcc-10.4 when I ran conda install -c conda-forge cppyy==2.3.1, while the system gcc is 9(.4). I just installed gcc-10 on the system, and set it as default with update-alternatives, so that now

gcc --version

returns

gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0

However, the issue still persists.

qazi0 commented 1 year ago

Haven't been able to get this to work. I created a fresh new Azure Linux (Ubuntu) VM, installed conda and installed cppyy==2.3.1, this was the conda package install plan:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    binutils_impl_linux-64-2.36.1|       h193b22a_2        10.4 MB  conda-forge
    binutils_linux-64-2.36     |      hf3e587d_10          24 KB  conda-forge
    ca-certificates-2022.9.14  |       ha878542_0         152 KB  conda-forge
    certifi-2022.9.14          |     pyhd8ed1ab_0         156 KB  conda-forge
    cppyy-2.3.1                |   py39hd14de60_0          36 KB  conda-forge
    cppyy-backend-1.14.8       |   py39hf939315_0          77 KB  conda-forge
    cppyy-cling-6.25.3         |   py39h3d66fe8_1        48.6 MB  conda-forge
    cpycppyy-1.12.10           |   py39hf939315_0         329 KB  conda-forge
    gcc_impl_linux-64-10.4.0   |      h7ee1905_16        46.7 MB  conda-forge
    gcc_linux-64-10.4.0        |      h9215b83_10          25 KB  conda-forge
    gxx_impl_linux-64-10.4.0   |      h7ee1905_16        11.4 MB  conda-forge
    gxx_linux-64-10.4.0        |      h6e491c6_10          24 KB  conda-forge
    kernel-headers_linux-64-2.6.32|      he073ed8_15         707 KB  conda-forge
    ld_impl_linux-64-2.36.1    |       hea4e1c9_2         667 KB  conda-forge
    libgcc-devel_linux-64-10.4.0|      h74af60c_16         3.3 MB  conda-forge
    libllvm9-9.0.1             |default_hc23dcda_7        25.6 MB  conda-forge
    libsanitizer-10.4.0        |      hde28e3b_16         6.0 MB  conda-forge
    libstdcxx-devel_linux-64-10.4.0|      h74af60c_16         9.6 MB  conda-forge
    libzlib-1.2.11             |    h166bdaf_1014          60 KB  conda-forge
    openssl-1.1.1o             |       h166bdaf_0         2.1 MB  conda-forge
    python-3.9.7               |h49503c6_0_cpython        27.6 MB  conda-forge
    python_abi-3.9             |           2_cp39           4 KB  conda-forge
    sqlite-3.38.5              |       h4ff8645_0         1.5 MB  conda-forge
    sysroot_linux-64-2.12      |      he073ed8_15        31.4 MB  conda-forge
    tk-8.6.12                  |       h27826a3_0         3.3 MB  conda-forge
    zlib-1.2.11                |    h166bdaf_1014          88 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       229.9 MB

But I'm still getting the same error:

Python 3.9.7 | packaged by conda-forge | (default, Sep  2 2021, 17:58:34)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
>>> cppyy.include('third_party/argparse.hpp')
True
>>> cppyy.include('third_party/json.hpp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda/envs/dev/lib/python3.9/site-packages/cppyy/__init__.py", line 263, in include
    raise ImportError('Failed to load header file "%s"%s' % (header, err.err))
ImportError: Failed to load header file "third_party/json.hpp"
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1214:5: error:
      exception specification in declaration does not match previous declaration
    begin(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:107:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* begin(valarray<_Tp>&);
                              ^
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1224:5: error:
      exception specification in declaration does not match previous declaration
    begin(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:108:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
                                    ^
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1234:5: error:
      exception specification in declaration does not match previous declaration
    end(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:109:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* end(valarray<_Tp>&);
                              ^
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1249:5: error:
      exception specification in declaration does not match previous declaration
    end(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:110:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
                                    ^

>>>

If it is an issue of gcc mixup, Any ideas how to create a secluded environment @wlav?

Funnily enough, I'm able to successfully cppyy.include() the C++17-only Argparse library. So (naively) this has to be an issue with a specific C++(11) feature not implemented in cling/cppyy that the nlohmann::json library uses, while argparse doesn't. Any ideas?

qazi0 commented 1 year ago

Whoops @wlav, installing cppyy==2.4.0 with conda (installs gcc-11.2) and importing cppyy crashes with a ***segmentation violation***. I should probably open a new issue for this:

Installation:

(fast) ➜  flash git:(develop) conda install -c conda-forge cppyy==2.4.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /anaconda/envs/fast

  added / updated specs:
    - cppyy==2.4.0

The following NEW packages will be INSTALLED:

  binutils_impl_lin~ pkgs/main/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1
  binutils_linux-64  pkgs/main/linux-64::binutils_linux-64-2.38.0-hc2dff05_0
  cppyy              conda-forge/linux-64::cppyy-2.4.0-py39hd14de60_0
  cppyy-backend      conda-forge/linux-64::cppyy-backend-1.14.9-py39hf939315_0
  cppyy-cling        conda-forge/linux-64::cppyy-cling-6.27.0-py39h3d66fe8_1
  cpycppyy           conda-forge/linux-64::cpycppyy-1.12.11-py39hf939315_0
  cxx-compiler       conda-forge/linux-64::cxx-compiler-1.0.0-hf484d3e_0
  gcc_impl_linux-64  pkgs/main/linux-64::gcc_impl_linux-64-11.2.0-h1234567_1
  gcc_linux-64       pkgs/main/linux-64::gcc_linux-64-11.2.0-h5c386dc_0
  gxx_impl_linux-64  pkgs/main/linux-64::gxx_impl_linux-64-11.2.0-h1234567_1
  gxx_linux-64       pkgs/main/linux-64::gxx_linux-64-11.2.0-hc2dff05_0
  kernel-headers_li~ conda-forge/noarch::kernel-headers_linux-64-2.6.32-he073ed8_15
  libgcc-devel_linu~ pkgs/main/linux-64::libgcc-devel_linux-64-11.2.0-h1234567_1
  libllvm9           conda-forge/linux-64::libllvm9-9.0.1-default_hc23dcda_7
  libstdcxx-devel_l~ pkgs/main/linux-64::libstdcxx-devel_linux-64-11.2.0-h1234567_1
  libzlib            conda-forge/linux-64::libzlib-1.2.12-h166bdaf_3
  python_abi         conda-forge/linux-64::python_abi-3.9-2_cp39
  sysroot_linux-64   conda-forge/noarch::sysroot_linux-64-2.12-he073ed8_15

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2022.07.19~ --> conda-forge::ca-certificates-2022.9.14-ha878542_0
  libgcc-ng          pkgs/main::libgcc-ng-11.2.0-h1234567_1 --> conda-forge::libgcc-ng-12.1.0-h8d9b700_16
  libgomp              pkgs/main::libgomp-11.2.0-h1234567_1 --> conda-forge::libgomp-12.1.0-h8d9b700_16
  libstdcxx-ng       pkgs/main::libstdcxx-ng-11.2.0-h12345~ --> conda-forge::libstdcxx-ng-12.1.0-ha89aaad_16

The following packages will be SUPERSEDED by a higher-priority channel:

  _libgcc_mutex           pkgs/main::_libgcc_mutex-0.1-main --> conda-forge::_libgcc_mutex-0.1-conda_forge
  _openmp_mutex          pkgs/main::_openmp_mutex-5.1-1_gnu --> conda-forge::_openmp_mutex-4.5-2_gnu
  certifi            pkgs/main/linux-64::certifi-2022.9.14~ --> conda-forge/noarch::certifi-2022.9.14-pyhd8ed1ab_0
  openssl              pkgs/main::openssl-1.1.1q-h7f8727e_0 --> conda-forge::openssl-1.1.1q-h166bdaf_0

Proceed ([y]/n)?

(just) Importing cppyy

Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options: -O2 -march=native); this may take a minute ...
In file included from input_line_10:9:
In file included from ./etc/dictpch/allHeaders.h:50:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/ctime:80:11: error: no member named 'timespec_get' in the global namespace
  using ::timespec_get;
        ~~^
In file included from input_line_10:9:
In file included from ./etc/dictpch/allHeaders.h:116:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/cuchar:53:10: fatal error: 'uchar.h' file not found
#include <uchar.h>
         ^~~~~~~~~
Error: ./bin/rootcling: compilation failure (/tmp/allDict19dea64809_dictUmbrella.h)
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/loader.py:139: UserWarning: No precompiled header available (failed to build); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/fstream:40:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/codecvt.h:344:20: error: explicit specialization of undeclared template class 'messages'
      friend class messages<char>;
                   ^       ~~~~~~
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/codecvt.h:407:20: error: explicit specialization of undeclared template class 'messages'
      friend class messages<wchar_t>;
                   ^       ~~~~~~~~~
In file included from input_line_3:1:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:28:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/atomic:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/atomic_base.h:38:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:57:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:149:41: error: no member named 'value' in 'std::__is_tuple_like<_IO_FILE *>'
    : public __bool_constant<!bool(_Pp::value)>
                                   ~~~~~^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:144:26: note: in instantiation of template class 'std::__not_<std::__is_tuple_like<_IO_FILE *> >' requested here
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
                         ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:190:24: note: in instantiation of template class 'std::__and_<std::__not_<std::__is_tuple_like<_IO_FILE *> >,
      std::is_move_constructible<_IO_FILE *>, std::is_move_assignable<_IO_FILE *> >' requested here
    typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
                       ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/x86_64-conda-linux-gnu/bits/basic_file.h:79:2: note: while substituting deduced template arguments into function template 'swap' [with _Tp = _IO_FILE *]
        std::swap(_M_cfile, __f._M_cfile);
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/x86_64-conda-linux-gnu/bits/basic_file.h:79:2: error: no matching function for call to 'swap'
        std::swap(_M_cfile, __f._M_cfile);
        ^~~~~~~~~
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_bvector.h:118:3: note: candidate function not viable: no known conversion from 'std::__c_file *' (aka '_IO_FILE *') to 'std::_Bit_reference' for 1st
      argument
  swap(_Bit_reference __x, _Bit_reference __y) noexcept
  ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_bvector.h:126:3: note: candidate function not viable: no known conversion from 'std::__c_file *' (aka '_IO_FILE *') to 'std::_Bit_reference' for 1st
      argument
  swap(_Bit_reference __x, bool& __y) noexcept
  ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_bvector.h:134:3: note: candidate function not viable: no known conversion from 'std::__c_file *' (aka '_IO_FILE *') to 'bool &' for 1st argument
  swap(bool& __x, _Bit_reference __y) noexcept
  ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:196:5: note: candidate template ignored: substitution failure [with _Tp = _IO_FILE *]
    swap(_Tp& __a, _Tp& __b)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:220:5: note: candidate template ignored: could not match '_Tp [_Nm]' against 'std::__c_file *' (aka '_IO_FILE *')
    swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_pair.h:533:5: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against '_IO_FILE *'
    swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_pair.h:541:5: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against '_IO_FILE *'
    swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:6492:5: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against
      '_IO_FILE *'
    swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_vector.h:1962:5: note: candidate template ignored: could not match 'vector<type-parameter-0-0, type-parameter-0-1>' against '_IO_FILE *'
    swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/array:348:5: note: candidate template ignored: could not match 'array<type-parameter-0-0, _Nm>' against '_IO_FILE *'
    swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/array:356:5: note: candidate template ignored: could not match 'array<type-parameter-0-0, _Nm>' against '_IO_FILE *'
    swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete;
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/tuple:1749:5: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against '_IO_FILE *'
    swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/tuple:1757:5: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against '_IO_FILE *'
    swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/std_function.h:728:5: note: candidate template ignored: could not match 'function<type-parameter-0-0 (type-parameter-0-1...)>' against '_IO_FILE *'
    swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/unordered_map.h:2120:5: note: candidate template ignored: could not match 'unordered_map<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2,
      type-parameter-0-3, type-parameter-0-4>' against '_IO_FILE *'
    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/unordered_map.h:2127:5: note: candidate template ignored: could not match 'unordered_multimap<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2,
      type-parameter-0-3, type-parameter-0-4>' against '_IO_FILE *'
    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
    ^
In file included from input_line_3:1:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:28:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/atomic:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/atomic_base.h:38:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:57:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:149:41: error: no member named 'value' in 'std::__is_tuple_like<bool>'
    : public __bool_constant<!bool(_Pp::value)>
                                   ~~~~~^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:144:26: note: in instantiation of template class 'std::__not_<std::__is_tuple_like<bool> >' requested here
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
                         ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:190:24: note: in instantiation of template class 'std::__and_<std::__not_<std::__is_tuple_like<bool> >, std::is_move_constructible<bool>,
      std::is_move_assignable<bool> >' requested here
    typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
                       ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/x86_64-conda-linux-gnu/bits/basic_file.h:80:2: note: while substituting deduced template arguments into function template 'swap' [with _Tp = bool]
        std::swap(_M_cfile_created, __f._M_cfile_created);
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/x86_64-conda-linux-gnu/bits/basic_file.h:80:2: error: no matching function for call to 'swap'
        std::swap(_M_cfile_created, __f._M_cfile_created);
        ^~~~~~~~~
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_bvector.h:126:3: note: candidate function not viable: no known conversion from 'bool' to 'std::_Bit_reference' for 1st argument
  swap(_Bit_reference __x, bool& __y) noexcept
  ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_bvector.h:134:3: note: candidate function not viable: no known conversion from 'bool' to 'std::_Bit_reference' for 2nd argument
  swap(bool& __x, _Bit_reference __y) noexcept
  ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_bvector.h:118:3: note: candidate function not viable: no known conversion from 'bool' to 'std::_Bit_reference' for 1st argument
  swap(_Bit_reference __x, _Bit_reference __y) noexcept
  ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:196:5: note: candidate template ignored: substitution failure [with _Tp = bool]
    swap(_Tp& __a, _Tp& __b)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:220:5: note: candidate template ignored: could not match '_Tp [_Nm]' against 'bool'
    swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_pair.h:533:5: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against 'bool'
    swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_pair.h:541:5: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against 'bool'
    swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:6492:5: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against
      'bool'
    swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/stl_vector.h:1962:5: note: candidate template ignored: could not match 'vector<type-parameter-0-0, type-parameter-0-1>' against 'bool'
    swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/array:348:5: note: candidate template ignored: could not match 'array<type-parameter-0-0, _Nm>' against 'bool'
    swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/array:356:5: note: candidate template ignored: could not match 'array<type-parameter-0-0, _Nm>' against 'bool'
    swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete;
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/tuple:1749:5: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against 'bool'
    swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/tuple:1757:5: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against 'bool'
    swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/std_function.h:728:5: note: candidate template ignored: could not match 'function<type-parameter-0-0 (type-parameter-0-1...)>' against 'bool'
    swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/unordered_map.h:2120:5: note: candidate template ignored: could not match 'unordered_map<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2,
      type-parameter-0-3, type-parameter-0-4>' against 'bool'
    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/unordered_map.h:2127:5: note: candidate template ignored: could not match 'unordered_multimap<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2,
      type-parameter-0-3, type-parameter-0-4>' against 'bool'
    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
    ^
In file included from input_line_3:1:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:28:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/atomic:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/atomic_base.h:38:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:57:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:1043:58: error: no member named 'value' in 'std::__is_referenceable<__mbstate_t, void>'
  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
                                ~~~~~~~~~~~~~~~~~~~~~~~~~^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:1058:14: note: in instantiation of default argument for '__is_copy_assignable_impl<__mbstate_t>' required here
    : public __is_copy_assignable_impl<_Tp>::type
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:144:26: note: in instantiation of template class 'std::is_copy_assignable<__mbstate_t>' requested here
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
                         ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/fstream:93:21: note: in instantiation of template class 'std::__and_<std::is_copy_assignable<__mbstate_t>, std::is_copy_constructible<__mbstate_t>,
      std::is_default_constructible<__mbstate_t> >' requested here
      static_assert(__chk_state<typename _Traits::state_type>::value,
                    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/fstream.tcc:1086:25: note: in instantiation of template class 'std::basic_filebuf<char, std::char_traits<char> >' requested here
  extern template class basic_filebuf<char>;
                        ^
In file included from input_line_3:1:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:28:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/atomic:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/atomic_base.h:38:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/move.h:57:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:116:31: error: no member named 'value' in 'std::is_lvalue_reference<__mbstate_t>'
    : public conditional<_B1::value, _B1, _B2>::type
                         ~~~~~^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:531:14: note: in instantiation of template class 'std::__or_<std::is_lvalue_reference<__mbstate_t>, std::is_rvalue_reference<__mbstate_t> >'
      requested here
    : public __or_<is_lvalue_reference<_Tp>,
             ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:121:26: note: in instantiation of template class 'std::is_reference<__mbstate_t>' requested here
    : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
                         ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:206:24: note: in instantiation of template class 'std::__or_<std::is_reference<__mbstate_t>, std::is_function<__mbstate_t>,
      std::is_void<__mbstate_t>, std::__is_array_unknown_bounds<__mbstate_t> >' requested here
    constexpr typename __or_<
                       ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:1060:21: note: while substituting deduced template arguments into function template '__is_complete_or_unbounded' [with _TypeIdentity =
      std::__type_identity<__mbstate_t>, _NestedType = (no value)]
      static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
                    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/type_traits:144:26: note: in instantiation of template class 'std::is_copy_assignable<__mbstate_t>' requested here
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
                         ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/fstream:93:21: note: in instantiation of template class 'std::__and_<std::is_copy_assignable<__mbstate_t>, std::is_copy_constructible<__mbstate_t>,
      std::is_default_constructible<__mbstate_t> >' requested here
      static_assert(__chk_state<typename _Traits::state_type>::value,
                    ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/fstream.tcc:1086:25: note: in instantiation of template class 'std::basic_filebuf<char, std::char_traits<char> >' requested here
  extern template class basic_filebuf<char>;
                        ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:24:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/fstream:98:45: error: no member named 'value' in 'std::is_same<std::fpos<__mbstate_t>, std::fpos<__mbstate_t> >'
                            fpos<typename _Traits::state_type>>::value,
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/fstream.tcc:1086:25: note: in instantiation of template class 'std::basic_filebuf<char, std::char_traits<char> >' requested here
  extern template class basic_filebuf<char>;
                        ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:24:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/fstream:93:64: error: no member named 'value' in 'std::__and_<std::is_copy_assignable<__mbstate_t>, std::is_copy_constructible<__mbstate_t>,
      std::is_default_constructible<__mbstate_t> >'
      static_assert(__chk_state<typename _Traits::state_type>::value,
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/fstream.tcc:1092:25: note: in instantiation of template class 'std::basic_filebuf<wchar_t, std::char_traits<wchar_t> >' requested here
  extern template class basic_filebuf<wchar_t>;
                        ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:24:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/fstream:98:45: error: no member named 'value' in 'std::is_same<std::fpos<__mbstate_t>, std::fpos<__mbstate_t> >'
                            fpos<typename _Traits::state_type>>::value,
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:26:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/iomanip:43:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/locale:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.h:39:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/ctime:80:11: error: no member named 'timespec_get' in the global namespace
  using ::timespec_get;
        ~~^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:26:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/iomanip:43:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/locale:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.h:2031:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.tcc:160:9: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char>')
        string __grouping_tmp;
               ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:533:7: note: candidate constructor template not viable: requires at least argument '__s', but no arguments were provided
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:553:7: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:638:9: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:652:2: note: candidate constructor template not viable: requires at least 3 arguments, but 0 were provided
        basic_string(const _Tp& __t, size_type __pos, size_type __n,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:663:2: note: candidate constructor template not viable: requires at least argument '__t', but no arguments were provided
        basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:448:7: note: candidate constructor not viable: requires single argument '__a', but no arguments were provided
      basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:456:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(const basic_string& __str)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:565:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(basic_string&& __str) noexcept
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:153:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(__sv_wrapper __svw, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:592:7: note: candidate constructor not viable: requires at least argument '__l', but no arguments were provided
      basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:596:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:600:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(basic_string&& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:469:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:484:7: note: candidate constructor not viable: requires 3 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:518:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const _CharT* __s, size_type __n,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:500:7: note: candidate constructor not viable: requires 4 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:26:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/iomanip:43:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/locale:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.h:2031:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.tcc:173:9: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char>')
        string __res;
               ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:533:7: note: candidate constructor template not viable: requires at least argument '__s', but no arguments were provided
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:553:7: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:638:9: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:652:2: note: candidate constructor template not viable: requires at least 3 arguments, but 0 were provided
        basic_string(const _Tp& __t, size_type __pos, size_type __n,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:663:2: note: candidate constructor template not viable: requires at least argument '__t', but no arguments were provided
        basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:448:7: note: candidate constructor not viable: requires single argument '__a', but no arguments were provided
      basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:456:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(const basic_string& __str)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:565:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(basic_string&& __str) noexcept
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:153:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(__sv_wrapper __svw, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:592:7: note: candidate constructor not viable: requires at least argument '__l', but no arguments were provided
      basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:596:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:600:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(basic_string&& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:469:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:484:7: note: candidate constructor not viable: requires 3 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:518:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const _CharT* __s, size_type __n,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:500:7: note: candidate constructor not viable: requires 4 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:26:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/iomanip:43:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/locale:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.h:2031:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.tcc:374:14: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char>')
      string __str;
             ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:533:7: note: candidate constructor template not viable: requires at least argument '__s', but no arguments were provided
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:553:7: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:638:9: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:652:2: note: candidate constructor template not viable: requires at least 3 arguments, but 0 were provided
        basic_string(const _Tp& __t, size_type __pos, size_type __n,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:663:2: note: candidate constructor template not viable: requires at least argument '__t', but no arguments were provided
        basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:448:7: note: candidate constructor not viable: requires single argument '__a', but no arguments were provided
      basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:456:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(const basic_string& __str)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:565:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(basic_string&& __str) noexcept
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:153:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(__sv_wrapper __svw, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:592:7: note: candidate constructor not viable: requires at least argument '__l', but no arguments were provided
      basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:596:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:600:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(basic_string&& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:469:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:484:7: note: candidate constructor not viable: requires 3 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:518:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const _CharT* __s, size_type __n,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:500:7: note: candidate constructor not viable: requires 4 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Riostream.h:26:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/iomanip:43:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/locale:41:
In file included from /anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.h:2031:
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/locale_facets_nonio.tcc:392:14: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char>')
      string __str;
             ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:533:7: note: candidate constructor template not viable: requires at least argument '__s', but no arguments were provided
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:553:7: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:638:9: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:652:2: note: candidate constructor template not viable: requires at least 3 arguments, but 0 were provided
        basic_string(const _Tp& __t, size_type __pos, size_type __n,
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:663:2: note: candidate constructor template not viable: requires at least argument '__t', but no arguments were provided
        basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
        ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:448:7: note: candidate constructor not viable: requires single argument '__a', but no arguments were provided
      basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:456:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(const basic_string& __str)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:565:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
      basic_string(basic_string&& __str) noexcept
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:153:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(__sv_wrapper __svw, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:592:7: note: candidate constructor not viable: requires at least argument '__l', but no arguments were provided
      basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:596:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:600:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
      basic_string(basic_string&& __str, const _Alloc& __a)
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:469:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:484:7: note: candidate constructor not viable: requires 3 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:518:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      basic_string(const _CharT* __s, size_type __n,
      ^
/anaconda/envs/fast/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/include/c++/11.2.0/bits/basic_string.h:500:7: note: candidate constructor not viable: requires 4 arguments, but 0 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
In file included from libCoreLegacy dictionary payload:9:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/TApplication.h:27:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/TObject.h:17:
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/TStorage.h:85:4: error: no member named 'value' in 'std::is_integral<int>'
   ClassDef(TStorage,0)  //Storage manager class
   ^~~~~~~~~~~~~~~~~~~~
input_line_14:4:27: note: expanded from macro 'ClassDef'
#define ClassDef(name,id) \
                          ^
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:294:4: note: expanded from macro '\
_ClassDefOutline_'
   _ClassDefBase_(name,id, virtual_keyword, overrd)       \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:265:50: note: expanded from macro '_ClassDefBase_'
   static_assert(std::is_integral<decltype(id)>::value, "ClassDef(Inline) macro: the specified class version number is no...
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from libCoreLegacy dictionary payload:9:
In file included from /anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/TApplication.h:27:
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/TObject.h:194:4: error: no member named 'value' in 'std::is_integral<int>'
   ClassDef(TObject,1)  //Basic ROOT object
   ^~~~~~~~~~~~~~~~~~~
input_line_14:4:27: note: expanded from macro 'ClassDef'
#define ClassDef(name,id) \
                          ^
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:294:4: note: expanded from macro '\
_ClassDefOutline_'
   _ClassDefBase_(name,id, virtual_keyword, overrd)       \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:265:50: note: expanded from macro '_ClassDefBase_'
   static_assert(std::is_integral<decltype(id)>::value, "ClassDef(Inline) macro: the specified class version number is no...
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from libCoreLegacy dictionary payload:9:
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/TApplication.h:71:4: error: no member named 'value' in 'std::is_integral<int>'
   ClassDef(TApplication,0)  //GUI application singleton
   ^~~~~~~~~~~~~~~~~~~~~~~~
input_line_14:4:27: note: expanded from macro 'ClassDef'
#define ClassDef(name,id) \
                          ^
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:294:4: note: expanded from macro '\
_ClassDefOutline_'
   _ClassDefBase_(name,id, virtual_keyword, overrd)       \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/anaconda/envs/fast/lib/python3.9/site-packages/cppyy_backend/include/Rtypes.h:265:50: note: expanded from macro '_ClassDefBase_'
   static_assert(std::is_integral<decltype(id)>::value, "ClassDef(Inline) macro: the specified class version number is no...
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
 *** Break *** segmentation violation
 *** Break *** segmentation violation
qazi0 commented 1 year ago

Haven't been able to get this to work. I created a fresh new Azure Linux (Ubuntu) VM, installed conda and installed cppyy==2.3.1, this was the conda package install plan:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    binutils_impl_linux-64-2.36.1|       h193b22a_2        10.4 MB  conda-forge
    binutils_linux-64-2.36     |      hf3e587d_10          24 KB  conda-forge
    ca-certificates-2022.9.14  |       ha878542_0         152 KB  conda-forge
    certifi-2022.9.14          |     pyhd8ed1ab_0         156 KB  conda-forge
    cppyy-2.3.1                |   py39hd14de60_0          36 KB  conda-forge
    cppyy-backend-1.14.8       |   py39hf939315_0          77 KB  conda-forge
    cppyy-cling-6.25.3         |   py39h3d66fe8_1        48.6 MB  conda-forge
    cpycppyy-1.12.10           |   py39hf939315_0         329 KB  conda-forge
    gcc_impl_linux-64-10.4.0   |      h7ee1905_16        46.7 MB  conda-forge
    gcc_linux-64-10.4.0        |      h9215b83_10          25 KB  conda-forge
    gxx_impl_linux-64-10.4.0   |      h7ee1905_16        11.4 MB  conda-forge
    gxx_linux-64-10.4.0        |      h6e491c6_10          24 KB  conda-forge
    kernel-headers_linux-64-2.6.32|      he073ed8_15         707 KB  conda-forge
    ld_impl_linux-64-2.36.1    |       hea4e1c9_2         667 KB  conda-forge
    libgcc-devel_linux-64-10.4.0|      h74af60c_16         3.3 MB  conda-forge
    libllvm9-9.0.1             |default_hc23dcda_7        25.6 MB  conda-forge
    libsanitizer-10.4.0        |      hde28e3b_16         6.0 MB  conda-forge
    libstdcxx-devel_linux-64-10.4.0|      h74af60c_16         9.6 MB  conda-forge
    libzlib-1.2.11             |    h166bdaf_1014          60 KB  conda-forge
    openssl-1.1.1o             |       h166bdaf_0         2.1 MB  conda-forge
    python-3.9.7               |h49503c6_0_cpython        27.6 MB  conda-forge
    python_abi-3.9             |           2_cp39           4 KB  conda-forge
    sqlite-3.38.5              |       h4ff8645_0         1.5 MB  conda-forge
    sysroot_linux-64-2.12      |      he073ed8_15        31.4 MB  conda-forge
    tk-8.6.12                  |       h27826a3_0         3.3 MB  conda-forge
    zlib-1.2.11                |    h166bdaf_1014          88 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       229.9 MB

But I'm still getting the same error:

Python 3.9.7 | packaged by conda-forge | (default, Sep  2 2021, 17:58:34)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
>>> cppyy.include('third_party/argparse.hpp')
True
>>> cppyy.include('third_party/json.hpp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda/envs/dev/lib/python3.9/site-packages/cppyy/__init__.py", line 263, in include
    raise ImportError('Failed to load header file "%s"%s' % (header, err.err))
ImportError: Failed to load header file "third_party/json.hpp"
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1214:5: error:
      exception specification in declaration does not match previous declaration
    begin(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:107:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* begin(valarray<_Tp>&);
                              ^
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1224:5: error:
      exception specification in declaration does not match previous declaration
    begin(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:108:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
                                    ^
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1234:5: error:
      exception specification in declaration does not match previous declaration
    end(valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:109:31: note:
      previous declaration is here
  template<typename _Tp> _Tp* end(valarray<_Tp>&);
                              ^
In file included from input_line_19:1:
In file included from ./third_party/json.hpp:87:
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/valarray:1249:5: error:
      exception specification in declaration does not match previous declaration
    end(const valarray<_Tp>& __va) noexcept
    ^
/anaconda/envs/dev/bin/../lib/gcc/../../x86_64-conda-linux-gnu/include/c++/10.4.0/bits/range_access.h:110:37: note:
      previous declaration is here
  template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
                                    ^

>>>

If it is an issue of gcc mixup, Any ideas how to create a secluded environment @wlav?

Funnily enough, I'm able to successfully cppyy.include() the C++17-only Argparse library. So (naively) this has to be an issue with a specific C++(11) feature not implemented in cling/cppyy that the nlohmann::json library uses, while argparse doesn't. Any ideas?

Any thoughts on this @wlav ?

wlav commented 1 year ago

I've been out ... conference followed by its gift of C.

Looking in detail into the error ... clang isn't wrong. The forward declaration in bits/range_access.h does have a different exception specifier than the code in valarray. Furthermore, if I check gcc11's headers, then I find that bits/range_access.h has been fixed. Here is the commit in gcc (see the comment in particular): https://github.com/gcc-mirror/gcc/commit/2b2d97fc545635a0f6aa9c9ee3b017394bc494bf

So, looks like 10.4 carries a broken set of standard headers that gcc has no problem with, but clang won't accept. Not sure whether that can be helped (it being an error, not a warning, and the header clearly been broken). :( Other workarounds I can think of, all get very ugly very quickly ...

One of the less ugly ones I can think of, is this:

import cppyy

cppyy.cppdef("#if _GLIBCXX_RELEASE == 10\n#define noexcept\n#endif")
cppyy.include("valarray")
cppyy.cppdef("#if _GLIBCXX_RELEASE == 10\n#undef noexcept\n#endif")

cppyy.include('nlohmann/json.hpp')

but although that seems fine for json.hpp, it may have repercussions for other libraries.

qazi0 commented 1 year ago

My sincere apologies for disturbing you while you're busy with the conference :)

So, looks like 10.4 carries a broken set of standard headers that gcc has no problem with, but clang won't accept. Not sure whether that can be helped (it being an error, not a warning, and the header clearly been broken). :( Other workarounds I can think of, all get very ugly very quickly ...

One of the less ugly ones I can think of, is this:

import cppyy

cppyy.cppdef("#if _GLIBCXX_RELEASE == 10\n#define noexcept\n#endif")
cppyy.include("valarray")
cppyy.cppdef("#if _GLIBCXX_RELEASE == 10\n#undef noexcept\n#endif")

cppyy.include('nlohmann/json.hpp')

Yes, this seems to have fixed my error with nlohmann::json, thanks alot❤️ I haven't had any repurcussions with the other libraries after applying this fix [yet], so lets deal with that some other day...

I'm able to get it to work now with cppyy==2.3.1 and using these #defines before including nlohmann::json. However, you might wanna look at why the latest cppyy-2.4.0 package on conda-forge is straight-out broken - it segfaults instantly with import cppyy on linux-x86_64 (possibly after you're done with the conference). I shared the error message for that above, if you'd wanna look into that.

Once again, thank you so much! I had scoured the rest of the internet/SO and couldn't find a fix for why a C++11 library just couldn't be included into C++17-compliant cppyy, guess I didn't look at GCC commit history :~)

qazi0 commented 1 year ago

Okay, I found a fix for the cppyy-2.4.0 segfault on x86_64 too by looking into this ROOT forum post. The reason for the crash is - with a default conda install, even when we run conda install -c conda-forge cppyy on x86_64, conda picks cppyy from conda-forge but installs the gcc packages from pkgs/main, which are not the same as conda-forge's GCC and for some reason don't work with Clang, running into a segfault. This is verified by the package plan that conda outputs by running conda install -c conda-forge cppyy==2.4.0:

  environment location: /anaconda/envs/fast

  added / updated specs:
    - cppyy==2.4.0

The following NEW packages will be INSTALLED:

  binutils_impl_lin~ pkgs/main/linux-64::binutils_impl_linux-64-2.38-h2a08ee3_1        <--- from pkgs/main instead of conda-forge
  binutils_linux-64  pkgs/main/linux-64::binutils_linux-64-2.38.0-hc2dff05_0
  cppyy              conda-forge/linux-64::cppyy-2.4.0-py39hd14de60_0
  cppyy-backend      conda-forge/linux-64::cppyy-backend-1.14.9-py39hf939315_0
  cppyy-cling        conda-forge/linux-64::cppyy-cling-6.27.0-py39h3d66fe8_1
  cpycppyy           conda-forge/linux-64::cpycppyy-1.12.11-py39hf939315_0
  cxx-compiler       conda-forge/linux-64::cxx-compiler-1.0.0-hf484d3e_0
  gcc_impl_linux-64  pkgs/main/linux-64::gcc_impl_linux-64-11.2.0-h1234567_1          <--- from pkgs/main instead of conda-forge
  gcc_linux-64       pkgs/main/linux-64::gcc_linux-64-11.2.0-h5c386dc_0
  gxx_impl_linux-64  pkgs/main/linux-64::gxx_impl_linux-64-11.2.0-h1234567_1
  gxx_linux-64       pkgs/main/linux-64::gxx_linux-64-11.2.0-hc2dff05_0
  kernel-headers_li~ conda-forge/noarch::kernel-headers_linux-64-2.6.32-he073ed8_15
  libgcc-devel_linu~ pkgs/main/linux-64::libgcc-devel_linux-64-11.2.0-h1234567_1
  libllvm9           conda-forge/linux-64::libllvm9-9.0.1-default_hc23dcda_7
  libstdcxx-devel_l~ pkgs/main/linux-64::libstdcxx-devel_linux-64-11.2.0-h1234567_1  <--- from pkgs/main instead of conda-forge
  libzlib            conda-forge/linux-64::libzlib-1.2.12-h166bdaf_3
  python_abi         conda-forge/linux-64::python_abi-3.9-2_cp39
  sysroot_linux-64   conda-forge/noarch::sysroot_linux-64-2.12-he073ed8_15

As per the ROOT forum post, I fixed this by creating a ~/.condarc with

channels: [conda-forge]
pip_interop_enabled: true
channel_priority: strict

Then I ran conda install -c conda-forge cppyy==2.4.0, and it correctly installed all GCC packages from conda-forge:

The following NEW packages will be INSTALLED:

  binutils_impl_lin~ conda-forge/linux-64::binutils_impl_linux-64-2.36.1-h193b22a_2
  binutils_linux-64  conda-forge/linux-64::binutils_linux-64-2.36-hf3e587d_10
  cppyy              conda-forge/linux-64::cppyy-2.4.0-py310h8a6ca7b_0
  cppyy-backend      conda-forge/linux-64::cppyy-backend-1.14.9-py310hbf28c38_0
  cppyy-cling        conda-forge/linux-64::cppyy-cling-6.27.0-py310hd64a29c_0
  cpycppyy           conda-forge/linux-64::cpycppyy-1.12.11-py310hbf28c38_0
  gcc_impl_linux-64  conda-forge/linux-64::gcc_impl_linux-64-10.4.0-h7ee1905_16
  gcc_linux-64       conda-forge/linux-64::gcc_linux-64-10.4.0-h9215b83_10
  gxx_impl_linux-64  conda-forge/linux-64::gxx_impl_linux-64-10.4.0-h7ee1905_16
  gxx_linux-64       conda-forge/linux-64::gxx_linux-64-10.4.0-h6e491c6_10
  kernel-headers_li~ conda-forge/noarch::kernel-headers_linux-64-2.6.32-he073ed8_15
  libgcc-devel_linu~ conda-forge/linux-64::libgcc-devel_linux-64-10.4.0-h74af60c_16
  libllvm9           conda-forge/linux-64::libllvm9-9.0.1-default_hc23dcda_7
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
  libsanitizer       conda-forge/linux-64::libsanitizer-10.4.0-hde28e3b_16
  libsqlite          conda-forge/linux-64::libsqlite-3.39.3-h753d276_0
  libstdcxx-devel_l~ conda-forge/linux-64::libstdcxx-devel_linux-64-10.4.0-h74af60c_16

No more cppyy-2.4.0 crash.

qazi0 commented 1 year ago

@wlav I'm gonna close this issue now as it was related to nlohmann::json, would you recommend I open a separate issue for this cppyy-2.4.0 on conda x86_64 crash and post the above solution on that one (its not a cppyy issue per-se rather a conda issue, but just to help anyone in the future who might stumble upon it)?

wlav commented 1 year ago

Interesting find! Yes, that should probably be an issue here: https://github.com/conda-forge/cppyy-feedstock/issues

qazi0 commented 1 year ago

Interesting find! Yes, that should probably be an issue here: https://github.com/conda-forge/cppyy-feedstock/issues

Okay, will post this issue there:)

Once again, thanks alot!