Skip to content

Conversation

@LourensVeen
Copy link
Member

The main SeBa Makefile as well as several other Makefiles add -DTOOLBOX to CXXFLAGS. This flag seems to enable some extra code when applied.

Unfortunately that code is broken in various ways, causing compile errors. When compiling SeBa, this is hidden because the recursion in the Makefiles isn't implemented in the usual way, so that CXXFLAGS isn't passed on recursive calls, so that the flag gets dropped again on the way down, and is never actually applied.

If CXXFLAGS is set by the user, perhaps because they want to specify some more optimisation flags or because they're trying to make a package, the behaviour of make changes, and CXXFLAGS is passed down the line. As a result, the code is compiled with -DTOOLBOX in that case, and compilation fails.

make clean
# this works
make
make clean
# this breaks
CXXFLAGS="" make

It seems that this issue has been around for a long time, and that probably the code enabled by -DTOOLBOX isn't really used by anyone. I don't have time to fix it, but I would like to get rid of the weird work-around that AMUSE currently has to do to get SeBa to compile. So I'm submitting this PR that removes -DTOOLBOX from the Makefiles, so that I can compile normally and also pass the extra CXXFLAGS that I need when packaging.

@LourensVeen
Copy link
Member Author

Closed in favour of #33

@LourensVeen LourensVeen closed this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant