Skip to content
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

Open
paulkerry1 opened this issue Jul 26, 2023 · 5 comments
Open
Labels

Comments

@paulkerry1
Copy link

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):

  • OS and version: Debian 12 amd64
  • Compiler: /bin/mpicxx --version
    g++ (Debian 12.2.0-14) 12.2.0
  • this is using standalone Python 3.11.4 (not in a venv or anaconda environment) rather than the o/s standard Python 3.11.2

Additional context
Add any other context about the problem here.
build.log

Best regards
Paul.

@paulkerry1 paulkerry1 added the bug label Jul 26, 2023
@LourensVeen
Copy link
Collaborator

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 😃

@LourensVeen
Copy link
Collaborator

LourensVeen commented Sep 4, 2023

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.

@LourensVeen
Copy link
Collaborator

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.

@rieder
Copy link
Member

rieder commented Sep 4, 2023

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.

@rieder
Copy link
Member

rieder commented Oct 6, 2023

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)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants