[pkg-boost-devel] Bug#495204: libboost-dev: missing include of climits in boost/pending/relaxed_heap.hpp

charles blundell blundellc at gmail.com
Fri Aug 15 10:22:52 UTC 2008


Package: libboost-dev
Version: 1.34.1-11
Severity: normal
Tags: patch

boost/pending/relaxed_heap.hpp uses CHAR_BIT but does not include climits for its definition.
(This appears to be more gcc 4.3 fallout.)

; cat >test.cpp
#include <boost/graph/betweenness_centrality.hpp>
; make test
g++     test.cpp   -o test
In file included from /usr/include/boost/graph/dijkstra_shortest_paths.hpp:19,
                 from /usr/include/boost/graph/betweenness_centrality.hpp:14,
                 from test.cpp:1:
/usr/include/boost/pending/relaxed_heap.hpp: In member function 'size_t boost::relaxed_heap<IndexedType, Compare, ID>::log_base_2(size_t)':
/usr/include/boost/pending/relaxed_heap.hpp:102: error: 'CHAR_BIT' was not declared in this scope
make: *** [test] Error 1
; g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-2) 

This patch resolves the problem for me:
--- trunk.orig/boost/pending/relaxed_heap.hpp
+++ trunk/boost/pending/relaxed_heap.hpp
@@ -9,6 +9,7 @@
 #ifndef BOOST_RELAXED_HEAP_HEADER
 #define BOOST_RELAXED_HEAP_HEADER

+#include <climits> // for CHAR_BIT
 #include <functional>
 #include <boost/property_map.hpp>
 #include <boost/optional.hpp>

; make test
g++     test.cpp   -o test
/usr/lib/gcc/i486-linux-gnu/4.3.1/../../../../lib/Scrt1.o: In function `_start':
(.text+0x28): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [test] Error 1


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages libboost-dev depends on:
ii  libboost-serialization-dev    1.34.1-11  serialization library for C++
ii  libstdc++6-4.1-dev [libstdc++ 4.1.2-23   The GNU Standard C++ Library v3 (d
ii  libstdc++6-4.2-dev [libstdc++ 4.2.4-3    The GNU Standard C++ Library v3 (d
ii  libstdc++6-4.3-dev [libstdc++ 4.3.1-2    The GNU Standard C++ Library v3 (d

Versions of packages libboost-dev recommends:
ii  libboost-date-time-dev        1.34.1-11  set of date-time libraries based o
ii  libboost-doc                  1.34.1-11  Boost.org libraries documentation
ii  libboost-filesystem-dev       1.34.1-11  filesystem operations (portable pa
ii  libboost-graph-dev            1.34.1-11  generic graph components and algor
ii  libboost-iostreams-dev        1.34.1-11  Boost.Iostreams Library developmen
ii  libboost-program-options-dev  1.34.1-11  program options library for C++
ii  libboost-python-dev           1.34.1-11  Boost.Python Library development f
ii  libboost-regex-dev            1.34.1-11  regular expression library for C++
ii  libboost-signals-dev          1.34.1-11  managed signals and slots library 
ii  libboost-test-dev             1.34.1-11  components for writing and executi
ii  libboost-thread-dev           1.34.1-11  portable C++ multi-threading
ii  libboost-wave-dev             1.34.1-11  C99/C++ preprocessor library

libboost-dev suggests no packages.

-- no debconf information





More information about the pkg-boost-devel mailing list