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

Build native fix, line 87 on CMakeList.txt #469

Open
CristobalRR opened this issue Mar 6, 2024 · 1 comment
Open

Build native fix, line 87 on CMakeList.txt #469

CristobalRR opened this issue Mar 6, 2024 · 1 comment

Comments

@CristobalRR
Copy link

For the native build, Marian demand to be compiled with BLAS and CBLAS on the system, other wise it always will dump this error during run time:
...
Error: Marian must be compiled with a BLAS library
Error: Aborted from void sgemm(bool, b....
...
Aborted (core dumped) build-native/app/bergamot --log-level debug ...

so to make marian locate BLAS and CBLAS succesfuly, i had to check the CMakeList.txt, it took me a while to realize that
SET(USE_STATIC_LIBS ON CACHE BOOL "Link statically against non-system libs") was blocking marian but after commenting the line it run nice.

this test was done under debian and arch on wsl, i doubt it was a wsl only error. if im not the only one suffering from this bug i propose to move this line to the:
if (USE_WASM_COMPATIBLE_SOURCE)
on line 89 if it is needed for the wasm build.

@XapaJIaMnu
Copy link
Collaborator

So, historically we ship static builds because it makes it easier to distribute among machines when working on clusters, and when compiling and shipping as a binary to an end user. Obviously it's not necessary when running on one's own machine but nevertheless here we are.

Your problem is that the distros you mention did not ship static version of the cblas (I'm pretty sure for arch I got it to work using openblas).

I don't think I want to change the default behaviour because someone may rely on it but you don't need to change any code, just when configuring do:

cmake .. -DUSE_STATIC_LIBS=OFF

Hope that helps. Perhaps adding this in the readme is a good idea.

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