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

Static build of FlexiBLAS #18

Closed
Flamefire opened this issue Jul 21, 2021 · 5 comments
Closed

Static build of FlexiBLAS #18

Flamefire opened this issue Jul 21, 2021 · 5 comments
Milestone

Comments

@Flamefire
Copy link

Is it possible (technically) to have a static FlexiBLAS lib?
I tried configuring with BUILD_SHARED_LIBS=OFF but that errored out in the examples due to multiple symbols in libflexiblas and libflexiblas_api

@grisuthedragon
Copy link
Member

FlexiBLAS was never developed to be statically linked, because some of the design features, especially with the API rely on dynamic linkage. For example the backend must be shared libraries as well. One could try to create a version without the reference to the flexiblas_api library. This should fix the issue. I will take a look on it.

@Flamefire
Copy link
Author

For example the backend must be shared libraries as well

That would be fine. But there may be software which requires BLAS to be statically linked or only search for static libs (for some reason) and as FlexiBLAS is meant(?) as a drop-in replacement it would be great if FlexiBLAS itself can be statically build (and use shared libs as backends)

If that is not possible, I'd heavily suggest to use add_library(flexiblas SHARED ...) to explicitely request a shared lib. The current usage says: "Do what the user requests" and as one of those doesn't work I'd say this is a bug or at least a possibility for improvement.

@grisuthedragon
Copy link
Member

I added the SHARED argument to all related add_library in my internal development version. This will be in 3.1, which will be released within the next days.

@grisuthedragon grisuthedragon added this to the flexiblas-3.1 milestone Jan 14, 2022
@grisuthedragon
Copy link
Member

The SHARED argument is added to all add_library commands in the build system. In this way it is clear that FlexiBLAS is shared library only.

@grisuthedragon
Copy link
Member

Closed with 3.1.0

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