Opened 15 years ago

Closed 14 years ago

#1462 closed Patches (fixed)

Missing/wrong includes

Reported by: Jens Seidel <jensseidel@…> Owned by: Douglas Gregor
Milestone: Boost 1.36.0 Component: Building Boost
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: jensseidel@…, rwgk@…

Description

Hi,

the attached patch fixes a few include statements in pending/. Please note that at least with g++ version 3.3 up to 4.3 hash_set can be found in ext/.

Jens

Attachments (1)

boost.pending.diff (1.8 KB ) - added by Jens Seidel <jensseidel@…> 15 years ago.

Download all attachments as: .zip

Change History (9)

by Jens Seidel <jensseidel@…>, 15 years ago

Attachment: boost.pending.diff added

comment:1 by Jens Seidel <jensseidel@…>, 15 years ago

OK let me help you further. http://lists.boost.org/Archives/boost/2007/10/129461.php contains the proper conditional to include hash_set and hash_map.

Please apply the patch!

comment:2 by Douglas Gregor, 14 years ago

Owner: set to Douglas Gregor
Status: newassigned

comment:3 by Douglas Gregor, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [47264]) Fix hash_set and hash_map headers for GCC 4.3, from Ralf W. Grosse-Kunstleve. Fixes #1462

comment:4 by Douglas Gregor, 14 years ago

(In [47265]) Fix hash_set and hash_map headers for GCC 4.3, from Ralf W. Grosse-Kunstleve. Fixes #1462

comment:5 by Jürgen Hunold, 14 years ago

Resolution: fixed
Status: closedreopened

This does not work for all gcc-versions:

gcc -v

Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --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.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

has /usr/include/c++/4.2.3/i486-linux-gnu/bits/c++config.h

containing

The current version of the C++ library in compressed ISO date format.

#define GLIBCXX 20080329

and SuSE-10.3 OpenSuse compiler upgrade has: Using built-in specs. Target: x86_64-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.3 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.2 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux Thread model: posix gcc version 4.2.3 20071030 (prerelease) (SUSE Linux)

/usr/include/c++/4.2.3/x86_64-suse-linux/bits/c++config.h

The current version of the C++ library in compressed ISO date format.

#define GLIBCXX 20071030

and my OpenSuSe 4.3 has gcc-4.3 -v Using built-in specs. Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64--libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.3 --enable-version-specific-runtime-libs --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.3.2 20080703 (prerelease) [gcc-4_3-branch revision 137416] (SUSE Linux)

with

/usr/include/c++/4.3/x86_64-suse-linux/bits/c++config.h

Containing:

The current version of the C++ library in compressed ISO date format.

#define GLIBCXX 20080703

So I get:

/home/hunold/packages/boost/boost/graph/adjacency_list.hpp:22:35: error: backward/hash_set: No such file or directory In file included from /home/hunold/packages/boost/boost/graph/detail/adjacency_list.hpp:31,

from /home/hunold/packages/boost/boost/graph/adjacency_list.hpp:309,

when compiling with gcc-4.2 GLIBCXX

My gcc-4.2 on Hardy has _much_ higher version than the SuSE compiler. I suggest either taking a _much_ higher version number or even better a check for compiler major and minor to _really_ fix the issue

Please note that changes to boost/config/stdlib/libstdcpp3.hpp will _not_ trigger the regression tests because the configuration files are selected via # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" and so later #include BOOST_STDLIB_CONFIG. So please don't wonder if all tests remain green...

in reply to:  5 comment:6 by Ralf W. Grosse-Kunstleve, 14 years ago

Replying to jhunold:

This does not work for all gcc-versions:

Yes, it also breaks

g++ (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Red Hat Linux release 8.0 (Psyche)

g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-34)

Red Hat Enterprise Linux WS release 3 (Taroon Update 2)

Some history:

  • I came up with the patch while testing gcc 4.3 pre-releases.
  • After I originally posted the patch above it turned out to need more if's. I maintained the changes locally during the 4.3 pre-release period (I was testing about once a week).
  • After gcc 4.3 was released I found out (to my surprise) it is not required anymore, so I simply removed it from my boost working copy.

Sorry I didn't communicate this.

The last version of my local patch, before I removed it, was (diff to current boost svn):

Index: libstdcpp3.hpp =================================================================== --- libstdcpp3.hpp (revision 47331) +++ libstdcpp3.hpp (working copy) @@ -68,7 +68,10 @@

# define BOOST_HAS_SLIST # define BOOST_HAS_HASH # define BOOST_SLIST_HEADER <ext/slist>

-# if defined(GLIBCXX) && GLIBCXX < 20071018 GCC <= 4.3.0 +# if !defined(GLIBCXX) \

+ + +
GLIBCXX < 20071018 \
GNUC < 4 \
(GNUC == 4 && GNUC_MINOR < 3)

# define BOOST_HASH_SET_HEADER <ext/hash_set> # define BOOST_HASH_MAP_HEADER <ext/hash_map> # else

I'm not sure the is the final/best set of ifdefs, but at least it restores the gcc 3.2 builds.

Let me know if I can be of help resolving this issue (e.g. testing alternative patches or simply checking this one in).

comment:7 by Ralf W. Grosse-Kunstleve, 14 years ago

Cc: rwgk@… added

comment:8 by Douglas Gregor, 14 years ago

Resolution: fixed
Status: reopenedclosed

(In [47424]) Detect the presence of backward/hash_set and backward/hash_map appropriately. Fixes #1462 (again)

Note: See TracTickets for help on using tickets.