Bug 734175 - Internal Segmentation Fault when building Qt.4.7.x on Redhat
Summary: Internal Segmentation Fault when building Qt.4.7.x on Redhat
Status: CLOSED DUPLICATE of bug 735304
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.1
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-29 15:53 UTC by sylvain.subileau
Modified: 2012-01-07 23:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-10-21 12:27:22 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description sylvain.subileau 2011-08-29 15:53:33 UTC
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 07:18:45 UTC
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 07:32:19 UTC
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 11:08:21 UTC
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 11:12:04 UTC
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 11:19:35 UTC
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 13:34:56 UTC
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 12:27:22 UTC

*** This bug has been marked as a duplicate of bug 735304 ***

Comment 8 Robin 2011-10-23 00:18:05 UTC
This also happens in 32 bit i386 version.  Note that the .pch/debug-shared/ directory is empty.

Note You need to log in before you can comment on or make changes to this bug.