DrTimothyAldenDavis / GraphBLAS

SuiteSparse:GraphBLAS: graph algorithms in the language of linear algebra. For production: (default) STABLE branch. Code development: ask me for the right branch before submitting a PR. video intro: https://youtu.be/Tj5y6d7FegI .
http://faculty.cse.tamu.edu/davis/GraphBLAS.html
Other
345 stars 61 forks source link

Build Error when using CMake in a cross-compilation environment #291

Closed rayegun closed 1 month ago

rayegun commented 1 month ago
[23:43:51] CMake Error at GraphBLAS/cmake_modules/GraphBLAS_JIT_configure.cmake:130 (file):
[23:43:51]   file must be called with at least two arguments.
[23:43:51] Call Stack (most recent call first):
[23:43:51]   GraphBLAS/CMakeLists.txt:703 (include)

I suspect this is due to the unguarded use of ${GRAPHBLAS_CACHE_PATH} in GraphBLAS_JIT_configure.cmake line 130 to create directories. Without too much inspection the CMakeLists looks quite dangerous for cross-compilation environments. The builder seems to assume that the build environment is the execution environment. We need a way to specify that a build wants the JIT but does not have the defaults available. Otherwise cross-compilation will be difficult.

rayegun commented 1 month ago
export GRAPHBLAS_CACHE_PATH="${WORKSPACE}/srcdir"

Setting this seems to make CMake freak out. Interestingly it works just fine on x86_64 and i686 Linuxes

rayegun commented 1 month ago
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 12: can't open �/��/@�!��!: no such file
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 12: can't open @��@��: no such file
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 12: S����_������������@����@��}��@�: not found
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 12: can't open S�3��@�!�R: no such file
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 1: 
                                                                                                   @@��@8: not found
[15:30:22] ��orkspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 2: 
             : not found
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 1: T: not found
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 2: ELF���: not found
[15:30:22] /workspace/srcdir/SuiteSparse/build/GraphBLAS/JITpackage/native/grb_jitpackage: line 1: syntax error: unterminated quoted string
[15:30:22] make[2]: *** [GraphBLAS/JITpackage/CMakeFiles/GB_JITpackage.dir/build.make:308: /workspace/srcdir/SuiteSparse/GraphBLAS/JITpackage/GB_JITpackage.c] Error 2
[15:30:22] make[2]: Leaving directory '/workspace/srcdir/SuiteSparse/build'
[15:30:22] make[1]: *** [CMakeFiles/Makefile2:222: GraphBLAS/JITpackage/CMakeFiles/GB_JITpackage.dir/all] Error 2
rayegun commented 1 month ago

Ah this is just me not following the cross-compilation instructions properly.