[Dune] dune-2.4, cmake and installed core modules

Ansgar Burchardt Ansgar.Burchardt at tu-dresden.de
Tue May 3 23:43:20 CEST 2016


Hi,

Christian Engwer <christian.engwer at uni-muenster.de> writes:
> OK, I think I'm getting close and this seems to be some kind of more
> general issue.
>
> The obj file requires the following symbols:
> nm -uC CMakeFiles/eeg_dg_hex_1_forward.dir/eeg_conforming_forward.cc.o  | grep ParameterTree::sub
>                  U Dune::ParameterTree::sub(std::string const&)
>                  U Dune::ParameterTree::sub(std::string const&) const
> while the lib provides:
> nm -C --defined-only /usr/lib/x86_64-linux-gnu/libdunecommon.a | grep ParameterTree::sub
> 00000000000013d0 T
> Dune::ParameterTree::sub(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)
> 00000000000005d0 T
> Dune::ParameterTree::sub(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&) const
> 000000000000000b r
> Dune::ParameterTree::sub(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&) const::__func__
>
> What strikes me is the std::__cxx11::basic_string parameter, where I'm
> pretty sure that in my case (--std=c++14) basic_string will not be in
> a sub-namespace __cxx11.
>
> Might this be a problem of different C++ compiler versions?

Which compiler and version is `cxxcompiler`?

The C++ standard library changed its ABI in some places with C++11; a
compatible ABI is also used with C++14.  All Debian packages use the new
ABI which one can notice from the __cxx11 somewhere in the symbol names.

If I remember correctly, all compilers (or at least gcc) include their
own version of the libstdc++ and one has to use a compiler that uses the
new ABI.

At least Debian's default compiler in testing (currently gcc 5.3.1)
should work. So you could try building with that and see if the linker
problem disappears?

>> > PS: I was a bit surprised that the new Debian packages include the
>> >     libs in the dev package

Yes, that is not common. However handling the DUNE libraries in the
standard way causes some delays (every new DUNE version changes ABI ->
packages need to be renamed -> renamed packages need extra review
step). Having the library in an extra package only allows installing
applications using the DUNE libraries without having to install the -dev
packages. However there are no such applications in Debian and this will
probably not change in the near future. So I chose to avoid some extra
work and delays.

Ansgar




More information about the Dune mailing list