undefined reference to `dggsvd3'
Created by: bl0od
@bartlettroscoe @etphipp @mhoemmen
I tried to build trilinos but I got some errors. This is my CMakeError.log:
Performing C++ SOURCE FILE Test HAVE_TEUCHOS_LAPACKLARND failed with the following output: Change Dir: /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/opt/rh/devtoolset-7/root/usr/bin/gmake" "cmTC_6bb30/fast" /opt/rh/devtoolset-7/root/usr/bin/gmake -f CMakeFiles/cmTC_6bb30.dir/build.make CMakeFiles/cmTC_6bb30.dir/build gmake[1]: Entering directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_6bb30.dir/src.cxx.o /opt/openmpi/bin/mpicxx -pedantic -Wall -Wno-long-long -Wwrite-strings -Wshadow -Woverloaded-virtual -O2 -std=c++11 -ansi -pedantic -ftrapv -Wall -Wno-long-long -std=c++11 -DHAVE_TEUCHOS_LAPACKLARND -O3 -DNDEBUG -o CMakeFiles/cmTC_6bb30.dir/src.cxx.o -c /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx: In function 'int main()': /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx:12:38: error: narrowing conversion of '0.0' from 'double' to 'int' inside { } [-Wnarrowing] int seed[4] = { 0.0, 0.0, 0.0, 1.0 }; ^ /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx:12:38: error: narrowing conversion of '0.0' from 'double' to 'int' inside { } [-Wnarrowing] /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx:12:38: error: narrowing conversion of '0.0' from 'double' to 'int' inside { } [-Wnarrowing] /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx:12:38: error: narrowing conversion of '1.0e+0' from 'double' to 'int' inside { } [-Wnarrowing] gmake[1]: *** [CMakeFiles/cmTC_6bb30.dir/build.make:66: CMakeFiles/cmTC_6bb30.dir/src.cxx.o] Error 1 gmake[1]: Leaving directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:121: cmTC_6bb30/fast] Error 2
Return value: 1 Source file was:
#define F77_BLAS_MANGLE(name,NAME) name ## _
#define DLARND_F77 F77_BLAS_MANGLE(dlarnd,DLARND)
extern "C" { double DLARND_F77(const int* idist, int* seed); }
int main() {
const int idist = 1; int seed[4] = { 0.0, 0.0, 0.0, 1.0 };
double val = DLARND_F77(&idist, seed);
return (val < 0.0 ? 1 : 0);
}
Performing C++ SOURCE FILE Test HAVE_CXX_PRAGMA_WEAK failed with the following output: Change Dir: /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/opt/rh/devtoolset-7/root/usr/bin/gmake" "cmTC_6718f/fast"
/opt/rh/devtoolset-7/root/usr/bin/gmake -f CMakeFiles/cmTC_6718f.dir/build.make CMakeFiles/cmTC_6718f.dir/build
gmake[1]: Entering directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_6718f.dir/src.cxx.o
/opt/openmpi/bin/mpicxx -pedantic -Wall -Wno-long-long -Wwrite-strings -Wshadow -Woverloaded-virtual -O2 -std=c++11 -ansi -pedantic -ftrapv -Wall -Wno-long-long -std=c++11 -DHAVE_CXX_PRAGMA_WEAK -O3 -DNDEBUG -o CMakeFiles/cmTC_6718f.dir/src.cxx.o -c /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx
/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx: In function 'int main()':
/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp/src.cxx:14:22: warning: the address of 'void A::theFunction()' will never be NULL [-Waddress]
if (A::theFunction != NULL) {
^
Linking CXX executable cmTC_6718f
/share/apps/cmake-3.13.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6718f.dir/link.txt --verbose=1
/opt/openmpi/bin/mpicxx -pedantic -Wall -Wno-long-long -Wwrite-strings -Wshadow -Woverloaded-virtual -O2 -std=c++11 -ansi -pedantic -ftrapv -Wall -Wno-long-long -std=c++11 -DHAVE_CXX_PRAGMA_WEAK -O3 -DNDEBUG CMakeFiles/cmTC_6718f.dir/src.cxx.o -o cmTC_6718f
CMakeFiles/cmTC_6718f.dir/src.cxx.o: In function main': src.cxx:(.text.startup+0x23): undefined reference to
A::theFunction()'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_6718f.dir/build.make:87: cmTC_6718f] Error 1
gmake[1]: Leaving directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_6718f/fast] Error 2
Source file was:
#include
namespace A { // theFunction never gets defined, because we // don't link with a library that defines it. // That's OK, because it's weak linkage. #pragma weak theFunction extern void theFunction (); }
int main() { std::cout << "Hi! I am main." << std::endl; if (A::theFunction != NULL) { // Should never be called, since we don't link // with a library that defines A::theFunction. A::theFunction (); } return 0; }
Determining if the function dggsvd3 exists failed with the following output: Change Dir: /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/opt/rh/devtoolset-7/root/usr/bin/gmake" "cmTC_659c6/fast"
/opt/rh/devtoolset-7/root/usr/bin/gmake -f CMakeFiles/cmTC_659c6.dir/build.make CMakeFiles/cmTC_659c6.dir/build
gmake[1]: Entering directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_659c6.dir/CheckFunctionExists.c.o
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=dggsvd3 -O3 -DNDEBUG -o CMakeFiles/cmTC_659c6.dir/CheckFunctionExists.c.o -c /share/apps/cmake-3.13.1/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_659c6
/share/apps/cmake-3.13.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_659c6.dir/link.txt --verbose=1
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=dggsvd3 -O3 -DNDEBUG CMakeFiles/cmTC_659c6.dir/CheckFunctionExists.c.o -o cmTC_659c6 /usr/lib64/liblapack.so /usr/lib64/libblas.so
CMakeFiles/cmTC_659c6.dir/CheckFunctionExists.c.o: In function main': CheckFunctionExists.c:(.text.startup+0xc): undefined reference to
dggsvd3'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_659c6.dir/build.make:89: cmTC_659c6] Error 1
gmake[1]: Leaving directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_659c6/fast] Error 2
Determining if the function dggsvd3_ exists failed with the following output: Change Dir: /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/opt/rh/devtoolset-7/root/usr/bin/gmake" "cmTC_56db8/fast"
/opt/rh/devtoolset-7/root/usr/bin/gmake -f CMakeFiles/cmTC_56db8.dir/build.make CMakeFiles/cmTC_56db8.dir/build
gmake[1]: Entering directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_56db8.dir/CheckFunctionExists.c.o
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=dggsvd3_ -O3 -DNDEBUG -o CMakeFiles/cmTC_56db8.dir/CheckFunctionExists.c.o -c /share/apps/cmake-3.13.1/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_56db8
/share/apps/cmake-3.13.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56db8.dir/link.txt --verbose=1
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=dggsvd3_ -O3 -DNDEBUG CMakeFiles/cmTC_56db8.dir/CheckFunctionExists.c.o -o cmTC_56db8 /usr/lib64/liblapack.so /usr/lib64/libblas.so
CMakeFiles/cmTC_56db8.dir/CheckFunctionExists.c.o: In function main': CheckFunctionExists.c:(.text.startup+0xc): undefined reference to
dggsvd3_'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_56db8.dir/build.make:89: cmTC_56db8] Error 1
gmake[1]: Leaving directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_56db8/fast] Error 2
Determining if the function DGGSVD3 exists failed with the following output: Change Dir: /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/opt/rh/devtoolset-7/root/usr/bin/gmake" "cmTC_0bdb6/fast"
/opt/rh/devtoolset-7/root/usr/bin/gmake -f CMakeFiles/cmTC_0bdb6.dir/build.make CMakeFiles/cmTC_0bdb6.dir/build
gmake[1]: Entering directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0bdb6.dir/CheckFunctionExists.c.o
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=DGGSVD3 -O3 -DNDEBUG -o CMakeFiles/cmTC_0bdb6.dir/CheckFunctionExists.c.o -c /share/apps/cmake-3.13.1/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_0bdb6
/share/apps/cmake-3.13.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0bdb6.dir/link.txt --verbose=1
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=DGGSVD3 -O3 -DNDEBUG CMakeFiles/cmTC_0bdb6.dir/CheckFunctionExists.c.o -o cmTC_0bdb6 /usr/lib64/liblapack.so /usr/lib64/libblas.so
CMakeFiles/cmTC_0bdb6.dir/CheckFunctionExists.c.o: In function main': CheckFunctionExists.c:(.text.startup+0xc): undefined reference to
DGGSVD3'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_0bdb6.dir/build.make:89: cmTC_0bdb6] Error 1
gmake[1]: Leaving directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_0bdb6/fast] Error 2
Determining if the function DGGSVD3_ exists failed with the following output: Change Dir: /share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/opt/rh/devtoolset-7/root/usr/bin/gmake" "cmTC_1b9b2/fast"
/opt/rh/devtoolset-7/root/usr/bin/gmake -f CMakeFiles/cmTC_1b9b2.dir/build.make CMakeFiles/cmTC_1b9b2.dir/build
gmake[1]: Entering directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1b9b2.dir/CheckFunctionExists.c.o
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=DGGSVD3_ -O3 -DNDEBUG -o CMakeFiles/cmTC_1b9b2.dir/CheckFunctionExists.c.o -c /share/apps/cmake-3.13.1/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_1b9b2
/share/apps/cmake-3.13.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1b9b2.dir/link.txt --verbose=1
/opt/openmpi/bin/mpicc -pedantic -Wall -Wno-long-long -std=c99 -DCHECK_FUNCTION_EXISTS=DGGSVD3_ -O3 -DNDEBUG CMakeFiles/cmTC_1b9b2.dir/CheckFunctionExists.c.o -o cmTC_1b9b2 /usr/lib64/liblapack.so /usr/lib64/libblas.so
CMakeFiles/cmTC_1b9b2.dir/CheckFunctionExists.c.o: In function main': CheckFunctionExists.c:(.text.startup+0xc): undefined reference to
DGGSVD3_'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_1b9b2.dir/build.make:89: cmTC_1b9b2] Error 1
gmake[1]: Leaving directory '/share/apps/Trilinos-master/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_1b9b2/fast] Error 2
My Environment
-
Relevant configure flags or configure script:
cmake
-D CMAKE_INSTALL_PREFIX:PATH=$APPS_PATH/trilinos
-D MPI_BASE_DIR:PATH=/opt/openmpi
-D CMAKE_C_COMPILER=/opt/openmpi/bin/mpicc
-D CMAKE_CXX_COMPILER=/opt/openmpi/bin/mpicxx
-D CMAKE_Fortran_COMPILER=/opt/openmpi/bin/mpif77
-D CMAKE_CXX_FLAGS:STRING="-O2 -std=c++11 -ansi -pedantic -ftrapv -Wall -Wno-long-long"
-D CMAKE_BUILD_TYPE:STRING=RELEASE
-D BUILD_SHARED_LIBS=ON
-D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=""
-D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF
-D Trilinos_ENABLE_Teuchos:BOOL=ON
-D Trilinos_ENABLE_Shards:BOOL=ON
-D Trilinos_ENABLE_Sacado:BOOL=ON
-D Trilinos_ENABLE_Epetra:BOOL=ON
-D Trilinos_ENABLE_EpetraExt:BOOL=ON
-D Trilinos_ENABLE_Ifpack:BOOL=ON
-D Trilinos_ENABLE_AztecOO:BOOL=ON
-D Trilinos_ENABLE_Amesos:BOOL=ON
-D Trilinos_ENABLE_Anasazi:BOOL=ON
-D Trilinos_ENABLE_Belos:BOOL=ON
-D Trilinos_ENABLE_ML:BOOL=ON
-D Trilinos_ENABLE_Phalanx:BOOL=ON
-D Trilinos_ENABLE_Intrepid:BOOL=ON
-D Trilinos_ENABLE_NOX:BOOL=ON
-D Trilinos_ENABLE_Stratimikos:BOOL=ON
-D Trilinos_ENABLE_Thyra:BOOL=ON
-D Trilinos_ENABLE_Rythmos:BOOL=ON
-D Trilinos_ENABLE_MOOCHO:BOOL=ON
-D Trilinos_ENABLE_TriKota:BOOL=OFF
-D Trilinos_ENABLE_Stokhos:BOOL=ON
-D Trilinos_ENABLE_Zoltan:BOOL=ON
-D Trilinos_ENABLE_Piro:BOOL=ON
-D Trilinos_ENABLE_Teko:BOOL=ON
-D Trilinos_ENABLE_SEACASIoss:BOOL=ON
-D Trilinos_ENABLE_SEACAS:BOOL=ON
-D Trilinos_ENABLE_SEACASBlot:BOOL=ON
-D Trilinos_ENABLE_Pamgen:BOOL=ON
-D Trilinos_ENABLE_EXAMPLES:BOOL=OFF
-D Trilinos_ENABLE_TESTS:BOOL=OFF
-D TPL_ENABLE_MATLAB:BOOL=OFF
-D TPL_ENABLE_Matio:BOOL=OFF
-D TPL_ENABLE_QT:BOOL=OFF
-D TPL_ENABLE_HDF5:BOOL=ON
-D HDF5_INCLUDE_DIRS:PATH=$APPS_PATH/hdf5-1.10.3/include
-D HDF5_LIBRARY_DIRS:PATH=$APPS_PATH/hdf5-1.10.3/lib
-D TPL_ENABLE_Netcdf:BOOL=ON
-D Netcdf_INCLUDE_DIRS:PATH=$APPS_PATH/netcdf/include
-D Netcdf_LIBRARY_DIRS:PATH=$APPS_PATH/netcdf/lib
-D TPL_ENABLE_MPI:BOOL=ON
-D MPI_EXEC_DEFAULT_NUMPROCS=10
-D TPL_ENABLE_BLAS:BOOL=ON
-D TPL_BLAS_LIBRARIES:STRING=/usr/lib64/libblas.so
-D TPL_ENABLE_LAPACK:BOOL=ON \ .. -
Operating system and version:
CentOS release 6.9 -
Compiler and TPL versions:
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) GNU Fortran (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) cmake version 3.13.20181130-g654fd liblapack version: 3.2.1 libblas version: 3.2.1
Additional Information
I can not change the OS because it is a server that runs many jobs. Please help me fix this error without changing the OS.