mpimd-csc/flexiblas

Static build of FlexiBLAS

Flamefire opened this issue · 5 comments

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

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.

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.

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.

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.

Closed with 3.1.0