[pkg-boost-devel] Bug#823978: Bug#823978: libboost-regex1.58.0: Boost somehow mixes up c_regex_traits and cpp_regex_traits

Dimitri John Ledkov xnox at debian.org
Wed May 11 00:17:32 UTC 2016


On 10 May 2016 at 22:27, Gert Wollny <gw.fossdev at gmail.com> wrote:
> Package: libboost-regex1.58.0
> Version: 1.58.0+dfsg-5+b1
> Severity: important
>
> Dear maintainer,
>
> when compiling src:mrs with g++-6 I get unresolved symbols
>
> /usr/bin/c++ -o mrs -I. obj/M6Server.o [...] -lboost_regex [...]
>
> obj/M6Server.o: In function
> `boost::cpp_regex_traits<char>::transform_primary[abi:cxx11](char const*, char
> const*) const':
> /usr/include/boost/regex/v4/cpp_regex_traits.hpp:965: undefined reference to
> `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char
> const*, char const*) const'
> obj/M6Server.o: In function
> `boost::cpp_regex_traits<char>::transform[abi:cxx11](char const*, char const*)
> const':
> /usr/include/boost/regex/v4/cpp_regex_traits.hpp:961: undefined reference to
> `boost::re_detail::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char
> const*, char const*) const'
> ...
>
> now in the symbol table I get
> objdump --dynamic-syms libboost_regex.so.1.58.0 \
>  | c++filt \
>  | sed -e "s/^[0-9a-f]* *\([A-Za-z]\) *D[A-Z] \.[a-z]*/\1/" \
>  | sed -e "s/[0-9a-f]*  Base *//" | grep "transform_primary"
>
> g boost::c_regex_traits<wchar_t>::transform_primary[abi:cxx11](wchar_t const*,
> wchar_t const*)
> w
> boost::re_detail::cpp_regex_traits_implementation<wchar_t>::transform_primary(wchar_t
> const*, wchar_t const*) const
> w
> boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char
> const*, char const*) const
> g boost::c_regex_traits<char>::transform_primary[abi:cxx11](char const*, char
> const*)
>
> i.e. the symbols are not available.
>
> Given
> http://www.boost.org/doc/libs/1_58_0/libs/regex/doc/html/boost_regex/ref/regex_traits.html
>
> I thought compiling with -DBOOST_REGEX_USE_C_LOCALE would get me somewhere, but
> then I get a lot more missing symbols, and they are all without the [abi:cxx11]
> tag.
>
>
> src:mrs requires -std=c++11, but I assume for the boost package the g++ default
> was used, and with g++-5 this is -std=c++03, therefore, final guess is that
> there is a problem with compiling boost with -std=c++11 and then linking
> against a boost library that was compiled with -std=c++03.
>

g++-5 defaults are "funny" - it's using c++11 ABI for libstdc++ yet 98
standards for the code.
With gcc++-6 everything is bumped - "The default mode for C++ is now
-std=gnu++14 instead of -std=gnu++98."

With gcc++-6 i think we will need to compile boost with gcc++-6 and
then recompile the world with against the new libraries. Have you
tried that?

Regards,

Dimitri.

>
> Best,
> Gert
>
>
>
> -- System Information:
> Debian Release: stretch/sid
>   APT prefers unstable-debug
>   APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 4.5.0-2-amd64 (SMP w/2 CPU cores)
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages libboost-regex1.58.0 depends on:
> ii  libc6       2.22-7
> ii  libgcc1     1:6-20160117-1
> ii  libicu55    55.1-7
> ii  libstdc++6  6-20160117-1
>
> libboost-regex1.58.0 recommends no packages.
>
> libboost-regex1.58.0 suggests no packages.
>
> -- no debconf information
>
> _______________________________________________
> pkg-boost-devel mailing list
> pkg-boost-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-boost-devel



-- 
Regards,

Dimitri.



More information about the pkg-boost-devel mailing list