Bug 734175

Summary: Internal Segmentation Fault when building Qt.4.7.x on Redhat
Product: Red Hat Enterprise Linux 5 Reporter: sylvain.subileau
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-tools
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 5.1CC: bugzilla, diane.dezelicourt, jquinsey, robin
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-21 08:27:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description sylvain.subileau 2011-08-29 11:53:33 EDT
Description of problem:

During the Build process of Qt4.7.3 on my Workstation I get the following
an internal compiler. Segementation Fault.
The version of gcc is :
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

Version-Release number of selected component (if applicable):

How reproducible:
extract the tar from http://qt.nokia.com/downloads/linux-x11-cpp
start the configure script and make
Steps to Reproduce:

 mkdir $HOME/build/qt
 cd $HOME/build/qt
 tar zxf qt-everywhere-opensource-src-4.7.3.tar.gz
 ln -s qt* 4.7
 cd qt*
 ./configure -opengl -developer-build

Actual results:

g++ -c -include .pch/debug-shared/QtCore -m64 -pipe -pthread -I/usr/include/glib-2.0 -I/usr/lib64/gli                         b-2.0/include -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHA                         RED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_                         SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/                         lib64/ld-linux-x86-64.so.2\" -DQLIBRARYINFO_EPOCROOT -DHB_EXPORT=Q_CORE_EXPORT -DQT_HAVE_MMX -DQT_HAV                         E_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -D_LARGEFILE64_S                         OURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-64 -I. -I../../include -I../../include/QtCore -I.                         rcc/debug-shared -Iglobal -I../../tools/shared -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdp                         arty/md4 -I.moc/debug-shared -o .obj/debug-shared/qlibraryinfo.o global/qlibraryinfo.cpp
../../include/QtCore/../../src/corelib/tools/qstringbuilder.h: In member function ‘QStringBuilder<QSt                         ring, QString>::operator QString() const’:
../../include/QtCore/../../src/corelib/tools/qstringbuilder.h:130: internal compiler error: Segmentat                         ion fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [.obj/debug-shared/qlibraryinfo.o] Error 1

Expected results:

Build Process without error.

Additional info: here is the source of line 130 in the qstringbuilder.h file.

template <>
class QStringBuilder <QString, QString>
        QStringBuilder(const QString &a_, const QString &b_) : a(a_), b(b_) {}

        operator QString() const
        { QString r(a); r += b; return r; }
        QByteArray toLatin1() const { return QString(*this).toLatin1(); }

        const QString &a;
        const QString &b;
Comment 1 Toralf 2011-09-21 03:18:45 EDT
I have the same problem, more or less - the crash occurs at a different spot. Or two different ones, actually:

g++ -c -include .pch/release-shared/QtCore -pipe -I/usr/include/mysql -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DQLIBRARYINFO_EPOCROOT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../../tools/shared -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -o .obj/release-shared/qfsfileengine.o io/qfsfileengine.cpp
io/qsettings.cpp: In constructor 'QConfFileSettingsPrivate::QConfFileSettingsPrivate(QSettings::Format, QSettings::Scope, const QString&, const QString&)':
io/qsettings.cpp:1216: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

g++ -c -include .pch/release-shared/QtCore -pipe -I/usr/include/mysql -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DQLIBRARYINFO_EPOCROOT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../../tools/shared -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -o .obj/release-shared/qpluginloader.o plugin/qpluginloader.cpp
g++ -c -include .pch/release-shared/QtCore -pipe -I/usr/include/mysql -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DQLIBRARYINFO_EPOCROOT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../../tools/shared -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -o .obj/release-shared/qfactoryloader.o plugin/qfactoryloader.cpp
plugin/qfactoryloader.cpp: In member function 'void QFactoryLoader::update()':
plugin/qfactoryloader.cpp:203: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

Similar problems occur with qt-everywhere-opensource-src-4.7.4.tar.gz.

This started happening after the most recent compiler update.
Comment 2 Jakub Jelinek 2011-09-21 03:32:19 EDT
Please attach preprocessed testcase on which it can be reproduced.
You need to disable PCH (try removing that -include .pch/release-shared/QtCore
and see whether it still segfaults), add -save-temps and attach qfactoryloader.ii it creates.
Comment 3 Toralf 2011-09-21 07:08:21 EDT
Excuse me for being a bit blunt, but are you asking because you couldn't reproduce the problem with the suggested build, but if you didn't bother to try?
Comment 4 Toralf 2011-09-21 07:12:04 EDT
That should be "*because* you didn't bother to try", of course... I mean, I don't think it's too much to ask for a package maintainer to try the original steps for reproduction before asking for info here, even though the problem is not quite as isolated as one might want in an ideal world.
Comment 5 Jakub Jelinek 2011-09-21 07:19:35 EDT
I'm asking that from all bugreporters, see e.g. http://gcc.gnu.org/bugs.html for more detailed bugreporting instructions.  Generating preprocessed source is quite easy when you have the setup where you can reproduce the problem, and ensures that it is easily reproduceable everywhere.  The compiler crash may and often does on many other packages you've installed (headers), and to reproduce one would need to match your exact environment (which you haven't even specified in detail).
Comment 6 Toralf 2011-09-21 09:34:56 EDT
Well, I suspected as much, but I don't agree with that policy. The fist response to a bug report should never be an "automatic" answer IMO, you should always try to reproduce based on the information already provided first.

But I'm not the one who actuall entered this report...
Comment 7 Jakub Jelinek 2011-10-21 08:27:22 EDT

*** This bug has been marked as a duplicate of bug 735304 ***
Comment 8 Robin 2011-10-22 20:18:05 EDT
This also happens in 32 bit i386 version.  Note that the .pch/debug-shared/ directory is empty.