{"action":"created","issue":{"url":"https://api.github.com/repos/dealii/dealii/issues/1553","labels_url":"https://api.github.com/repos/dealii/dealii/issues/1553/labels{/name}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/1553/comments","events_url":"https://api.github.com/repos/dealii/dealii/issues/1553/events","html_url":"https://github.com/dealii/dealii/issues/1553","id":105387241,"number":1553,"title":"Multiple linker errors in static builds with ARPACK and UMFPACK","user":{"login":"mfherbst","id":11157893,"avatar_url":"https://avatars.githubusercontent.com/u/11157893?v=3","gravatar_id":"","url":"https://api.github.com/users/mfherbst","html_url":"https://github.com/mfherbst","followers_url":"https://api.github.com/users/mfherbst/followers","following_url":"https://api.github.com/users/mfherbst/following{/other_user}","gists_url":"https://api.github.com/users/mfherbst/gists{/gist_id}","starred_url":"https://api.github.com/users/mfherbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfherbst/subscriptions","organizations_url":"https://api.github.com/users/mfherbst/orgs","repos_url":"https://api.github.com/users/mfherbst/repos","events_url":"https://api.github.com/users/mfherbst/events{/privacy}","received_events_url":"https://api.github.com/users/mfherbst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dealii/dealii/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/dealii/dealii/labels/Question","name":"Question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-08T13:59:32Z","updated_at":"2015-09-15T13:25:50Z","closed_at":null,"body":"When performing a static build of the current development branch of deal.ii configured like this\r\n ```\r\ncmake -DDEAL_II_PREFER_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/dev_a -DDEAL_II_WITH_MPI=OFF -DDEAL_II_WITH_PETSC=OFF -DDEAL_II_WITH_SLEPC=OFF -DDEAL_II_WITH_ARPACK=ON -DDEAL_II_WITH_UMFPACK=ON ..\r\n```\r\nthe tests (and any other executable using the static `.a` library) do not link against deal.ii. I get errors in the linking step which are similar to\r\n```\r\nTest project /scratch/dealii/build_a2/tests/quick_tests\r\n    Start 1: step.debug\r\n1/4 Test #1: step.debug .......................***Failed   42.57 sec\r\nTest step.debug: BUILD\r\n===============================   OUTPUT BEGIN  ===============================\r\nstep.debug: BUILD failed. Output:\r\nScanning dependencies of target kill-step.debug-OK\r\n[  0%] Built target kill-step.debug-OK\r\n[  0%] Built target expand_instantiations_exe\r\n...\r\n[100%] Built target deal_II.g\r\nScanning dependencies of target step.debug\r\n[100%] Building CXX object tests/quick_tests/CMakeFiles/step.debug.dir/step.cc.o\r\nLinking CXX executable step.debug\r\n/scratch/dealii/tests/quick_tests/step.cc:90: error: undefined reference to 'dealii::DoFHandler<2, 2>::DoFHandler(dealii::Triangulation<2, 2> const&)'\r\n/scratch/dealii/tests/quick_tests/step.cc:90: error: undefined reference to 'dealii::DoFHandler<2, 2>::~DoFHandler()'\r\n/scratch/dealii/tests/quick_tests/step.cc:56: error: undefined reference to 'dealii::DoFHandler<2, 2>::~DoFHandler()'\r\n/scratch/dealii/tests/quick_tests/step.cc:103: error: undefined reference to 'dealii::DoFHandler<2, 2>::distribute_dofs(dealii::FiniteElement<2, 2> const&)'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:902: error: undefined reference to 'dealii::FEFaceValues<2, 2>::FEFaceValues(dealii::Mapping<2, 2> const&, dealii::FiniteElement<2, 2> const&, dealii::Quadrature<1> const&, dealii::UpdateFlags)'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:938: error: undefined reference to 'void dealii::FEFaceValues<2, 2>::reinit<dealii::DoFHandler, false>(dealii::TriaIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2, 2>, false> > const&, unsigned int)'\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<2, 2>::~FEValuesBase()'\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<2, 2>::~FEValuesBase()'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:938: error: undefined reference to 'void dealii::FEFaceValues<2, 3>::reinit<dealii::DoFHandler, false>(dealii::TriaIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2, 3>, false> > const&, unsigned int)'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:902: error: undefined reference to 'dealii::FEFaceValues<3, 3>::FEFaceValues(dealii::Mapping<3, 3> const&, dealii::FiniteElement<3, 3> const&, dealii::Quadrature<2> const&, dealii::UpdateFlags)'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:938: error: undefined reference to 'void dealii::FEFaceValues<3, 3>::reinit<dealii::DoFHandler, false>(dealii::TriaIterator<dealii::DoFCellAccessor<dealii::DoFHandler<3, 3>, false> > const&, unsigned int)'\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<3, 3>::~FEValuesBase()'\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<3, 3>::~FEValuesBase()'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:686: error: undefined reference to 'dealii::DoFHandler<1, 1>::end() const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:686: error: undefined reference to 'dealii::DoFHandler<1, 1>::begin_active(unsigned int) const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:742: error: undefined reference to 'dealii::DoFHandler<1, 1>::end() const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:742: error: undefined reference to 'dealii::DoFHandler<1, 1>::begin_active(unsigned int) const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:1700: error: undefined reference to 'dealii::DoFHandler<1, 1>::end() const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:1700: error: undefined reference to 'dealii::DoFHandler<1, 1>::begin_active(unsigned int) const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:1757: error: undefined reference to 'dealii::DoFHandler<1, 1>::end() const'\r\n/scratch/dealii/source/numerics/matrix_tools.cc:1757: error: undefined reference to 'dealii::DoFHandler<1, 1>::begin_active(unsigned int) const'\r\n...\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<2, 2>::~FEValuesBase()'\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<2, 2>::~FEValuesBase()'\r\n/scratch//dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<3, 3>::~FEValuesBase()'\r\n/scratch/dealii/include/deal.II/fe/fe_values.h:2658: error: undefined reference to 'dealii::FEValuesBase<3, 3>::~FEValuesBase()'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6452: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_values<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<dealii::Vector<dealii::BlockVector<double>::value_type>, std::allocator<dealii::Vector<dealii::BlockVector<double>::value_type> > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6454: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_gradients<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > >, std::allocator<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > > > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6452: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_values<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<dealii::Vector<dealii::BlockVector<double>::value_type>, std::allocator<dealii::Vector<dealii::BlockVector<double>::value_type> > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6454: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_gradients<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > >, std::allocator<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > > > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6452: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_values<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<dealii::Vector<dealii::BlockVector<double>::value_type>, std::allocator<dealii::Vector<dealii::BlockVector<double>::value_type> > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6454: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_gradients<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > >, std::allocator<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > > > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6452: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_values<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<dealii::Vector<dealii::BlockVector<double>::value_type>, std::allocator<dealii::Vector<dealii::BlockVector<double>::value_type> > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6454: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_gradients<dealii::BlockVector<double> >(dealii::BlockVector<double> const&, std::vector<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > >, std::allocator<std::vector<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::BlockVector<double>::value_type> > > > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6452: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_values<dealii::parallel::distributed::BlockVector<double> >(dealii::parallel::distributed::BlockVector<double> const&, std::vector<dealii::Vector<dealii::parallel::distributed::BlockVector<double>::value_type>, std::allocator<dealii::Vector<dealii::parallel::distributed::BlockVector<double>::value_type> > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6454: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_gradients<dealii::parallel::distributed::BlockVector<double> >(dealii::parallel::distributed::BlockVector<double> const&, std::vector<std::vector<dealii::Tensor<1, 1, dealii::parallel::distributed::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::parallel::distributed::BlockVector<double>::value_type> > >, std::allocator<std::vector<dealii::Tensor<1, 1, dealii::parallel::distributed::BlockVector<double>::value_type>, std::allocator<dealii::Tensor<1, 1, dealii::parallel::distributed::BlockVector<double>::value_type> > > > >&) const'\r\n/scratch/dealii/include/deal.II/numerics/vector_tools.templates.h:6452: error: undefined reference to 'void dealii::FEValuesBase<1, 1>::get_function_values<dealii::parallel::distributed::BlockVector<double> >(dealii::parallel::distributed::BlockVector<double> const&, std::vector<dealii::Vector<dealii::parallel::distributed::BlockVector<double>::value_type>, std::allocator<dealii::Vector<dealii::parallel::distributed::BlockVector<double>::value_type> > >&) const'\r\n...\r\n```\r\nWith similar problems tests 2 and 3 fail, but test 4 succeeds.\r\n\r\nOn the other hand if I compile deal.ii with the simpler configuration\r\n```\r\ncmake -DDEAL_II_PREFER_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/dev_a -DDEAL_II_WITH_MPI=OFF -DDEAL_II_WITH_PETSC=OFF -DDEAL_II_WITH_SLEPC=OFF -DDEAL_II_    WITH_ARPACK=OFF -DDEAL_II_WITH_UMFPACK=OFF ..\r\n```\r\neverything works like charm, including all 4 tests. \r\n\r\nI am compiling on an Ubuntu 14.04 LTS system with libarpack 3.1.5-2. "},"comment":{"url":"https://api.github.com/repos/dealii/dealii/issues/comments/140392458","html_url":"https://github.com/dealii/dealii/issues/1553#issuecomment-140392458","issue_url":"https://api.github.com/repos/dealii/dealii/issues/1553","id":140392458,"user":{"login":"mfherbst","id":11157893,"avatar_url":"https://avatars.githubusercontent.com/u/11157893?v=3","gravatar_id":"","url":"https://api.github.com/users/mfherbst","html_url":"https://github.com/mfherbst","followers_url":"https://api.github.com/users/mfherbst/followers","following_url":"https://api.github.com/users/mfherbst/following{/other_user}","gists_url":"https://api.github.com/users/mfherbst/gists{/gist_id}","starred_url":"https://api.github.com/users/mfherbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfherbst/subscriptions","organizations_url":"https://api.github.com/users/mfherbst/orgs","repos_url":"https://api.github.com/users/mfherbst/repos","events_url":"https://api.github.com/users/mfherbst/events{/privacy}","received_events_url":"https://api.github.com/users/mfherbst/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T13:25:50Z","updated_at":"2015-09-15T13:25:50Z","body":"Now if I use an external static Umfpack (from libsuitesparse-dev 4.2.1-3ubuntu1) the tests work. Here the detailed.log\r\n\r\n```\r\n###\r\n#\r\n#  deal.II configuration:\r\n#        CMAKE_BUILD_TYPE:       DebugRelease\r\n#        BUILD_SHARED_LIBS:      OFF\r\n#        CMAKE_INSTALL_PREFIX:   /home/dealii/dev_a\r\n#        CMAKE_SOURCE_DIR:       /scratch/dealii\r\n#                                (version 8.4.pre, shortrev 3db0a3a)\r\n#        CMAKE_BINARY_DIR:       /scratch/dealii/build_a_umfpack_external\r\n#        CMAKE_CXX_COMPILER:     GNU 4.8.4 on platform Linux x86_64\r\n#                                /usr/bin/c++\r\n#        CMAKE_C_COMPILER:       /usr/bin/cc\r\n#        CMAKE_Fortran_COMPILER: /usr/bin/gfortran\r\n#        CMAKE_GENERATOR:        Unix Makefiles\r\n#\r\n#  Base configuration (prior to feature configuration):\r\n#        DEAL_II_CXX_FLAGS:            -pedantic -fpic -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wsynth -Wsign-compare -Wswitch -Wno-long-long -Wno-deprecated-declarations -std=c++11\r\n#        DEAL_II_CXX_FLAGS_RELEASE:    -O2 -funroll-loops -funroll-all-loops -fstrict-aliasing\r\n#        DEAL_II_CXX_FLAGS_DEBUG:      -Og -ggdb -Wa,--compress-debug-sections\r\n#        DEAL_II_LINKER_FLAGS:         -Wl,--as-needed -rdynamic -fuse-ld=gold\r\n#        DEAL_II_LINKER_FLAGS_RELEASE: \r\n#        DEAL_II_LINKER_FLAGS_DEBUG:   -ggdb\r\n#        DEAL_II_DEFINITIONS:          \r\n#        DEAL_II_DEFINITIONS_RELEASE:  \r\n#        DEAL_II_DEFINITIONS_DEBUG:    DEBUG\r\n#        DEAL_II_USER_DEFINITIONS:     \r\n#        DEAL_II_USER_DEFINITIONS_REL: \r\n#        DEAL_II_USER_DEFINITIONS_DEB: DEBUG\r\n#        DEAL_II_INCLUDE_DIRS          \r\n#        DEAL_II_USER_INCLUDE_DIRS:    \r\n#        DEAL_II_BUNDLED_INCLUDE_DIRS: \r\n#        DEAL_II_LIBRARIES:            m\r\n#        DEAL_II_LIBRARIES_RELEASE:    \r\n#        DEAL_II_LIBRARIES_DEBUG:      \r\n#\r\n#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):\r\n#      ( DEAL_II_WITH_64BIT_INDICES = OFF )\r\n#      ( DEAL_II_WITH_ARPACK = OFF )\r\n#        DEAL_II_WITH_BOOST set up with bundled packages\r\n#            BOOST_CXX_FLAGS = -Wno-unused-local-typedefs\r\n#            BOOST_BUNDLED_INCLUDE_DIRS = /scratch/dealii/bundled/boost-1.56.0/include\r\n#            BOOST_LIBRARIES = rt\r\n#      ( DEAL_II_WITH_BZIP2 = OFF )\r\n#        DEAL_II_WITH_CXX11 = ON\r\n#      ( DEAL_II_WITH_CXX14 = OFF )\r\n#      ( DEAL_II_WITH_HDF5 = OFF )\r\n#        DEAL_II_WITH_LAPACK set up with external dependencies\r\n#            LAPACK_LINKER_FLAGS = \r\n#            LAPACK_LIBRARIES = /usr/lib/liblapack.a;/usr/lib/libf77blas.so.3gf;/usr/lib/libatlas.so.3gf;gfortran;quadmath;m;c\r\n#      ( DEAL_II_WITH_METIS = OFF )\r\n#      ( DEAL_II_WITH_MPI = OFF )\r\n#        DEAL_II_WITH_MUPARSER set up with bundled packages\r\n#            MUPARSER_BUNDLED_INCLUDE_DIRS = /scratch/dealii/bundled/muparser_v2_2_4//include\r\n#      ( DEAL_II_WITH_NETCDF = OFF )\r\n#      ( DEAL_II_WITH_OPENCASCADE = OFF )\r\n#      ( DEAL_II_WITH_P4EST = OFF )\r\n#      ( DEAL_II_WITH_PETSC = OFF )\r\n#      ( DEAL_II_WITH_SLEPC = OFF )\r\n#        DEAL_II_WITH_THREADS set up with bundled packages\r\n#            THREADS_CXX_FLAGS = -Wno-parentheses\r\n#            THREADS_LINKER_FLAGS = -pthread\r\n#            THREADS_DEFINITIONS_DEBUG = TBB_USE_DEBUG;TBB_DO_ASSERT=1\r\n#            THREADS_USER_DEFINITIONS_DEBUG = TBB_USE_DEBUG;TBB_DO_ASSERT=1\r\n#            THREADS_BUNDLED_INCLUDE_DIRS = /scratch/dealii/bundled/tbb41_20130401oss/include\r\n#            THREADS_LIBRARIES = dl\r\n#      ( DEAL_II_WITH_TRILINOS = OFF )\r\n#        DEAL_II_WITH_UMFPACK set up with external dependencies\r\n#            UMFPACK_VERSION = 5.6.2\r\n#            UMFPACK_LINKER_FLAGS = \r\n#            UMFPACK_INCLUDE_DIRS = /usr/include/suitesparse\r\n#            UMFPACK_USER_INCLUDE_DIRS = /usr/include/suitesparse\r\n#            UMFPACK_LIBRARIES = /usr/lib/x86_64-linux-gnu/libumfpack.a;/usr/lib/x86_64-linux-gnu/libcholmod.a;/usr/lib/x86_64-linux-gnu/libccolamd.a;/usr/lib/x86_64-linux-gnu/libcolamd.a;/usr/lib/x86_64-linux-gnu/libcamd.a;/usr/lib/x86_64-linux-gnu/libsuitesparseconfig.a;/usr/lib/x86_64-linux-gnu/libamd.a;/usr/lib/liblapack.a;/usr/lib/libf77blas.so.3gf;/usr/lib/libatlas.so.3gf;gfortran;quadmath;m;c;rt\r\n#        DEAL_II_WITH_ZLIB set up with external dependencies\r\n#            ZLIB_VERSION = 1.2.8\r\n#            ZLIB_INCLUDE_DIRS = /usr/include\r\n#            ZLIB_LIBRARIES = /usr/lib/x86_64-linux-gnu/libz.a\r\n#\r\n#  Component configuration:\r\n#      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )\r\n#        DEAL_II_COMPONENT_EXAMPLES\r\n#      ( DEAL_II_COMPONENT_PACKAGE = OFF )\r\n#      ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )\r\n#\r\n###\r\n```\r\nHmm, this is indeed really somewhat strange ... At least I have a working solution now, but it would be nice to find the problem nevertheless. Any further ideas?"}}