Open paulkerry1 opened 1 year ago
I can confirm this one on Kubuntu 22.04 with g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 and Python 3.10.12.
I think the problem may be with the C++ version this is being compiled as. As of C++11, converting an fstream to a bool needs to be done explicitly, where in C++98 that wasn't the case. So possibly the compiler flags were changed to specify C++11, but this wasn't updated.
Let's see if I can make fixing this my first contribution to Amuse :smiley:
It seems like simplex embeds an ancient version of HEALPix, which doesn't work with C++11 because it was written in C++98 and never updated.
HEALPix is still maintained, and just had a new release a month ago. What's the policy in this case? Do we try to upgrade to a newer version of the library, or do we fork it and apply local fixes? It may be a bit of work to port simplex to a version of HEALPix that's 12 years into the future, but on the other hand, maintaining a fork isn't free either.
I've pushed a branch with quick fixes to https://github.com/LourensVeen/amuse/tree/issue_974_simplex_c++11_fixes
I'll wait with making a PR until I know whether this is the preferred approach.
Would it not be possible to still compile Simplex as C++98 code?
Generally, the fewer changes we have to do, the better - but if we have to do more, I would prefer updating Simplex to use a standard, modern version of Healpix to forking the old library and applying fixes to it.
Would it not be possible to still compile Simplex as C++98 code?
no, it's not (says me from 6 months ago pushing the update to C++11, due to hdf5 requirements)...
Describe the bug The amuse-simplex-2023.5.0 build fails on Debian 12 amd64 at this point...
mpicxx -g -O2 -fPIC -ansi -std=c++11 -ffast-math -fomit-frame-pointer -c -o cxxutils.o -c cxxutils.cc -I../../include cxxutils.cc: In function ‘bool file_present(const std::string&)’: cxxutils.cc:58:10: error: cannot convert ‘std::ifstream’ {aka ‘std::basic_ifstream’} to ‘bool’ in return
58 | return dummy;
all other amuse packages successfully build and install correctly using pip. I have also downloaded the amuse-simplex-2023.5.0 source and have tried to build it separately.
Logs I am attaching the build.log
Environment (please complete the following information):
Additional context Add any other context about the problem here. build.log
Best regards Paul.