ncbi-vdb icon indicating copy to clipboard operation
ncbi-vdb copied to clipboard

Error encountered while compiling for Arm platform

Open hyacz opened this issue 2 years ago • 2 comments

I got an error when compiling on arm platform

Consolidate compiler generated dependencies of target ncbi-bam
[  0%] Building C object libs/align/CMakeFiles/ncbi-bam.dir/bam.c.o
In file included from /opt/installer/ncbi-vdb-3.0.0/interfaces/kfs/file-v2.h:35:0,
                 from /opt/installer/ncbi-vdb-3.0.0/interfaces/kfs/file.h:39,
                 from /opt/installer/ncbi-vdb-3.0.0/libs/align/bam.c:32:
/opt/installer/ncbi-vdb-3.0.0/interfaces/kfc/refcount.h:39:10: fatal error: atomic32.h: No such file or directory
 #include <atomic32.h>
          ^~~~~~~~~~~~
compilation terminated.

I guess it should be due to the wrong directory name. On arm, env.cmake includes interfaces/cc/gcc/aarch64 but what actually exists is interfaces/cc/gcc/arm64.

https://github.com/ncbi/ncbi-vdb/blob/34c611317dbe2832cf24ec543a95e9ca7b9eb2e6/build/env.cmake#L68-L71 https://github.com/ncbi/ncbi-vdb/blob/34c611317dbe2832cf24ec543a95e9ca7b9eb2e6/build/env.cmake#L158-L160

I renamed interfaces/cc/gcc/arm64 to interfaces/cc/gcc/aarch64 and everything looks fine.

hyacz avatar Jul 01 '22 03:07 hyacz

Trivial solution would be to symlink cc/gcc/aarch64 to cc/gcc/arm64.

Note, gbench expects the directory to be called arm64 (gbench:build-system/configure.ac): aarch64:* ) vdb_inc_subdirs="cc/gcc/arm64 $vdb_inc_subdirs" ;;

-> Renaming breaks gbench.

StefanBruens avatar Sep 12 '22 23:09 StefanBruens

Could you try it again with our last code?

klymenko avatar Feb 21 '24 16:02 klymenko