CMake build fails if Fortran is enabled but ScaLAPACK is not found
Closed this issue · 1 comments
e-kwsm commented
GA: 2585469
I try adding -DENABLE_FORTRAN=YES
flag during CMake configuration to avoid #158, but build fails:
$ mkdir build
$ cd build
$ cmake -DENABLE_FORTRAN=YES ..
$ make
[ 0%] Built target GenerateConfigFH
[ 21%] Built target linalg
[ 31%] Built target ga_src
[ 33%] Built target armci_comex
[ 35%] Built target ma
[ 35%] Built target eaf
[ 36%] Built target sf
[ 39%] Built target dra
[ 40%] Built target elio
[ 41%] Built target gaf2c
[ 42%] Built target ga
[ 44%] Built target armci
[ 45%] Built target comex
[ 45%] Built target testf.x
[ 45%] Built target test-coalesce.x
[ 46%] Built target test-inquire.x
[ 47%] Linking Fortran executable types-test.x
/usr/bin/ld: ../../libga.a(ga_diag_seqc.c.o): in function `pnga_diag_seq':
ga_diag_seqc.c:(.text+0x2c): undefined reference to `gai_diag_seq_'
/usr/bin/ld: ../../libga.a(ga_diag_seqc.c.o): in function `pnga_diag_std_seq':
ga_diag_seqc.c:(.text+0x5a): undefined reference to `gai_diag_std_seq_'
collect2: error: ld returned 1 exit status
make[2]: *** [global/testing/CMakeFiles/types-test.x.dir/build.make:112: global/testing/types-test.x] Error 1
make[1]: *** [CMakeFiles/Makefile2:923: global/testing/CMakeFiles/types-test.x.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Definitions of gai_diag_seq
and gai_diag_std_seq
are
which is called by
respectively.
This issue is because the fortran file is compiled only when ScaLAPACK (and LAPACK) is available but ENABLE_F77
macro is defined independently.
Lines 48 to 57 in 2585469
e-kwsm commented
Fixed in the develop branch.