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

Gert Wollny gw.fossdev at gmail.com
Tue May 10 21:27:13 UTC 2016


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.


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



More information about the pkg-boost-devel mailing list