Error in compiling QT-5.0 on ubuntu linux



  • Hi Team

    I am new to QT and Forum. Error is coming, while compiling QT-5.0 on ubuntu linux os. Error is mentioned below, please provide any pointer, how to fix it. The commands I executed are:

    $./configure -developer-build -opensource
    $make

    ../../../include/QtGui/../../src/gui/painting/qpainter.h:127:14: note: QPainter::QPainter(QPaintDevice*)
    ../../../include/QtGui/../../src/gui/painting/qpainter.h:127:14: note: no known conversion for argument 1 from ‘QOpenGLPaintDevice*’ to ‘QPaintDevice*’
    ../../../include/QtGui/../../src/gui/painting/qpainter.h:126:5: note: QPainter::QPainter()
    ../../../include/QtGui/../../src/gui/painting/qpainter.h:126:5: note: candidate expects 0 arguments, 1 provided
    openglwindow.cpp: In member function ‘void OpenGLWindow::renderNow()’:
    openglwindow.cpp:137:44: error: invalid use of incomplete type ‘struct QOpenGLContext’
    ../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘struct QOpenGLContext’
    openglwindow.cpp:138:18: error: invalid use of incomplete type ‘struct QOpenGLContext’
    ../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘struct QOpenGLContext’
    openglwindow.cpp:139:18: error: invalid use of incomplete type ‘struct QOpenGLContext’
    ../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘struct QOpenGLContext’
    openglwindow.cpp:144:14: error: invalid use of incomplete type ‘struct QOpenGLContext’
    ../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘struct QOpenGLContext’
    openglwindow.cpp:147:35: error: ‘initializeOpenGLFunctions’ was not declared in this scope
    openglwindow.cpp:153:14: error: invalid use of incomplete type ‘struct QOpenGLContext’
    ../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘struct QOpenGLContext’
    make[4]: *** [.obj/debug-shared/openglwindow.o] Error 1
    make[4]: Leaving directory /home/qt-everywhere-opensource-src-5.0.0/qtbase/examples/gui/openglwindow' make[3]: *** [sub-openglwindow-make_first] Error 2 make[3]: Leaving directory/home/qt-everywhere-opensource-src-5.0.0/qtbase/examples/gui'
    make[2]: *** [sub-gui-make_first] Error 2
    make[2]: Leaving directory /home/qt-everywhere-opensource-src-5.0.0/qtbase/examples' make[1]: *** [sub-examples-make_first] Error 2 make[1]: Leaving directory/home/qt-everywhere-opensource-src-5.0.0/qtbase'
    make: *** [module-qtbase-make_first] Error 2


  • Moderators

    Please refer to this "tutorial":http://qt-project.org/wiki/Building_Qt_5_from_Git. You need to install dependencies before compiling.

    Where did you take the code from (git, SDK, tarball, zip archive)?



  • Thanks for quick reply.
    I have taken the tarball - qt-everywhere-opensource-src-5.0.0.tar.gz



  • Hi

    Previously I compiled with configure option:
    $./configure -developer-build -opensource -- Error are mentioned in previous mail

    But as refered in the document, I compiled with the configure option:
    $ ./configure -developer-build -opensource -nomake examples -nomake tests

    Now the error, which are coming is mentioned below. Please provide some pointer, I am not getting, which dependency is missing

    /home/GMax/qt-everywhere-opensource-src-5.0.0/qtbase/include/QtQuick/5.0.0/QtQuick/private/../../../../../../qtdeclarative/src/quick/scenegraph/qsgcontext_p.h:97:57: error: ‘GLuint’ has not been declared
    In file included from scenegraph/coreapi/qsgdefaultrenderer_p.h:45:0,
    from scenegraph/coreapi/qsgdefaultrenderer.cpp:45:
    scenegraph/coreapi/qsgrenderer_p.h:70:1: error: expected class-name before ‘{’ token
    scenegraph/coreapi/qsgrenderer_p.h:174:5: error: ‘QOpenGLShaderProgram’ does not name a type
    scenegraph/coreapi/qsgrenderer_p.h:210:28: error: field ‘GLuint’ has incomplete type
    scenegraph/coreapi/qsgrenderer_p.h:213:5: error: ‘GLuint’ does not name a type
    scenegraph/coreapi/qsgdefaultrenderer.cpp: In member function ‘virtual void QSGDefaultRenderer::render()’:
    scenegraph/coreapi/qsgdefaultrenderer.cpp:175:17: error: ‘GL_ONE’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:175:25: error: ‘GL_ONE_MINUS_SRC_ALPHA’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:175:47: error: ‘glBlendFunc’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:176:15: error: ‘GL_BLEND’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:176:23: error: ‘glDisable’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:178:32: error: ‘GL_CW’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:178:40: error: ‘GL_CCW’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:178:46: error: ‘glFrontFace’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:179:15: error: ‘GL_CULL_FACE’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:181:14: error: ‘GL_DEPTH_TEST’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:181:27: error: ‘glEnable’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:182:21: error: ‘glDepthMask’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:183:17: error: ‘GL_LESS’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:183:24: error: ‘glDepthFunc’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:187:19: error: ‘glClearDepth’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:190:15: error: ‘GL_SCISSOR_TEST’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:191:109: error: ‘glClearColor’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:204:80: error: ‘glViewport’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp:209:15: error: ‘GL_STENCIL_TEST’ was not declared in this scope
    scenegraph/coreapi/qsgdefaultrenderer.cpp: In member function ‘void QSGDefaultRenderer::renderNodes(QSGNode* const*, int)’:


  • Moderators

    Most likely OpenGL. Install Mesa or proprietary nVidia/ATI driver.



  • hii I got a problem in installing qt5 in linux...
    Can any one help me..


  • Moderators

    [quote author="santhosh" date="1357540123"]hii I got a problem in installing qt5 in linux...
    Can any one help me..[/quote]

    You need to tell us much more than that + it would be nice if you didn't hijack someone's else topic. What errors do you get, which distro are you using, which Qt5 package are you attempting to install/ compile, etc.



  • im using latest version i.e qt5....
    in which I got some errors while installing it.

    Iam new to QT so I need to develop a project using QT. And one more
    thing is that I need to do it in LINUX platform .Iam totally confused
    of where to write the code, where to execute the code wether in
    terminal or in QT itself.
    And I have one more doubt when we open a new window it shows different
    options like c++ project,main source prog etc.... My doubt is that
    wether the source code is enough or we need to add the c++ main source
    code present in the options window.
    Please help me......
    I dont have any source


  • Moderators

    [quote author="santhosh" date="1357636361"]in which I got some errors while installing it.[/quote]

    How else can I phrase my request for you to understand that some errors is not enough? When you say that, I simply have no idea what went wrong on your side... so I can't help, even though I do want to.

    [quote]Iam totally confused
    of where to write the code, where to execute the code wether in
    terminal or in QT itself.[/quote]

    Yeah, that can happen in the beginning. First, you need to differentiate between Qt libraries (a set of headers, libs, code generators and tools that makes c++ cool, shiny and awesome) and Qt Creator (an IDE that makes creating Qt applications easy). For a beginner (and for most experts, too), it's probably best to start by installing Qt libs, then Qt Creator, and writing code in QtC. It's really splendid tool, I personally find it to be the best IDE ever ;)

    You can write code in any text editor, and run it from terminal if you wish, though. I just would not recommend it if you are a newbie - might be a bit too hard at first.

    [quote]And I have one more doubt when we open a new window it shows different
    options like c++ project,main source prog etc…. My doubt is that
    wether the source code is enough or we need to add the c++ main source
    code present in the options window.[/quote]

    Although Qt makes c++ development easier, and allows to skip some parts of the language, main() function is still needed. Without it the compiler/ linker will not know how to put the thing together, and where it should be run.

    Hope this helps a bit. Ask more if you need to, but please make your questions specific.



  • hii everybody I'm trying to install qt in linux operating system.It is showing an error
    ""floating point error""...
    I have one more doubt in linux by default there is a qt tool in programming tools.
    can we use that tool,is that tool is same as the qt tool...
    i have tried with that tool it is showing an error that "" unable to execute qmake file''



  • Can u provide me the complete installation steps for installing qt in linux-redhat 5.5 version



  • hi im trying to install qt4.8.4 version in linux(redhat5.5) os.
    firstly i opened terminal,moved to the location of the qt folder.
    then i entered ./configure command .
    It has done with its configuration.
    Then i enterd gmake command it took several hours to comlete..
    after that i entered gmake install command.
    i got error like this
    """user@localhost qt-everywhere-opensource-src-4.8.4]$ gmake installcd src/tools/bootstrap/ && gmake -f Makefile install
    gmake[1]: Entering directory /home/user/Desktop/qt-everywhere-opensource-src-4.8.4/src/tools/bootstrap' gmake[1]: Nothing to be done forinstall'.
    gmake[1]: Leaving directory /home/user/Desktop/qt-everywhere-opensource-src-4.8.4/src/tools/bootstrap' cd src/tools/moc/ && gmake -f Makefile install gmake[1]: Entering directory/home/user/Desktop/qt-everywhere-opensource-src-4.8.4/src/tools/moc'
    mkdir: cannot create directory /usr/local/Trolltech': Permission denied gmake[1]: *** [install_target] Error 1 gmake[1]: Leaving directory/home/user/Desktop/qt-everywhere-opensource-src-4.8.4/src/tools/moc'
    gmake: *** [sub-moc-install_subtargets-ordered] Error 2"""

    One more thing is that when i tried to install qt-creator it is giving an error like this
    ""[user@localhost Desktop]$ t-creator-linux-x86-opensource-2.6.1.bin
    bash: t-creator-linux-x86-opensource-2.6.1.bin: command not found
    [user@localhost Desktop]$ chmod u+x qt-creator-linux-x86-opensource-2.6.1.bin
    [user@localhost Desktop]$ ./qt-creator-linux-x86-opensource-2.6.1.bin
    ./qt-creator-linux-x86-opensource-2.6.1.bin: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.9' not found (required by ./qt-creator-linux-x86-opensource-2.6.1.bin) ./qt-creator-linux-x86-opensource-2.6.1.bin: /usr/lib/libstdc++.so.6: versionGLIBCXX_3.4.11' not found (required by ./qt-creator-linux-x86-opensource-2.6.1.bin)
    ./qt-creator-linux-x86-opensource-2.6.1.bin: /lib/libc.so.6: version GLIBC_2.9' not found (required by ./qt-creator-linux-x86-opensource-2.6.1.bin) ./qt-creator-linux-x86-opensource-2.6.1.bin: /lib/libc.so.6: versionGLIBC_2.10' not found (required by ./qt-creator-linux-x86-opensource-2.6.1.bin)
    ./qt-creator-linux-x86-opensource-2.6.1.bin: /lib/libc.so.6: version GLIBC_2.11' not found (required by ./qt-creator-linux-x86-opensource-2.6.1.bin) ./qt-creator-linux-x86-opensource-2.6.1.bin: /lib/libc.so.6: versionGLIBC_2.7' not found (required by ./qt-creator-linux-x86-opensource-2.6.1.bin)""\

    so please help me...
    rectify my problem...


  • Moderators

    Qt installs to root directories, you need to run it with sudo:
    @
    sudo make install
    @

    As for QtC - either provide that library version, or compile QtC yourself.



  • when i install QT ".run" file in linux it is showing this error

    ""[user@localhost Desktop]$ ./qt-linux-opensource-5.0.1-x86-offline.run
    ./qt-linux-opensource-5.0.1-x86-offline.run: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.9' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run) ./qt-linux-opensource-5.0.1-x86-offline.run: /usr/lib/libstdc++.so.6: versionGLIBCXX_3.4.11' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run)
    ./qt-linux-opensource-5.0.1-x86-offline.run: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.15' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run) ./qt-linux-opensource-5.0.1-x86-offline.run: /lib/libc.so.6: versionGLIBC_2.9' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run)
    ./qt-linux-opensource-5.0.1-x86-offline.run: /lib/libc.so.6: version GLIBC_2.10' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run) ./qt-linux-opensource-5.0.1-x86-offline.run: /lib/libc.so.6: versionGLIBC_2.11' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run)
    ./qt-linux-opensource-5.0.1-x86-offline.run: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./qt-linux-opensource-5.0.1-x86-offline.run)
    what is this error???
    Please rectify my problem


  • Moderators

    Precompiled package is compiled on Ubuntu. There might be library naming clashes. Compile the stuff yourself or symlink the libraries to cheat the package.



  • Hi everybody I got some errors while installing qt4.7.0 version in redhat linux 5.5 version...
    Firstly i have copied all the files into a folder and moved to that folder using terminal.
    Over their I gave a command "./configure"
    Then all the configuration files are executed.
    Then after I gave "gmake" command
    It gave a error like this:
    [user@localhost qt-everywhere-opensource-src-4.7.0]$ gmake
    cd src/tools/bootstrap/ && /home/user/Desktop/qt\ installation/qt-everywhere-opensource-src-4.7.0/qt-everywhere-opensource-src-4.7.0/bin/qmake /home/user/Desktop/qt installation/qt-everywhere-opensource-src-4.7.0/qt-everywhere-opensource-src-4.7.0/src/tools/bootstrap/bootstrap.pro -spec ../../../mkspecs/linux-g++ -o Makefile
    Cannot find file: /home/user/Desktop/qt.
    Cannot find file: installation/qt-everywhere-opensource-src-4.7.0/qt-everywhere-opensource-src-4.7.0/src/tools/bootstrap/bootstrap.pro.
    gmake: *** [src/tools/bootstrap/Makefile] Error 2

    When I give ""gmake install "" command
    It gave errors like this

    [user@localhost qt-everywhere-opensource-src-4.7.0]$ gmake install
    cd src/tools/bootstrap/ && /home/user/Desktop/qt\ installation/qt-everywhere-opensource-src-4.7.0/qt-everywhere-opensource-src-4.7.0/bin/qmake /home/user/Desktop/qt installation/qt-everywhere-opensource-src-4.7.0/qt-everywhere-opensource-src-4.7.0/src/tools/bootstrap/bootstrap.pro -spec ../../../mkspecs/linux-g++ -o Makefile
    Cannot find file: /home/user/Desktop/qt.
    Cannot find file: installation/qt-everywhere-opensource-src-4.7.0/qt-everywhere-opensource-src-4.7.0/src/tools/bootstrap/bootstrap.pro.
    gmake: *** [src/tools/bootstrap/Makefile] Error 2

    Please rectify my problem as soon as possible...


  • Moderators

    Which package have you downloaded?



  • qt‐everywhere‐opensource‐src‐4.7.0


  • Moderators

    Tarball or zip?



  • actually it was tarball but it was unable to unzip those file in linux so i have unzipped those files in windows and copied back into linux and installed


  • Moderators

    Either a broken download or some nasty Windows conversion bug, it would seem.

    This should extract the archive. If it fails, check the checksums, maybe your download is bad:
    @
    tar -xaf qt‐everywhere‐opensource‐src‐4.7.0.tar.gz
    @



  • ya i have tried this but it is saying that ""permission denined""....
    Then i have changed the permissions using chmod command....
    After this some unzip process went on and i didnt find the extracted file and it is saying that
    ""nothing is changed""



  • qt creator was installed successfully but there was some problem with gmake


  • Moderators

    it extracts to a directory named the same as the tarball.



  • Will be their any problem with Operating System



  • I didnt find any such file or folder


  • Moderators

    I don't think so. RedHat is a big distro, I've never heard people having trouble running Qt there.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.