-
Notifications
You must be signed in to change notification settings - Fork 275
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
Install headers in a suitesparse
subdirectory?
#558
Comments
That would just delay the problem. The cmake build system knows where all the latest files are; if it's building AMD, let's say, then it knows that the correct SuiteSparse_config.h is in ../SuiteSparse_config/SuiteSparse_config.h. Directories scanned with -I take precedence over system directories, right? So we just need to make sure -ISuiteSparse_config/Include (for example) appears in all packages that use SuiteSparse_config. Doesn't that always happen? |
Those flags should be added for all libraries that use SuiteSparse_config currently. But they might be appearing after the -I flag for the other folder if the dependency for OpenMP is added earlier... If the SuiteSparse headers hadn't been present in a folder that is shared with other (system) libraries, the order of the -I flags wouldn't matter. We can try and control the order of the -I flags when building SuiteSparse. But if multiple versions of the headers are installed in different directories (like for @Fabian188) other projects that depend on SuiteSparse libraries could still get the wrong order of -I flags. |
See #568 for a potential change that would move the headers of (most of) the SuiteSparse headers to their dedicated directory where they can't be confused when headers from other libraries need that a common directory is added to the preprocessor search path. |
This is working well so I'll stick with this: all the headers get installed by default into /usr/local/include/suitesparse. |
To clarify: Only the headers of projects that use Please, let me know if they should also use the |
Oops. They do... I wonder why they don't install in the correct location then. Maybe, the SuiteSparsePolicy files got out of sync? Edit: They install in |
I just saw that a few hours ago that and updated them so each of the 3 Policy .cmake files are now the same. Just now I saw your note about that so we might have both seen it and crossed in the ether. I think it should be fixed now. |
I know it's a bit odd to have LAGraph depend on SuitesparsePolicy.cmake, since LAGraph is meant to be a stand alone library that can use other GraphBLAS library implementations. But if it's integrated into SuiteSparse then I think that's ok. |
How is this controlled? CMAKE_INSTALL_PREFIX/include/suitesparse ? |
That's the default if you do nothing. But you can also set
The folder is so if you want to install directly into /usr/local/include, just set the |
This is now fixed in SuiteSparse 7.4.0.beta1. |
Motivated by build failures on macOS if old versions of SuiteSparse from Homebrew are installed when building SuiteSparse.
Copying a comment from another thread to avoid loosing this:
@DrTimothyAldenDavis: We can't do anything about older versions. But could the headers of the SuiteSparse libraries be installed in a sub-directory (e.g., /usr/local/include/suitesparse)?
Currently, there is the risk of headers from older libraries being picked up when the include path (e.g., /usr/local/include) gets added for other dependencies installed on the build system (e.g., OpenMP). That risk would be lower if the headers were installed in their own directory. CMake targets and pkg-config files would help dependent projects to find the correct folder with the headers.
Probably not something that should be changed for the current beta (or ever). But maybe for a later release?
The text was updated successfully, but these errors were encountered: