Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

PhantomJS linux compile error #13568

Closed
cdmba1 opened this issue Sep 9, 2015 · 4 comments
Closed

PhantomJS linux compile error #13568

cdmba1 opened this issue Sep 9, 2015 · 4 comments

Comments

@cdmba1
Copy link

cdmba1 commented Sep 9, 2015

Trying to compile PhantomJS on Debian 8.1. I'm getting following error when running build.sh:

Building Qt...

cd src/ && ( test -e Makefile || /var/www/phantomjs/src/qt/qtbase/bin/qmake /var/www/phantomjs/src/qt/qtbase/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory '/var/www/phantomjs/src/qt/qtbase/src'
cd tools/bootstrap/ && ( test -e Makefile || /var/www/phantomjs/src/qt/qtbase/bin/qmake /var/www/phantomjs/src/qt/qtbase/src/tools/bootstrap/bootstrap.pro -o Makefile ) && make -f Makefile
make[2]: Entering directory '/var/www/phantomjs/src/qt/qtbase/src/tools/bootstrap'
g++ -c -pipe -ffunction-sections -O2 -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_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NO_TRANSLATION -DQT_QMAKE_LOCATION="/var/www/phantomjs/src/qt/qtbase/bin/qmake" -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_NO_CAST_FROM_ASCII -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I../../../mkspecs/linux-g++ -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -I../../../include/QtCore/5.3.0 -I../../../include/QtCore/5.3.0/QtCore -I/var/www/phantomjs/src/qt/qtbase/include/QtXml/5.3.0 -I/var/www/phantomjs/src/qt/qtbase/include/QtXml/5.3.0/QtXml -o .obj/qvariant.o ../../corelib/kernel/qvariant.cpp
{standard input}: Assembler messages:
{standard input}:18672: Warning: end of file not at end of a line; newline inserted
{standard input}:20007: Error: unknown pseudo-op: `.lhotb23'
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.9/README.Bugs for instructions.
Makefile:4678: recipe for target '.obj/qvariant.o' failed
make[2]: *** [.obj/qvariant.o] Error 4
make[2]: Leaving directory '/var/www/phantomjs/src/qt/qtbase/src/tools/bootstrap'
Makefile:54: recipe for target 'sub-bootstrap-make_first' failed
make[1]: *** [sub-bootstrap-make_first] Error 2
make[1]: Leaving directory '/var/www/phantomjs/src/qt/qtbase/src'
Makefile:39: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2

Any ideas on how to fix this?

@cdmba1 cdmba1 changed the title PhantomJS compile error PhantomJS linux compile error Sep 9, 2015
@zackw
Copy link
Contributor

zackw commented Oct 14, 2015

Sorry for the delay getting back to you about this.

g++: internal compiler error: Killed (program cc1plus)

This error message almost always means that your computer ran out of memory. A full build of PhantomJS requires roughly 4GB of RAM per CPU core, and by default it uses all the cores you have available. You can reduce the memory requirement by building like this:

./build.sh --confirm --jobs 1

... unfortunately, that will make it even slower than it already is.

@zackw zackw closed this as completed Oct 14, 2015
@zackw zackw added the Declined label Oct 14, 2015
@alexellis
Copy link

@zackw I got the same issue - I ran with 4 cores thinking this would speed things up - and it certainly did utilize most of the available processing power. I failed with this error:

../../../mkspecs/linux-g++ -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -I../../../include/QtCore/5.3.0 -I../../../include/QtCore/5.3.0/QtCore -I/home/alex/phantomjs/src/qt/qtbase/include/QtXml/5.3.0 -I/home/arm/phantomjs/src/qt/qtbase/include/QtXml/5.3.0/QtXml -o .obj/qbitarray.o ../../corelib/tools/qbitarray.cpp

g++: internal compiler error: Killed (program cc1plus)

Please submit a full bug report,

with preprocessed source if appropriate.

See <file: usr="" share="" doc="" gcc-5="" readme.bugs=""> for instructions.

Makefile:4675: recipe for target '.obj/qvariant.o' failed

make[2]: *** [.obj/qvariant.o] Error 4

make[2]: *** Waiting for unfinished jobs....

make[2]: Leaving directory '/home/arm/phantomjs/src/qt/qtbase/src/tools/bootstrap'

Makefile:54: recipe for target 'sub-bootstrap-make_first' failed

make[1]: *** [sub-bootstrap-make_first] Error 2

make[1]: Leaving directory '/home/arm/phantomjs/src/qt/qtbase/src'

Makefile:39: recipe for target 'sub-src-make_first' failed

make: *** [sub-src-make_first] Error 2

Then I tried again after a few days with a single job and got this far:

/home/alex/phantomjs/src/qt/qtbase/lib/libQt5Bootstrap.a(qjsonvalue.o): In function `QJsonValue::toVariant() const':
qjsonvalue.cpp:(.text._ZNK10QJsonValue9toVariantEv+0x46): undefined reference to `QVariant::QVariant(QList<QVariant> const&)'
qjsonvalue.cpp:(.text._ZNK10QJsonValue9toVariantEv+0x8a): undefined reference to `QVariant::QVariant(QMap<QString, QVariant> const&)'
qjsonvalue.cpp:(.text._ZNK10QJsonValue9toVariantEv+0xbe): undefined reference to `QVariant::QVariant(double)'
qjsonvalue.cpp:(.text._ZNK10QJsonValue9toVariantEv+0xc6): undefined reference to `QVariant::QVariant(bool)'
qjsonvalue.cpp:(.text._ZNK10QJsonValue9toVariantEv+0xe0): undefined reference to `QVariant::QVariant(QString const&)'
qjsonvalue.cpp:(.text._ZNK10QJsonValue9toVariantEv+0x162): undefined reference to `QVariant::QVariant(QList<QVariant> const&)'
collect2: error: ld returned 1 exit status
Makefile:137: recipe for target '../../../bin/moc' failed
make[2]: *** [../../../bin/moc] Error 1
make[2]: Leaving directory '/home/alex/phantomjs/src/qt/qtbase/src/tools/moc'
Makefile:79: recipe for target 'sub-moc-make_first' failed
make[1]: *** [sub-moc-make_first] Error 2
make[1]: Leaving directory '/home/alex/phantomjs/src/qt/qtbase/src'
Makefile:39: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2

Any thoughts?

Welcome to Ubuntu 15.10 (GNU/Linux 3.4.39 armv7l)

Linux 3.4.39 #1 SMP PREEMPT Mon Oct 12 12:02:29 CEST 2015 armv7l armv7l armv7l GNU/Linux

Thanks.

@yunqu
Copy link

yunqu commented Jul 15, 2016

@alexellis I am using the same architecture and OS as yours (Ubuntu 15.10, armv7l). Are you able to build now? Is it possible to share your prebuilt binaries?

@alexellis
Copy link

Sorry, I don't really have time at the moment. If you look at Arch Linux they build and ship this. @yunqu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants