[Boost-bugs] [Boost C++ Libraries] #13315: gcc 5.4 redefinition error in boost/type_traits/is_unsigned.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #13315: gcc 5.4 redefinition error in boost/type_traits/is_unsigned.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-01 04:01:26


#13315: gcc 5.4 redefinition error in boost/type_traits/is_unsigned.hpp
------------------------------+--------------------------
 Reporter: wiki908@… | Owner: John Maddock
     Type: Support Requests | Status: new
Milestone: Boost 1.65.0 | Component: type_traits
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: |
------------------------------+--------------------------
 This is my gcc version:

 {{{
 root# g++ -v

 Using built-in specs.
 COLLECT_GCC=g++
 COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/5/lto-wrapper
 Target: arm-linux-gnueabihf
 Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
 5.4.1-2ubuntu1~14.04' --with-
 bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-
 languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
 --program-suffix=-5 --enable-shared --enable-linker-build-id
 --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
 --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-
 libstdcxx-abi=gcc4-compatible --disable-libstdcxx-dual-abi --enable-gnu-
 unique-object --disable-libitm --disable-libquadmath --enable-plugin
 --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
 --enable-gtk-cairo --with-java-
 home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf/jre --enable-java-home --with-
 jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf --with-jvm-jar-
 dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf --with-arch-directory=arm
 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-
 multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a
 --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror
 --enable-multilib --enable-checking=release --build=arm-linux-gnueabihf
 --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
 Thread model: posix
 gcc version 5.4.1 20160904 (Ubuntu/Linaro 5.4.1-2ubuntu1~14.04)

 }}}

 When I am building ViennaCL, I got this error:

 {{{
 makefile# cd /root/viennacl-dev/build/tests && /usr/bin/c++ --std=c++11
 -O3 -DNDEBUG -I/root/viennacl-dev -I/usr/local/include -I/root/viennacl-
 dev/external -I/root/viennacl-dev/libviennacl/include
 -DVIENNACL_WITH_OPENCL -o CMakeFiles/external_linkage-
 opencl.dir/src/external_2.cpp.o -c /root/viennacl-
 dev/tests/src/external_2.cpp

 In file included from /usr/local/include/boost/type_traits.hpp:127:0,
                  from
 /usr/local/include/boost/numeric/ublas/traits.hpp:27,
                  from
 /usr/local/include/boost/numeric/ublas/storage.hpp:26,
                  from
 /usr/local/include/boost/numeric/ublas/storage_sparse.hpp:23,
                  from
 /usr/local/include/boost/numeric/ublas/vector_sparse.hpp:16,
                  from
 /usr/local/include/boost/numeric/ublas/matrix_sparse.hpp:16,
                  from /root/viennacl-dev/viennacl/meta/result_of.hpp:32,
                  from /root/viennacl-dev/viennacl/scalar.hpp:29,
                  from /root/viennacl-dev/tests/src/external_2.cpp:34:
 /usr/local/include/boost/type_traits/is_unsigned.hpp:126:20: error:
 redefinition of ‘struct boost::is_unsigned<long long unsigned int>’
  template <> struct is_unsigned<const ::boost::ulong_long_type> : public
 true_type{};
                     ^
 /usr/local/include/boost/type_traits/is_unsigned.hpp:125:20: error:
 previous definition of ‘struct boost::is_unsigned<long long unsigned int>’
  template <> struct is_unsigned< ::boost::ulong_long_type> : public
 true_type{};
                     ^
 }}}

 With or without `--std=c++11' didn't help.

 Other info. I installed GCC 5 via ppa.

 {{{
 root# lsb_release -a

 No LSB modules are available.
 Distributor ID: Ubuntu
 Description: Ubuntu 14.04.1 LTS
 Release: 14.04
 Codename: trusty

 root# uname -a

 Linux firefly 3.10.0 #128 SMP PREEMPT Tue Aug 15 16:17:29 CST 2017 armv7l
 armv7l armv7l GNU/Linux
 }}}

 **I didn't meed the error when I use GCC 4.8.4 with libboost 1.54.**

 What should I do to solve the problem, thank you very much!

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13315>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-12-01 04:08:42 UTC