From: <min...@li...> - 2012-05-03 23:22:40
|
On 05/03/2012 12:51, min...@li... wrote: > 2012/5/3 <min...@li...>: >> I'm getting a crash in cc1plus.exe when I turn on >> pre-compiled headers in Code::Blocks. >> >> In successfully compiles the pch, and then cc1plus.exe >> crashes compiling the first file that uses the pch. >> >> g++.exe -Wall -fexceptions -g -march=core2 -std=c++0x >> -Wall -Werror >> -Ic:\users\galb\Downloads\mingw\local\include -c >> C:\Users\galb\Documents\galb\apt-mirror2\pch.h -o pch.h.gch >> >> g++.exe -Wall -fexceptions -g -march=core2 -std=c++0x >> -Wall -Werror >> -Ic:\users\galb\Downloads\mingw\local\include -c >> C:\Users\galb\Documents\galb\apt-mirror2\ConnectionPool.cpp >> -o obj\Debug\ConnectionPool.o >> >> <crash here> >> >> This is with >> x86_64-mingw32-gcc-4.7.1-prerelease-20120430-rev-186947, but >> it also happened with >> x86_64-mingw32-gcc-4.7.0-release-c,c++,fortran-sjlj . >> >> Here are the contents of the pch.h file: >> >> #ifndef pch_h >> #define pch_h >> >> #include <condition_variable> >> #include <fstream> >> #include <list> >> #include <mutex> >> #include <queue> >> #include <string> >> #include <thread> >> #include <vector> >> >> #pragma GCC diagnostic push >> #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" >> >> #include <boost/algorithm/string.hpp> >> #include <boost/asio.hpp> >> #include <boost/bind.hpp> >> #include <boost/date_time.hpp> >> #include <boost/filesystem.hpp> >> #include <boost/iostreams/filter/gzip.hpp> >> #include <boost/iostreams/filter/bzip2.hpp> >> #include <boost/iostreams/filtering_stream.hpp> >> #include <boost/lexical_cast.hpp> >> #include <boost/program_options.hpp> >> #include <boost/thread.hpp> >> #include <boost/uuid/sha1.hpp> >> >> #pragma GCC diagnostic pop >> #endif >> >> Boost is boost_1_49_0, downloaded from the boost website. >> >> I'm not sure this is the right place to report the problem, >> or what I can do to help debug it. > > Hi Joseph, > > All builds are configured with '--disable-pch', perhaps, the problem is in it? I think the --disable-pch just disables building the giant pch for libstdc++-v3 ... so it should not affect the compilers ability to generate an use pch... but I could be wrong. > With what message the compiler crashes? It is a windows crash... no message from the compiler. I get the windows dialog "cc1plus.exe has stopped working." I tried debugging it using visual studio, but that wasn't very successful with no symbols. Can gdb read a Microsoft dump file? If so, maybe I can arrange to get a hold of an unstripped version of cc1plus and get a call stack at least. Or if there is a way to run cc1plus under gdb... a quick web search didn't turn up anything... but I didn't dig real deep. Thanks, Joseph |