Open ryanmrichard opened 2 years ago
@wadejong do you have any suggestions? I'm out of ideas and this is holding me back. I tried setting the environment variables CC
and CXX
respectively to the C and C++ compiler I want Cppyy to use before pip install -no-cache-dir cppyy
, but that didn't fix it.
@ryanmrichard sounds like a bug in the standard library implementation ... mismatch between function declaration and definition, perhaps it's been fixed since 9 (I mean gcc 12 is out now)... though valarray
is not the most popular part of C++
@evaleev trying a new version is a good idea. That said, I don't think this is C++ problem since the C++ side of things compiles just fine.
@evaleev I also think the error is weird because those aren't the same declarations (one's the begin
method of the valarray
class and the other is the begin
free function overloaded for valarray
).
@ryanmrichard the C++ code compiles because its compiler is lax (gcc 9? I'd imagine cppyy uses libclang, diff and probably better frontend overall) ... this is an error. P.S. since /usr/include/c++/9/valarray
's begin
takes an argument it's not a member function of valarray
... please show what the code around /usr/include/c++/9/valarray:1214
looks like.
:facepalm: @evaleev you're right (that's a free function in the valarray file too). You also called it on the version problem. Switching the version to GCC11 seems to have worked.
Sigh, I swear we established that GCC 9 and 11 worked for NWX and it was 10 that didn't...
I'm going to leave this issue open because if GCC 9 doesn't work then the configuration should crash.
I run gcc 9.4, no issues. Let me see what is going on. Also, I will tests cppyy 2.4.0, this one should have some cleanups that would help.
My newest problem when trying to run the
test_python
executable in the NWChemEx repo:The
test_nwchemex
executable builds fine and runs correctly. I'm not 100% sure what the problem is here, but I'm guess it has something to do with the build settings of the C++-compiler used to build Cppyy being incompatible with those used to build NWChemEx. I will update as I figure out more.So why is this issue in this repo? Assuming this is somehow a compiler compatibility issue the
FindCppyy.cmake
script should be testing for compatibility. Alternatively, if Cppyy is going to be this tightly coupled to the compiler used to build NWChemEx, Cppyy should be built by NWChemEx as