microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.13k stars 6.38k forks source link

[blas] `blas` incorrectly thinks `openblas` doesn't support static compilation #40300

Closed rjzak closed 1 month ago

rjzak commented 2 months ago

Is your feature request related to a problem? Please describe.

I'd like to use Armadillo with a fully static build. Armadillo uses blas which imports openblas.

The blas vcpkg.json seems to think openblas doesn't support static builds, but the vcpkg.json for it doesn't have !static.

Proposed solution

Remove !static for openblas dependency in https://github.com/microsoft/vcpkg/blob/master/ports/blas/vcpkg.json.

Describe alternatives you've considered

No response

Additional context

No response

Neumann-A commented 2 months ago

blas is a metaport. It will use the blas vendored in lapack for static builds.

rjzak commented 2 months ago

But it seems to disable static compilation, which should work.

Neumann-A commented 2 months ago

But it seems to disable static compilation, which should work.

You can compile openblas staticly. It will just not be used to fullfill the blas dependency in dependent ports. Alternative, use an overlay and deactivate lapack. You don't want to have two competing blas implementations.

Neumann-A commented 2 months ago

To be clear here: You cannot build static openblas and have lapack use openblas at the same time. This is why the deps are this way.

rjzak commented 2 months ago

Is there a way to compile a project with Armadillo and have it all statically compiled, without needing a libblas.dll, libgfortran.dll, libquadmath.dll, openblas.dll, etc?

github-actions[bot] commented 1 month ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.