(C++) cc1plus: internal compiler error: Segmentation fault

January 25, 2018 · View on GitHub

 

 

 

 

 

(C++) WtQt CreatorUbuntu cc1plus: internal compiler error: Segmentation fault

 

Compile error.

 

 

 

 

 

 

Full error message

 


In member function 'boost::signals::connection Wt::EventSignal<E>::connect(T*, void (V::*)()) [with T = HelloApplication, V = HelloApplication, E = Wt::WMouseEvent]': cc1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. make: *** [main.o] Error 1

 

 

 

 

 

Operating system(s) or programming environment(s)

 

IDE(s):

Project type:

  • console Console application

Compiler(s):

Libraries used:

  • Boost Boost: version 1.42
  • Qt Qt: version 4.7.0 (32 bit)
  • STL STL: GNU ISO C++ Library, version 4.4.5
  • Wt Wt: version 3.1.2

 

 

 

 

 

Project file

 

A default-created project file.

 


#------------------------------------------------- # # Project created by QtCreator 2010-11-18T12:10:20 # #------------------------------------------------- QT       += core QT       -= gui TARGET = CppHelloWtQtCreatorUbuntu CONFIG   += console CONFIG   -= app_bundle TEMPLATE = app SOURCES += main.cpp

 

 

 

 

 

Build log

 


Running build steps for project CppHelloWtQtCreatorUbuntu... Configuration unchanged, skipping qmake step. Starting: "/usr/bin/make" -w make: Entering directory `/home/richel/qtsdk-2010.04/bin/Projects/Website/CppHelloWtQtCreatorUbuntu-build-desktop' g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../CppHelloWtQtCreatorUbuntu -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../CppHelloWtQtCreatorUbuntu -I. -o main.o ../CppHelloWtQtCreatorUbuntu/main.cpp In member function 'boost::signals::connection Wt::EventSignal<E>::connect(T*, void (V::*)()) [with T = HelloApplication, V = HelloApplication, E = Wt::WMouseEvent]': cc1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. make: *** [main.o] Error 1 make: Leaving directory `/home/richel/qtsdk-2010.04/bin/Projects/Website/CppHelloWtQtCreatorUbuntu-build-desktop' The process "/usr/bin/make" exited with code %2. Error while building project CppHelloWtQtCreatorUbuntu (target: Desktop) When executing build step 'Make'

 

 

 

 

 

Source code

 

This source was copied literally from the Wt website (http://www.webtoolkit.eu/wt\#/src/hello).

 


 

 

 

 

 

Process

 

From http://redmine.emweb.be/boards/2/topics/1057 :

 


Richel, There is/was a bug in ubuntu's patches to gcc causing the compiler to crash on Wt: https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/647597 Unfortunately, the latest Wt release does not compile well on Ubuntu. You have two options: If you use the git version of Wt, this buggy compiler will be detected and a work-around is used. Upgrade your compiler BR, Wim.

 

 

 

 

 

Solution/workaround

 

Add the following lines to the project file:

 


LIBS += -L/usr/lib -lwt -lwthttp QMAKE_CXXFLAGS += -DNDEBUG

 

This results in the following complete project file:

 


#------------------------------------------------- # # Project created by QtCreator 2010-11-18T12:10:20 # #------------------------------------------------- QT       += core QT       -= gui TARGET = CppHelloWtQtCreatorUbuntu LIBS += -L/usr/lib -lwt -lwthttp QMAKE_CXXFLAGS += -DNDEBUG CONFIG   += console CONFIG   -= app_bundle TEMPLATE = app SOURCES += main.cpp