January 17, 2012

vivek.narvekar vivek.narvek..
Lab Rat
37 posts

Building Qt 4.8.0 on Redhat linux

Page  
1

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
gmake2: 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
gmake2: *** [.obj/release-static/YarrInterpreter.o] Error 1
gmake2: Leaving directory `/scratch/vnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore’
gmake1: *** [sub-JavaScriptCore-JavaScriptCore-pro-make_default-ordered] Error 2
gmake1: 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

16 replies

January 18, 2012

ludde ludde
Ant Farmer
325 posts

Do you need WebKit? If not, you can add the configure flag -no-webkit, and Qt will be compiled without WebKit, hopefully avoiding the problem.

January 18, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

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

 Signature 

God is Real unless explicitly declared as Integer.

January 18, 2012

vivek.narvekar vivek.narvek..
Lab Rat
37 posts

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

February 16, 2012

Weilly Weilly
Lab Rat
32 posts

Dear all,

I have the same problem. However, I need webkit. How do I do to past the error? I can not find -Werror in /scratchvnarveka/Qt_built/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkitSource/JavaScriptCore folder.

Thanks all

February 16, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

cc1plus: warnings being treated as errors

It’s definitely Werror flag somewhere. search for it:

  1. grep -r "Werror" /path/to/qt/3rdpart/webkit/dir

You also can try to disable this warning:

warning: lowering visibility of

add -fpermessive to Project Makefile. or a better way, add

  1. 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 [gcc.gnu.org]

 Signature 

God is Real unless explicitly declared as Integer.

February 16, 2012

Weilly Weilly
Lab Rat
32 posts

Dear AcerExtensa,

Thanks! I will try it

Best regards,
Weilly

February 17, 2012

Weilly Weilly
Lab Rat
32 posts

Dear AcerExtensa,

I search for it using
grep -r “Werror” ./src/3rdparty/webkit

I 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?

February 17, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

Which version of gcc do you have?

can you post output of following cmd:

  1. gcc -v

 Signature 

God is Real unless explicitly declared as Integer.

February 17, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

Are you cross-compiling QT for mobile device?

./wtf/MathExtras.h:252: error: ‘std::isfinite’ has not been declared

Problem can be old gcc version, or <cmath> is not included.

 Signature 

God is Real unless explicitly declared as Integer.

February 17, 2012

Weilly Weilly
Lab Rat
32 posts

Yes. I use cross-compiling Qt for arm device.

1. My Deshtop PC OS:Ubuntu 10.10
2. Toolchian: arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar
3. 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-strip

QMAKE_INCDIR = /home/tslib/include QMAKE_LIBDIR = /home/tslib/lib

load(qt_config) ============================================

4. qt4.8.0 download from http://qt.nokia.com/downloads/embedded-linux-cpp

5. 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

6. gcc -v shows gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

Thank you!

February 17, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

Ok, what does following cmd says:
bq. /usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-gcc -v

cross-compiling Qt is always tricky…

look in wtf/MathExtras.h file in webkit dir and ensure what <cmath> is included if not include it

  1. #include <cmath>

recompile and post next compiler error…

 Signature 

God is Real unless explicitly declared as Integer.

February 20, 2012

Weilly Weilly
Lab Rat
32 posts

/usr/local/toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-gcc -v
shows 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite 2007q1-10)

Yes. wtf/MathExtras.h has already included
#include <cmath>

February 20, 2012

AcerExtensa AcerExtensa
Robot Herder
567 posts

can you try to compile it with at least 4.5.2 cross compiled gcc version?

 Signature 

God is Real unless explicitly declared as Integer.

February 21, 2012

Weilly Weilly
Lab Rat
32 posts

Dear AcerExtensa,

I’m trying it. Wish i works.

Thanks

Regards,
Weilly

February 21, 2012

Weilly Weilly
Lab Rat
32 posts

Dear AcerExtensa,

I use arm-none-linux-gnueabi-gcc -v 4.6.1. I works. Thank you so much.

Regards,
Weilly

Page  
1

  ‹‹ [SOLVED] Can’t create desktop app?      how to make QLabel text selectble in QStyledItemDelegate type of class ››

You must log in to post a reply. Not a member yet? Register here!