简体   繁体   中英

Seg fault when trying to compile PhantomJS from source on CentOS 7

I've been letting PhantomJS compile from source for about 20 minutes now and then this happened.

This is on CentOS 7.

I followed the instructions here: http://phantomjs.org/build.html

Commands I ran:

git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 2.0
./build.sh

Last lines of output and the error:

g++ -pipe -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_ENABLE_HARFBUZZ_NG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.3.0 -I../../include/QtGui/5.3.0/QtGui -Iimage -I../3rdparty/harfbuzz-ng/include -I../../include/QtCore/5.3.0 -I../../include/QtCore/5.3.0/QtCore -I../../include/QtCore -I.moc -x c++-header -c kernel/qt_gui_pch.h -o .pch/Qt5Gui.gch/c++
g++ -c -pipe -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_ENABLE_HARFBUZZ_NG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -mssse3 -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.3.0 -I../../include/QtGui/5.3.0/QtGui -Iimage -I../3rdparty/harfbuzz-ng/include -I../../include/QtCore/5.3.0 -I../../include/QtCore/5.3.0/QtCore -I../../include/QtCore -I.moc image/qimage_ssse3.cpp -o .obj/qimage_ssse3.o
g++ -c -pipe -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_ENABLE_HARFBUZZ_NG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -mssse3 -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.3.0 -I../../include/QtGui/5.3.0/QtGui -Iimage -I../3rdparty/harfbuzz-ng/include -I../../include/QtCore/5.3.0 -I../../include/QtCore/5.3.0/QtCore -I../../include/QtCore -I.moc painting/qdrawhelper_ssse3.cpp -o .obj/qdrawhelper_ssse3.o
g++ -c -pipe -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_ENABLE_HARFBUZZ_NG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.3.0 -I../../include/QtGui/5.3.0/QtGui -Iimage -I../3rdparty/harfbuzz-ng/include -I../../include/QtCore/5.3.0 -I../../include/QtCore/5.3.0/QtCore -I../../include/QtCore -I.moc image/qimage_compat.cpp -o .obj/qimage_compat.o
g++ -c -include .pch/Qt5Gui -pipe -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_ENABLE_HARFBUZZ_NG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.3.0 -I../../include/QtGui/5.3.0/QtGui -Iimage -I../3rdparty/harfbuzz-ng/include -I../../include/QtCore/5.3.0 -I../../include/QtCore/5.3.0/QtCore -I../../include/QtCore -I.moc -o .obj/qaccessible.o accessible/qaccessible.cpp

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [.obj/qaccessible.o] Error 4
make[2]: Leaving directory `/var/www/clicks/phantomjs/src/qt/qtbase/src/gui'
make[1]: *** [sub-gui-make_first] Error 2
make[1]: Leaving directory `/var/www/clicks/phantomjs/src/qt/qtbase/src'
make: *** [sub-src-make_first] Error 2

在此处输入图片说明

Then I upgraded to 1 GB of RAM to see if that was the issue, but it seems that did not help.

在此处输入图片说明

If I'm missing any important info, let me know where I can find it.

Per the PhantomJS Build instructions, you need at least 4GB of ram:

Hardware requirements

RAM: at least 4 GB

Disk space: at least 3 GB

CPU: 1.8 GHz, 4 cores or more

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM