leobago/fti

Build failure while using GCC and OpenMPI

Closed this issue · 1 comments

We encountered the issue while attempting to install FTI on our local cluster. Here are the loaded software modules used to install FTI:

  1) slurm/19-05-0-1   2) openmpi/3.1.4   3) cmake/3.14.4

Compiler version used:

gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

Issuing the cmake command as:

$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/xxxxx/PACKAGES/fti ..

Output:

-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found MPI: /shared/apps/auto/openmpi/3.1.4-gcc-7.3.0-rczp/bin/mpicc  
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_SSL_LIBRARY OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
-- Cannot find OPENSSL library. Using slower build in MD5 algorithm.
-- Installing: /home/xxxxx/fti/build/test/local/recoverVar/configH0.fti
-- Installing: /home/xxxxx/fti/build/test/local/recoverVar/configH1.fti
-- Installing: /home/xxxxx/fti/build/test/local/diffckpt/run.sh
-- Installing: /home/xxxxx/fti/build/test/local/run-checks.sh
-- Installing: /home/xxxxx/fti/build/test/local/run-checks-f90.sh
-- Installing: /home/xxxxx/fti/build/test/local/run-travis-locally.sh
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxxxx/fti/build

Issuing make command:

$make

Outputs:

Scanning dependencies of target md5
[  1%] Building C object deps/md5/CMakeFiles/md5.dir/md5.c.o
[  1%] Built target md5
Scanning dependencies of target iniparser
[  2%] Building C object deps/iniparser/CMakeFiles/iniparser.dir/dictionary.c.o
[  3%] Building C object deps/iniparser/CMakeFiles/iniparser.dir/iniparser.c.o
[  3%] Built target iniparser
Scanning dependencies of target jerasure
[  4%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/galois.c.o
[  5%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf.c.o
[  6%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_cpu.c.o
[  7%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_w128.c.o
[  8%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_w16.c.o
[  9%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_w32.c.o
[ 10%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_w4.c.o
[ 11%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_w64.c.o
[ 13%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_w8.c.o
[ 14%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/gf_wgen.c.o
[ 15%] Building C object deps/jerasure/CMakeFiles/jerasure.dir/src/jerasure.c.o
[ 15%] Built target jerasure
Scanning dependencies of target fti.shared
[ 16%] Building C object CMakeFiles/fti.shared.dir/src/postckpt.c.o
cc: fatal error: no input files
compilation terminated.
/bin/sh: 1: -Wall: not found
CMakeFiles/fti.shared.dir/build.make:62: recipe for target 'CMakeFiles/fti.shared.dir/src/postckpt.c.o' failed
make[2]: *** [CMakeFiles/fti.shared.dir/src/postckpt.c.o] Error 127
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/fti.shared.dir/all' failed
make[1]: *** [CMakeFiles/fti.shared.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Verbose helps shed light to the problem:

$make VERBOSE=1

Outputs:

...
[ 16%] Building C object CMakeFiles/fti.shared.dir/src/postckpt.c.o
/usr/bin/cc -Dfti_shared_EXPORTS -I/home/xxxxx/fti/build -I/home/xxxxx/fti/src -I/home/xxxxx/fti/include  -fPIC    -fexceptions; -Wall -Wno-format-truncation -D_FILE_OFFSET_BITS=64 -o CMakeFiles/fti.shared.dir/src/postckpt.c.o   -c /home/xxxxx/fti/src/postckpt.c
cc: fatal error: no input files
compilation terminated.
/bin/sh: 1: -Wall: not found
CMakeFiles/fti.shared.dir/build.make:62: recipe for target 'CMakeFiles/fti.shared.dir/src/postckpt.c.o' failed
make[2]: *** [CMakeFiles/fti.shared.dir/src/postckpt.c.o] Error 127
make[2]: Leaving directory '/home/xxxxx/fti/build'
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/fti.shared.dir/all' failed
make[1]: *** [CMakeFiles/fti.shared.dir/all] Error 2
make[1]: Leaving directory '/home/xxxxx/fti/build'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

The error comes from a semicolon after -fexceptions flag in:

/usr/bin/cc -Dfti_shared_EXPORTS -I/home/xxxxx/fti/build -I/home/xxxxx/fti/src -I/home/xxxxx/fti/include  -fPIC    -fexceptions; -Wall -Wno-format-truncation -D_FILE_OFFSET_BITS=64 -o CMakeFiles/fti.shared.dir/src/postckpt.c.o   -c /home/xxxxx/fti/src/postckpt.c

A quick fix at the moment is to edit CMakeLists.txt on line 229 from:

PROPERTY COMPILE_FLAGS "${MPI_C_COMPILE_FLAGS}" "${SIONLIB_CFLAGS}" "${ADD_CFLAGS}")

to:

PROPERTY COMPILE_FLAGS "${MPI_C_COMPILE_FLAGS} ${SIONLIB_CFLAGS} ${ADD_CFLAGS}")

Hi,

thanks for letting us know about this issue. We will implement your suggested modification as fix.

Cheers!