Bug 35883 - Similar to #23589: Internal compiler error: in rest_of_handle_final, at toplev.c:2067
Summary: Similar to #23589: Internal compiler error: in rest_of_handle_final, at tople...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.6
: P3 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-09 09:50 UTC by Philipp Bachmann
Modified: 2008-04-09 13:01 UTC (History)
1 user (show)

See Also:
Host: i386-pc-mingw32
Target: i386-pc-mingw32
Build: *-*-*
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed source file, first chunk (101.54 KB, text/plain)
2008-04-09 10:04 UTC, Philipp Bachmann
Details
Preprocessed source file, second chunk (82.40 KB, text/plain)
2008-04-09 10:05 UTC, Philipp Bachmann
Details
Preprocessed source file, third chunk (13.23 KB, text/plain)
2008-04-09 10:05 UTC, Philipp Bachmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Bachmann 2008-04-09 09:50:54 UTC
I tried to compile log4cplus-1.0.2 with the latest stable GCC distributed with MinGW (gcc-*-3.4.5-20060117-2). This failed. So I compiled GCC 3.4.6 myself:

export PATH=/mingw/bin:$PATH
export GCC_EXEC_PREFIX=/mingw/lib/gcc/
cd ..
mkdir mingw32
cd mingw32
mkdir /usr/include
../gcc-3.4.6/configure --with-gcc --with-gnu-ld --with-gnu-as \
--host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads \
--disable-nls --enable-languages=c,c++,f77,ada,objc,java \
--disable-win32-registry --disable-shared --enable-sjlj-exceptions \
--enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm \
--disable-libgcj-debug --enable-interpreter --enable-hash-synchronization \
--enable-libstdcxx-debug --enable-languages=c,c++
make BOOT_CFLAGS="-O2 -fomit-frame-pointer -D__USE_MINGW_ACCESS" \
BOOT_CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2" \
BOOT_LDFLAGS=-s \
bootstrap
make install

Now I have
$ g++ --version
g++.exe (GCC) 3.4.6
[...]

$ uname -a
MINGW32_NT-5.1 [hostname] 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown

Updating the compiler didn't solve the problem. It still says:

appender.cxx:245: warning: function 'virtual log4cplus::tstring log4cplus::Appender::getName()' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:253: warning: function 'virtual void log4cplus::Appender::setName(const log4cplus::tstring&)' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:268: warning: function 'virtual void log4cplus::Appender::setErrorHandler(std::auto_ptr<log4cplus::ErrorHandler>)' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:260: warning: function 'virtual log4cplus::ErrorHandler* log4cplus::Appender::getErrorHandler()' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:284: warning: function 'virtual void log4cplus::Appender::setLayout(std::auto_ptr<log4cplus::Layout>)' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:294: warning: function 'virtual log4cplus::Layout* log4cplus::Appender::getLayout()' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:95: warning: function 'virtual void log4cplus::OnlyOnceErrorHandler::error(const log4cplus::tstring&)' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:84: warning: function 'virtual log4cplus::ErrorHandler::~ErrorHandler()' is defined after prior declaration as dllimport: attribute ignored
appender.cxx:84: warning: function 'virtual log4cplus::ErrorHandler::~ErrorHandler()' is defined after prior declaration as dllimport: attribute ignored
appender.cxx: In destructor `log4cplus::ErrorHandler::~ErrorHandler()':
appender.cxx:85: internal compiler error: in rest_of_handle_final, at toplev.c:2067
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The command line used was:
g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cplus -I../include -Wall -D_REENTRANT -g -O2 -c appender.ii -DDLL_EXPORT -DPIC -o .libs/appender.o
This is similar to what a simple "./configure" yielded.

Please find the lengthy preprocessed source attached.
Comment 1 Philipp Bachmann 2008-04-09 10:04:37 UTC
Created attachment 15452 [details]
Preprocessed source file, first chunk

Generated from original log4cplus-1.0.2 distribution, configured using just "./configure", copying and modifying the g++ call originating from the call to "make" like this:
cd src
g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cplus -I../include -Wall -D_REENTRANT -g -O2 -c appender.cxx -DDLL_EXPORT -DPIC -save-temps -o .libs/appender.o

Then splitted using
split --bytes=700000 appender.li
Comment 2 Philipp Bachmann 2008-04-09 10:05:13 UTC
Created attachment 15453 [details]
Preprocessed source file, second chunk
Comment 3 Philipp Bachmann 2008-04-09 10:05:40 UTC
Created attachment 15454 [details]
Preprocessed source file, third chunk
Comment 4 Richard Biener 2008-04-09 13:01:31 UTC
Sorry, but the oldest GCC version still maintained is GCC 4.1.2 though I suggest
to at least try GCC 4.2.x which will even get further updates.