libtool & link problem


Clicked A Few Times
Hello, any help please ?

 export NWCHEM_TOP=/home/milias/Work/qch/software/nwchem_suite/nwchem_release
export NWCHEM_TARGET=LINUX64
export FC=ifort
export CC=icc
export MPI_F90=mpif90
export MPI_CC=mpicc
export MPI_CXX=mpicxx
export LIBMPI="-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi"
export MPI_LIB="/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,-rpath /home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,--enable-new-dtags -L/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib"
export MPI_INCLUDE="/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/include /home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,-rpath -Wl"
export MPI_INCLUDE="/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/include /home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,-rpath -Wl"

 export BLASOPT="-Wl,--start-group;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_ilp64.so;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.so;/usr/lib64/libpthread.so;/usr/lib64/libm.so;-openmp;-Wl,--end-group"
export LAPACK_LIB="-Wl,--start-group;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_lapack95_ilp64.a;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_ilp64.so;-openmp;-Wl,--end-group"
# export LAPACK_LIB=" ${MKLROOT}/lib/intel64/libmkl_blas95_ilp64.a ${MKLROOT}/lib/intel64/libmkl_lapack95_ilp64.a -L${MKLROOT}/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -liomp5 -lpthread -lm -ldl"

 export BLAS_SIZE=8
export LAPACK_SIZE=8
export USE_MPI=y
export LARGE_FILES=y
export NWCHEM_MODULES="all"
Miro ilias
milias@login.grid.umb.sk:~/Work/qch/software/nwchem_suite/nwchem_release/src/.make
test \! -f 64_to_32 -o \! -f 32_to_64 || rm -f 64_to_32 32_to_64
test -d /home/milias/Work/qch/software/nwchem_suite/nwchem_release/lib/LINUX64 || mkdir -p /home/milias/Work/qch/software/nwchem_suite/nwchem_release/lib/LINUX64
test -d /home/milias/Work/qch/software/nwchem_suite/nwchem_release/bin/LINUX64 || mkdir -p /home/milias/Work/qch/software/nwchem_suite/nwchem_release/bin/LINUX64
./util/util_nwchem_version.bash
Making libraries in tools
make[1]: Entering directory '/home/milias/Work/qch/software/nwchem_suite/nwchem_release/src/tools'

      • Building Parallel Tools ****

make all-recursive
Making all in comex
make all-am
/bin/sh ./libtool --tag=CC --mode=link icc -g -O2 -L/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,-rpath -Wl -L/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,-rpath -L/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,--enable-new-dtags -L/home/milias/bin/openmpi-4.0.1_suites/openmpi-4.0.1_Intel14_GNU6.3g++/lib -Wl,--start-group;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_ilp64.so;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so;/mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.so;/usr/lib64/libpthread.so;/usr/lib64/libm.so;-openmp;-Wl,--end-group -o libcomex.la -rpath /home/milias/Work/qch/software/nwchem_suite/nwchem_release/src/tools/install/lib src-mpi/comex.lo src-mpi/groups.lo -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lrt -lpthread -lrt -lpthread
Usage: /home/milias/Work/qch/software/nwchem_suite/nwchem_release/src/tools/build/comex/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
libtool: error: you must specify an output file
/bin/sh: line 1: 23346 Segmentation fault /mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_ilp64.so
/bin/sh: line 1: 23347 Segmentation fault /mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so
/bin/sh: line 1: 23348 Segmentation fault /mnt/apps/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.so
/bin/sh: /usr/lib64/libpthread.so: Permission denied
/bin/sh: line 1: 23350 Segmentation fault /usr/lib64/libm.so
/bin/sh: -openmp: command not found
/bin/sh: -Wl,--end-group: command not found
Makefile:1070: recipe for target 'libcomex.la' failed
make[5]: *** [libcomex.la] Error 127
Makefile:813: recipe for target 'all' failed
make[4]: *** [all] Error 2
Makefile:7237: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
Makefile:4001: recipe for target 'all' failed
make[2]: *** [all] Error 2
GNUmakefile:671: recipe for target 'build/.libs/libga.a' failed
make[1]: *** [build/.libs/libga.a] Error 1
make[1]: Leaving directory '/home/milias/Work/qch/software/nwchem_suite/nwchem_release/src/tools'
GNUmakefile:105: recipe for target 'libraries' failed
make: *** [libraries] Error 1
milias@login.grid.umb.sk:~/Work/qch/software/nwchem_suite/nwchem_release/src/.


milias@login.grid.umb.sk:~/Work/qch/software/nwchem_suite/nwchem_release/src/.make link
make nwchem.o stubs.o
make[1]: Entering directory '/home/milias/Work/qch/software/nwchem_suite/nwchem_release/src'
ifort -i8 -align -fpp -vec-report6 -fimf-arch-consistency=true -finline-limit=250 -O2 -g -fp-model source -I. -I/home/milias/Work/qch/software/nwchem_suite/nwchem_release/src/include -I/home/milias/Work/qch/software/nwchem/src/tools/install/include -DEXT_INT -DLINUX -DLINUX64 -DIFCV8 -DIFCLINUX -DPARALLEL_DIAG -DCOMPILATION_DATE="'`date +%a_%b_%d_%H:%M:%S_%Y`'" -DCOMPILATION_DIR="'/home/milias/Work/qch/software/nwchem_suite/nwchem_release'" -DNWCHEM_BRANCH="'Development'" -c -o nwchem.o nwchem.F
nwchem.F(4): #error: can't find include file: mafdecls.fh
nwchem.F(5): #error: can't find include file: global.fh
nwchem.F(408): #error: can't find include file: global.fh
nwchem.F(410): #error: can't find include file: mafdecls.fh
nwchem.F(669): #error: can't find include file: global.fh
nwchem.F(672): #error: can't find include file: mafdecls.fh
<builtin>: recipe for target 'nwchem.o' failed
make[1]: *** [nwchem.o] Error 6
make[1]: Leaving directory '/home/milias/Work/qch/software/nwchem_suite/nwchem_release/src'
GNUmakefile:54: recipe for target 'link' failed
make: *** [link] Error 2
Miro ilias

Clicked A Few Times
Closing this issue - the problem was in wrong libtool command due to improper BLAS_OPT, LAPACK_LIB setting of MKL 2013.

It is much better to use https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor for that.


Forum >> NWChem's corner >> Compiling NWChem