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

Put engine/ before other paths when including #75

Open
wants to merge 2 commits into
base: service-7.0
Choose a base branch
from

Conversation

WPettersson
Copy link
Member

Fix the problem where we sometimes pull in external libnormaliz headers.

Hopefully this will fix the problem where we sometimes pull in external
libnormaliz headers.
@WPettersson
Copy link
Member Author

@baburton, this fix lies in the build process for Regina's Python module, but it'll also potentially arise for any build process where:

  • Regina headers are included,
  • libnormaliz headers are located in the same directory as headers for some other external package required by Regina (e.g., jansson or libtokyo), and
  • this directory is not a standard include directory (e.g., /usr/include or similar depending on system).

Under this scenario, the compiler needs to be told to check the Regina header location before the "external" locations. This might apply to e.g. the GUI (which Nathan isn't building) and possibly the iOS apps. I don't know whether we want to cover those scenarios. It seems the engine is not susceptible, though. I'm guess that this is because if "libnormaliz/general.h" can be found by searching a parent of the current directory, and this has precedent over "other location".

However, the root of the problem is slightly different. While digging, I noticed that enumerate/hilbertprimal-impl.h includes a libnormaliz header:

#include "libnormaliz/cone.h"

We don't ship any libnormaliz headers, which technically means I think the shipped headers have been unusable for a while (possibly 6 years?). If we remove that include from hilbertprimal-impl.h then that also fixes the Python issue (tested with a patch at https://gist.github.com/WPettersson/e1fb0efbc015155f1a5ddb28109804d5). However! I just chopped out part of the enumeration algorithm to make hilbertprimal-impl.h run - I think there needs to be a re-think of how the algorithm is implemented/deployed (i.e., -impl.h or .cpp file).

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