Package: libcgal-dev
Version: 4.11-2
Severity: grave
Justification: renders package unusable
Tags: upstream newcomer

Dear Maintainer,

Boost-1.62 fails to compile the following c++ file :

    g++ pair_tst.cc -o pair_tst.cc

in sid and buster (testing) with g++ 7.2.
The output is:
        In file included from 
/usr/include/boost/container/detail/flat_tree.hpp:29:0,
                         from /usr/include/boost/container/flat_map.hpp:29,
                         from pair_tst.cc:16:
        /usr/include/boost/container/detail/pair.hpp:433:8: error: partial 
specialization of ‘struct boost::is_enum<std::pair<_T1, _T2> >’ after 
instantiation of ‘struct boost::is_enum<std::pair<int, int> >’ [-fpermissive]
        struct is_enum< ::std::pair<T, U> >
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

See the "pair_tst.cc" file in attachment for reproducing this bug.
This bug actually causes some debian package build to fail in sid
and testing (see e.g. bug: #883987 ).

The bug has already be identified in the upstream version of Boost :
  https://svn.boost.org/trac10/ticket/12534
and it is now fixed in boost-dev 1.65:
  
https://github.com/boostorg/container/commit/5e4a107e82ab3281688311d22d2bfc2fddcf84a3
The fix simply consists of removing from line 431 to 460
in file include/boost/container/detail/pair.hpp
See also the "pair_tst.patch" file in attachment.

Could you please includes this patch in the debianization of
the Boost package ?

Best regards,

Pierre Saramito

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/32 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libcgal-dev depends on:
ii  libboost-dev                  1.62.0.1
ii  libboost-program-options-dev  1.62.0.1
ii  libboost-system-dev           1.62.0.1
ii  libboost-thread-dev           1.62.0.1
ii  libcgal13                     4.11-2
ii  libgmp-dev [libgmp10-dev]     2:6.1.2+dfsg-1.1
ii  libmpfr-dev                   3.1.6-1
ii  zlib1g-dev                    1:1.2.8.dfsg-5

libcgal-dev recommends no packages.

Versions of packages libcgal-dev suggests:
pn  libmpfi-dev  <none>
pn  libntl-dev   <none>
pn  libtbb-dev   <none>

-- no debconf information

--
pierre.saram...@imag.fr
Directeur de Recherche CNRS
Laboratoire Jean Kuntzmann, Grenoble, France
http://ljk.imag.fr/membres/Pierre.Saramito
// bug description
// https://svn.boost.org/trac10/ticket/12534
// and its fix in boost-dev 1.65:
// https://github.com/boostorg/container/commit/5e4a107e82ab3281688311d22d2bfc2fddcf84a3
// i.e. remove from line 431 to 460 in include/boost/container/detail/pair.hpp

#undef FIX_BUG
#ifdef  FIX_BUG
#include <boost/container/map.hpp>
#endif // FIX_BUG

#include <boost/type_traits.hpp>

static const bool is_enum = boost::is_enum<std::pair<int, int> >::value;

#include <boost/container/flat_map.hpp>

boost::container::flat_map<int, int> m;

int main() {}
*** /usr/include/boost/container/detail/pair.hpp.orig	Tue Dec 12 12:15:26 2017
--- /usr/include/boost/container/detail/pair.hpp	Tue Dec 12 12:41:22 2017
***************
*** 416,451 ****
  }  //namespace container_detail {
  }  //namespace container {
  
- 
- //Without this specialization recursive flat_(multi)map instantiation fails
- //because is_enum needs to instantiate the recursive pair, leading to a compilation error).
- //This breaks the cycle clearly stating that pair is not an enum avoiding any instantiation.
- template<class T>
- struct is_enum;
- 
- template<class T, class U>
- struct is_enum< ::boost::container::container_detail::pair<T, U> >
- {
-    static const bool value = false;
- };
- 
- template<class T, class U>
- struct is_enum< ::std::pair<T, U> >
- {
-    static const bool value = false;
- };
- 
- template <class T>
- struct is_class;
- 
- //This specialization is needed to avoid instantiation of pair in
- //is_class, and allow recursive maps.
- template <class T1, class T2>
- struct is_class< ::boost::container::container_detail::pair<T1, T2> >
- {
-    static const bool value = true;
- };
- 
  #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
  
  template<class T1, class T2>
--- 416,421 ----

Reply via email to