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

respect OPENBLAS_{{CC, FC, HOSTCC}} env vars on linux #102

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

mike-kfed
Copy link
Contributor

this should fix issue #101

together with PR rust-ndarray/ndarray-linalg#354
I can run this successfully on a x86_64 machine to cross compile for a Raspi 4

export OPENBLAS_CC=aarch64-linux-gnu-gcc
export OPENBLAS_FC=aarch64-linux-gnu-gfortran
export OPENBLAS_HOSTCC=gcc
export OPENBLAS_TARGET=ARMV8 # CORTEXA72
cargo build --release --target=aarch64-unknown-linux-gnu

@Dirreke
Copy link
Contributor

Dirreke commented May 21, 2023

As OpenMathLib/OpenBLAS#4011, sometimes, we also need to add RANLIB=ranlib to cross compile on some systems.

Could you help add OPENBLAS_RANLIB to the list?

@mike-kfed
Copy link
Contributor Author

I added OPENBLAS_RANLIB now, but you @Dirreke will have to test it, as ranlib is not my usecase. please let me know if that works for you ^^

@Dirreke
Copy link
Contributor

Dirreke commented May 21, 2023

It works! Thanks!

@Dirreke
Copy link
Contributor

Dirreke commented Jun 18, 2023

I think it will be great if we add some default parameter to this. Would you like to do this? Or would you like to give me auth to edit this PR?

@mike-kfed
Copy link
Contributor Author

I don't think that there is a meaningful default for cross compiling, the build script cannot read the devs mind which target to pick. And for compiling onto the host platform this crate works fine.

@Dirreke
Copy link
Contributor

Dirreke commented Jun 21, 2023

Maybe we can get the parameters by cc.
On the other hand, you are right. It's enough for crossing compile

@Dirreke
Copy link
Contributor

Dirreke commented Jan 20, 2024

@mike-kfed Do you have time to rebase this PR?
@termoshtt Would you like to mearge this PR? It can really solve the cross-compile issue on many platforms. Thanks

@termoshtt termoshtt merged commit 262842c into blas-lapack-rs:master Feb 3, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants