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

Turning off dynamic (or static) library target #161

Open
jamesETsmith opened this issue Feb 28, 2023 · 2 comments
Open

Turning off dynamic (or static) library target #161

jamesETsmith opened this issue Feb 28, 2023 · 2 comments

Comments

@jamesETsmith
Copy link

General

I'm working on a team implementing the GraphBLAS standard for some custom hardware. Our build system is only ideal for statically linked libraries right now and LAGraph currently supports dynamic and static linking. By default, LAGraph links the benchmarks and tests to the dynamically linked LAGraph library which causes some problems for us. We can work around them by modifying the cmake files to link all executables to the static library instead, but that's a pretty hacky solution. I understand this is a unique situation, but it would be a handy feature if we could choose a single type of LAGraph library to compile, e.g. dynamic or static, and have all executables link to that library.

Proposal

I have two options in mind, but I'm open to other suggestions.

  1. Allow users to choose either static or dynamic linking. This approach will be fairly simple and shouldn't add too much complexity to the build system, but it will make the build system a little less flexible. Users must build the static and dynamic libraries separately if they want/need both.
  2. Allow users to choose a combination of static and dynamic linking. This approach will require more cmake code to handle the variety of options for users but will give them greater flexibility to configure their builds.

Next Steps

If people think this would be helpful, I'd be glad to open a PR. Just let me know!

@DrTimothyAldenDavis
Copy link
Member

Thanks for the note. This is in progress in GraphBLAS (in the main SuiteSparse version, dev2 branch, https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev2 . Once it's settled there, I'll likely revise LAGraph accordingly. LAGraph will eventually be copied into SuiteSparse and the other packages follow the strategy of either static or dynamic linking.

@jamesETsmith
Copy link
Author

Sounds good, thanks for the heads up. If you want any help as you switch things over, just let me know, I'd be happy to help. I'll leave this open until things on SuiteSparse/dev2 wrap up.

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

No branches or pull requests

2 participants