我正在尝试编译Trilinos,它需要SuiteSparse用于某些部分。现在编译停止并显示错误
/opt/suitesparse/include/SuiteSparse_config.h:62:26: error: declaration does not declare anything [-fpermissive]
#define SuiteSparse_long long
/opt/suitesparse/include/SuiteSparse_config.h:62:26: note: in definition of macro ‘SuiteSparse_long’
#define SuiteSparse_long long
代码行中的
#ifdef _WIN64
#define SuiteSparse_long __int64
#define SuiteSparse_long_max _I64_MAX
#define SuiteSparse_long_idd "I64d"
#else
#define SuiteSparse_long long
#define SuiteSparse_long_max LONG_MAX
#define SuiteSparse_long_idd "ld"
#endif
在具有GCC 7.2的Linux系统上。我不明白为什么在声明long
之后我得到那个错误?
完整的编译日志是
[ 0%] Built target gtest
[ 0%] Built target tpi
[ 0%] Built target kokkoscore
[ 0%] Built target kokkoscontainers
[ 1%] Built target kokkosalgorithms
[ 2%] Built target teuchoscore
[ 3%] Built target teuchosparser
[ 4%] Built target teuchosparameterlist
[ 4%] Built target teuchoscomm
[ 4%] Built target teuchosnumerics
[ 4%] Built target teuchosremainder
[ 5%] Built target teuchoskokkoscompat
[ 5%] Built target teuchoskokkoscomm
[ 14%] Built target kokkoskernels
[ 14%] Built target rtop
[ 14%] Built target sacado
[ 14%] Built target minitensor
[ 16%] Built target epetra
[ 20%] Built target zoltan
[ 21%] Built target shards
[ 21%] Built target globipack
[ 22%] Built target triutils
[ 22%] Built target tpetraclassic
[ 22%] Built target tpetraclassicnodeapi
[ 22%] Built target tpetraclassiclinalg
[ 22%] Built target kokkostsqr
[ 24%] Built target tpetra
[ 24%] Built target tpetrainout
[ 24%] Built target tpetraext
[ 26%] Built target trilinosss
[ 28%] Built target epetraext
[ 29%] Built target domi
[ 31%] Built target thyracore
[ 31%] Built target thyra_nonlinear_test_models
[ 32%] Built target thyraepetra
[ 32%] Built target thyraepetraext
[ 32%] Built target thyratpetra
[ 32%] Built target xpetra
[ 33%] Built target xpetra-sup
[ 33%] Built target optipack
[ 33%] Built target isorropia
[ 33%] Built target isorropia_test_utils
[ 33%] Built target dpliris
[ 35%] Built target aztecoo
[ 35%] Built target galeri-epetra
[ 35%] Built target galeri-xpetra
[ 36%] Built target amesos
[ 36%] Built target pamgen_extras
[ 37%] Built target pamgen
[ 38%] Built target zoltan2
[ 40%] Built target ifpack
[ 44%] Built target ml
[ 44%] Built target belos
[ 44%] Built target belosepetra
[ 44%] Built target belostpetra
[ 44%] Built target shylu_nodehts
[ 44%] Built target shylu_nodetacho
[ 44%] Building CXX object packages/amesos2/src/CMakeFiles/amesos2.dir/Amesos2_Details_registerLinearSolverFactory.cpp.o
In file included from /opt/suitesparse/include/umfpack.h:29:0,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Umfpack_FunctionMap.hpp:56,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Umfpack_decl.hpp:49,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Umfpack.hpp:47,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Factory.hpp:108,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Details_LinearSolverFactory_def.hpp:52,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Details_LinearSolverFactory.hpp:49,
from ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Details_registerLinearSolverFactory.cpp:45:
/opt/suitesparse/include/SuiteSparse_config.h:62:26: error: declaration does not declare anything [-fpermissive]
#define SuiteSparse_long long
^
/opt/suitesparse/include/SuiteSparse_config.h:62:26: note: in definition of macro ‘SuiteSparse_long’
#define SuiteSparse_long long
^~~~
make[2]: *** [packages/amesos2/src/CMakeFiles/amesos2.dir/build.make:111: packages/amesos2/src/CMakeFiles/amesos2.dir/Amesos2_Details_registerLinearSolverFactory.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8175: packages/amesos2/src/CMakeFiles/amesos2.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
正在运行make VERBOSE=1
给我
/usr/lib64/mpi/gcc/openmpi3/bin/mpic++ -I~/Downloads/Trilinos/build -I~/Downloads/Trilinos -I~/Downloads/Trilinos/build/packages/amesos2/src -I~/Downloads/Trilinos/packages/amesos2/src -I~/Downloads/Trilinos/packages/amesos2/src/KLU2/Include -I~/Downloads/Trilinos/packages/amesos2/src/KLU2/Source -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/AMD/Include -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/COLAMD/Include -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/BTF/Include -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/UFconfig -I~/Downloads/Trilinos/build/packages/shylu/shylu_node/tacho/src -I~/Downloads/Trilinos/packages/shylu/shylu_node/tacho/src -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/CAMD/Include -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/CCOLAMD/Include -I~/Downloads/Trilinos/packages/common/auxiliarySoftware/SuiteSparse/src/KLU/Include -I~/Downloads/Trilinos/build/packages/kokkos/algorithms/src -I~/Downloads/Trilinos/packages/kokkos/algorithms/src -I~/Downloads/Trilinos/build/packages/kokkos/containers/src -I~/Downloads/Trilinos/packages/kokkos/containers/src -I~/Downloads/Trilinos/build/packages/kokkos/core/src -I~/Downloads/Trilinos/packages/kokkos/core/src -I~/Downloads/Trilinos/commonTools/gtest -I/opt/metis/include -I/usr/local/include -I/opt/intel/mkl/include -I~/Downloads/Trilinos/build/packages/epetraext/src -I~/Downloads/Trilinos/packages/epetraext/src -I~/Downloads/Trilinos/packages/epetraext/src/transform -I~/Downloads/Trilinos/packages/epetraext/src/inout -I~/Downloads/Trilinos/packages/epetraext/src/coloring -I~/Downloads/Trilinos/packages/epetraext/src/model_evaluator -I~/Downloads/Trilinos/packages/epetraext/src/block -I~/Downloads/Trilinos/packages/epetraext/src/restrict -I~/Downloads/Trilinos/build/packages/triutils/src -I~/Downloads/Trilinos/packages/triutils/src -I~/Downloads/Trilinos/build/packages/epetra/src -I~/Downloads/Trilinos/packages/epetra/src -I~/Downloads/Trilinos/build/packages/teuchos/kokkoscomm/src -I~/Downloads/Trilinos/packages/teuchos/kokkoscomm/src -I~/Downloads/Trilinos/build/packages/teuchos/kokkoscompat/src -I~/Downloads/Trilinos/packages/teuchos/kokkoscompat/src -I~/Downloads/Trilinos/packages/teuchos/parameterlist/src -I~/Downloads/Trilinos/packages/teuchos/parser/src -I~/Downloads/Trilinos/build/packages/teuchos/core/src -I~/Downloads/Trilinos/packages/teuchos/core/src -I~/Downloads/Trilinos/packages/teuchos/comm/src -I~/Downloads/Trilinos/packages/teuchos/remainder/src -I~/Downloads/Trilinos/build/packages/teuchos/remainder/src -I~/Downloads/Trilinos/packages/teuchos/numerics/src -I/opt/petsc/include -I/opt/suitesparse/include -I~/Downloads/Trilinos/packages/tpetra/core/ext -I~/Downloads/Trilinos/build/packages/tpetra/core/ext -I~/Downloads/Trilinos/packages/tpetra/core/inout -I~/Downloads/Trilinos/build/packages/tpetra/core/inout -I~/Downloads/Trilinos/packages/tpetra/core/src -I~/Downloads/Trilinos/packages/tpetra/core/src/kokkos_refactor -I~/Downloads/Trilinos/build/packages/tpetra/core/src -I~/Downloads/Trilinos/packages/tpetra/tsqr/src -I~/Downloads/Trilinos/build/packages/tpetra/tsqr/src -I~/Downloads/Trilinos/packages/tpetra/classic/LinAlg -I~/Downloads/Trilinos/packages/tpetra/classic/NodeAPI -I~/Downloads/Trilinos/build/packages/tpetra/classic/NodeAPI -I~/Downloads/Trilinos/build/packages/tpetra/classic/src -I~/Downloads/Trilinos/packages/tpetra/classic/src -I/opt/intel/tbb/include -I~/Downloads/Trilinos/build/packages/kokkos-kernels/src -I~/Downloads/Trilinos/packages/kokkos-kernels/src -I~/Downloads/Trilinos/packages/kokkos-kernels/src/impl -I~/Downloads/Trilinos/packages/kokkos-kernels/src/impl/tpls -I~/Downloads/Trilinos/packages/kokkos-kernels/src/blas -I~/Downloads/Trilinos/packages/kokkos-kernels/src/blas/impl -I~/Downloads/Trilinos/packages/kokkos-kernels/src/sparse -I~/Downloads/Trilinos/packages/kokkos-kernels/src/sparse/impl -I~/Downloads/Trilinos/packages/kokkos-kernels/src/graph -I~/Downloads/Trilinos/packages/kokkos-kernels/src/graph/impl -I~/Downloads/Trilinos/packages/kokkos-kernels/src/batched -I~/Downloads/Trilinos/packages/kokkos-kernels/src/batched/impl -I~/Downloads/Trilinos/packages/kokkos-kernels/src/common -I/opt/superlu/include -I/opt/parmetis/include -pedantic -Wall -Wno-long-long -Wwrite-strings -fPIC -march=native -flto -std=c++11 -O3 -DNDEBUG -o CMakeFiles/amesos2.dir/Amesos2_Details_registerLinearSolverFactory.cpp.o -c ~/Downloads/Trilinos/packages/amesos2/src/Amesos2_Details_registerLinearSolverFactory.cpp
我现在可以浏览文件,但我需要查找什么?