Building Qt 4.8.0 on Redhat linux
-
Hi,
I am trying to build Qt4.8.0 on Redhat linux5.4.I get following error, while building. It seems that it is related to webkit
cd JavaScriptCore/ && gmake -f Makefile.WebKit
gmake[2]: Entering directory/scratch/vnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore' g++ -c -m64 -pipe -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self -Werror -fno-stack-protector -O3 -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -D_REENTRANT -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -DBUILDING_JavaScriptCore -DBUILDING_WTF -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_SHARED -I../../../../../mkspecs/linux-g++-64 -I. -I../../../../../include/QtCore -I../../../../../include -I. -I../../Source -I../ThirdParty -Iassembler -Ibytecode -Ibytecompiler -Iheap -Idfg -Idebugger -Iinterpreter -Ijit -Iparser -Iprofiler -Iruntime -Iwtf -Iwtf/gobject -I/scratch/vnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore/wtf/symbian -Iwtf/unicode -Iyarr -IAPI -IForwardingHeaders -Igenerated -I../../Source -I../../include -I/include/QtWebKit -I/include -I.moc/release-static -o .obj/release-static/YarrInterpreter.o yarr/YarrInterpreter.cpp cc1plus: warnings being treated as errors ./wtf/PassOwnPtr.h: In instantiation of 'WTF::PassOwnPtr<JSC::Yarr::ByteDisjunction>': yarr/YarrInterpreter.h:328: instantiated from here ./wtf/PassOwnPtr.h:81: warning: lowering visibility of 'WTF::PassOwnPtr<U> WTF::adoptPtr(U*) [with U = U, T = JSC::Yarr::ByteDisjunction]' to match its type ./wtf/PassOwnPtr.h: In instantiation of 'WTF::PassOwnPtr<JSC::Yarr::BytecodePattern>': yarr/YarrInterpreter.cpp:1451: instantiated from here ./wtf/PassOwnPtr.h:81: warning: lowering visibility of 'WTF::PassOwnPtr<U> WTF::adoptPtr(U*) [with U = U, T = JSC::Yarr::BytecodePattern]' to match its type gmake[2]: *** [.obj/release-static/YarrInterpreter.o] Error 1 gmake[2]: Leaving directory
/scratch/vnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore'
gmake[1]: *** [sub-JavaScriptCore-JavaScriptCore-pro-make_default-ordered] Error 2
gmake[1]: Leaving directory `/scratch/vnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source'
gmake: *** [sub-webkit-make_default-ordered] Error 2
Has anyone faced such a problem ? I had also tried building Qt4.6.4, which builds properly without any error.
Thank you for any help
Regards
vivek -
bq. cc1plus: warnings being treated as errors
You can try to delete -Werror flag from Makefile in /scratchvnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkitSource/JavaScriptCore folder
-
Hello ludde and AcerExtensa,
Thanks a lot for responding.
@ ludde - I have already tried with -no-webkit option, while I was waiting for someone to reply here, and the builds were successful. I was just wondering If I am missing some prerequisites, because of which, I am getting build error in the standard Qt package.
@AcerExtensa -i will definitely give a try, to your suggestion
-
bq. cc1plus: warnings being treated as errors
It's definitely Werror flag somewhere. search for it:
@grep -r "Werror" /path/to/qt/3rdpart/webkit/dir@You also can try to disable this warning:
bq. warning: lowering visibility of
add -fpermessive to Project Makefile. or a better way, add
@QMAKE_CXXFLAGS = -fpermissive@
to Qt project.pro... you also need to clean config and rerun configure.Where is many way to diagnose and switch warnings in gcc. Read "this":http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Warning-Options.html
-
Dear AcerExtensa,
I search for it using
grep -r "Werror" ./src/3rdparty/webkitI just found QMAKE_CXXFLAGS += -Werror in Wenkit.pri .I remove it to configure and make. I got the errror as http://developer.qt.nokia.com/forums/viewthread/14542/
So, is there anything I miss?
-
Which version of gcc do you have?
can you post output of following cmd:
@gcc -v@ -
Are you cross-compiling QT for mobile device?
bq. ./wtf/MathExtras.h:252: error: ‘std::isfinite’ has not been declared
Problem can be old gcc version, or <cmath> is not included.
-
Yes. I use cross-compiling Qt for arm device.
- My Deshtop PC OS:Ubuntu 10.10
- Toolchian: arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar
- I modify qt-everywhere-opensource-arc-4.8.0/mkspecs/qws/linux-arm-g++/qmake.conf as below:
================================================
#qmake configuration for building with arm-linux-g++
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
#modifications to g++.conf
QMAKE_CC = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-g++
QMAKE_LFLAGS = -Wl,-rpath=/home/tslib/lib
QMAKE_LINK = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-guneabi-g++
#modifications to linux.conf
QMAKE_AR = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP = /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-stripQMAKE_INCDIR = /home/tslib/include
QMAKE_LIBDIR = /home/tslib/libload(qt_config)
-
qt4.8.0 download from http://qt.nokia.com/downloads/embedded-linux-cpp
-
My configure line: ./configure -prefix PATH -embedded arm -make tools -xplatform qws/linux-arm-g++ -v -qt-mouse-tslib -I’tslib PATH’/include -L’tslib PATH’/lib -qt-gfx-vnc
-
gcc -v shows
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
Thank you!
-
Ok, what does following cmd says:
bq. /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-gcc -vcross-compiling Qt is always tricky...
look in wtf/MathExtras.h file in webkit dir and ensure what <cmath> is included if not include it
@#include <cmath>@recompile and post next compiler error...
-
can you try to compile it with at least 4.5.2 cross compiled gcc version?
-
Happy for you :) , have fun ;)