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 fail when cross compile to ARMV8 #870

Open
rachot opened this issue Sep 19, 2024 · 2 comments
Open

Build fail when cross compile to ARMV8 #870

rachot opened this issue Sep 19, 2024 · 2 comments
Labels
external bug porting issue, or problem with external library or system

Comments

@rachot
Copy link

rachot commented Sep 19, 2024

BLAS version : 0.3.28

Error result:

/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /home/chotros2/krs_ws/install-kr260-ubuntu/lib/liblapack64.so.3: undefined reference to `daxpy_64_'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /home/chotros2/krs_ws/install-kr260-ubuntu/lib/liblapack64.so.3: undefined reference to `dspr2_64_'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /home/chotros2/krs_ws/install-kr260-ubuntu/lib/liblapack64.so.3: undefined reference to `dsyr2_64_'
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /home/chotros2/krs_ws/install-kr260-ubuntu/lib/liblapack64.so.3: undefined reference to `zscal_64_'


image

I found daxpy_64_ but cannot build

this is myconfig

cmake ~/SuiteSparse-stable \
  -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
  -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
  -DCMAKE_TOOLCHAIN_FILE=~/SuiteSparse-stable/toolchain_aarch64.cmake \
  -DCMAKE_INSTALL_PREFIX=/home/chotros2/krs_ws/install-kr260-ubuntu \
  -DMPFR_LIBRARIES=/home/chotros2/krs_ws/install-kr260-ubuntu/lib/libmpfr.so \
  -DMPFR_INCLUDE_DIR=/home/chotros2/krs_ws/install-kr260-ubuntu/include \
  -DGMP_LIBRARY=/home/chotros2/krs_ws/install-kr260-ubuntu/lib/libgmp.so \
  -DGMP_INCLUDE_DIR=/home/chotros2/krs_ws/install-kr260-ubuntu/include \
  -DBLAS_LIBRARIES=/home/chotros2/krs_ws/install-kr260-ubuntu/lib/libopenblas.so \
  -DLAPACK_LIBRARIES=/home/chotros2/krs_ws/install-kr260-ubuntu/lib/liblapack64.so \
  -DGRAPHBLAS_USE_JIT=OFF \
  -DGRAPHBLAS_USE_CUDA=OFF \
  -DGMP_STATIC=OFF \
  -DMPFR_STATIC=OFF \
  -DCMAKE_C_FLAGS="-DBLAS_UNDERSCORE" \
  -DSUITESPARSE_USE_64BIT_BLAS=ON \
  -DCMAKE_CXX_FLAGS="-DBLAS_UNDERSCORE"
@mmuetzel
Copy link
Contributor

The U in the output of nm means that the symbol is undefined in that library.
Maybe, you'll need to additionally link to another library that defines that symbol?

Which LAPACK vendor is that?

@DrTimothyAldenDavis
Copy link
Owner

Those missing symbols are all from the BLAS, but with added suffixes (64). The suffix indicates that the LAPACK library you're using (lapack64) is looking for a specific 64-bit BLAS library.

You're using libopenblas.so, and I'm guessing that it's a 32-bit library. You probably need to use a different BLAS library, with 64-bit integers as their parameters.

By "64-bit" and "32-bit", I mean the expected integer sizes for the input/output parameters of the BLAS and LAPACK routines.

@DrTimothyAldenDavis DrTimothyAldenDavis added the external bug porting issue, or problem with external library or system label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external bug porting issue, or problem with external library or system
Projects
None yet
Development

No branches or pull requests

3 participants