-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amuse-simplex-2023.5.0 build fails on Debian 12 amd64/Python 3.11.4 #974
Comments
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 😃 |
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. |
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):
g++ (Debian 12.2.0-14) 12.2.0
Additional context
Add any other context about the problem here.
build.log
Best regards
Paul.
The text was updated successfully, but these errors were encountered: