id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6794,boost-1.49.0 fails to build with gcc-4.6.2: boost/smart_ptr/intrusive_ptr.hpp:94:5: internal compiler error: Segmentation fault,markus@…,Daniel James,"I believe this issue is specific to gcc-4.6.2, not with less than boost-1.49, and I have what I think is a fix. Here's the error: gcc.compile.c++ ../bin.v2/tools/quickbook/src/gcc-4.6/release/link-static/pch-off/id_manager.o ""x86_64-pc-linux-gnu-g++"" -ftemplate-depth-300 -O2 -pipe -march=amdfam10 -O3 -finline-functions -Wno-inline -Wall -g0 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"".."" -c -o ""../bin.v2/tools/quickbook/src/gcc-4.6/release/link-static/pch-off/id_manager.o"" ""quickbook/src/id_manager.cpp"" In file included from ../boost/intrusive_ptr.hpp:16:0, from quickbook/src/fwd.hpp:15, from quickbook/src/values.hpp:20, from quickbook/src/id_manager.hpp:14, from quickbook/src/id_manager.cpp:9: ../boost/smart_ptr/intrusive_ptr.hpp: In destructor ‘boost::intrusive_ptr::~intrusive_ptr() [with T = quickbook::file_info]’: ../boost/smart_ptr/intrusive_ptr.hpp:94:5: internal compiler error: Segmentation fault You can find a full build log and preprocessed id_manager.cpp at . Basically I noticed that if I changed the optimization level to -O[01s] or if I removed -DNDEBUG (enabling assertions), it built without error. I came up with both an arbitrary patch, and one that I think makes sense (but itself could be arbitrary since I don't fully understand what the problem is): --- boost_1_49_0/tools/quickbook/src/intrusive_base.hpp.orig 2012-04-14 00:26:49.360818878 -0700 +++ boost_1_49_0/tools/quickbook/src/intrusive_base.hpp 2012-04-14 00:27:10.214279871 -0700 @@ -21,7 +21,7 @@ intrusive_base() : ref_count_(0) {} intrusive_base(intrusive_base const&) : ref_count_(0) {} intrusive_base& operator=(intrusive_base const&) { return *this; } - ~intrusive_base() { assert(!ref_count_); } + virtual ~intrusive_base() { assert(!ref_count_); } friend void intrusive_ptr_add_ref(T* ptr) { ++ptr->ref_count_; } Usually base classes need a virtual destructor, though not if you know the actual type of the object when it's destroyed. Anyway, it works now.",Bugs,closed,Boost 1.50.0,quickbook,Boost 1.49.0,Problem,fixed,,