Results 1 to 4 of 4

Thread: Building Qt 5.7 on Ubuntu 14.04

  1. #1
    Join Date
    Jun 2012
    Posts
    38
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Building Qt 5.7 on Ubuntu 14.04

    Dear Guros,

    I have been trying to build the Qt 5.7 for my Ubuntu Linux 14.04 client, but I have encountered several problems in doing so.

    Here the steps that I have done:

    Qt Code:
    1. sudo apt-get build-dep qt5-default
    2. sudo apt-get install libxcb-xinerama0-dev
    3.  
    4. sudo apt-get install build-essential perl python git
    5. sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev
    6.  
    7. sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby
    8. sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libcap-dev libxtst-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libxss-dev libegl1-mesa-dev gperf bison
    9. sudo apt-get install libbz2-dev libgcrypt11-dev libdrm-dev libcups2-dev libatkmm-1.6-dev
    10. sudo apt-get install libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
    11.  
    12. sudo add-apt-repository ppa:gstreamer-developers/ppa
    13. sudo apt-get update
    14. sudo apt-get install gstreamer1.0*
    To copy to clipboard, switch view to plain text mode 


    checkout Qt5.7


    Qt Code:
    1. mkdir qt_build
    2. cd qt_build
    3. git clone https://code.qt.io/qt/qt5.git
    4. cd qt5
    5. git checkout v5.7.0
    6. git submodule update --init
    To copy to clipboard, switch view to plain text mode 

    Configuring and Building QT


    Qt Code:
    1. ./configure -I /home/jan/unixODBC/include \
    2. -L /home/jan/unixODBC/lib \
    3. -plugin-sql-odbc \
    4. -prefix /opt/Qt5.7.0 \
    5. -plugin-sql-sqlite \
    6. -nomake examples -nomake tests \
    7. -developer-build -opensource \
    8. -confirm-license
    To copy to clipboard, switch view to plain text mode 

    and finally:

    Qt Code:
    1. make -j4
    2. sudo make install
    To copy to clipboard, switch view to plain text mode 


    So note, I am building without the examples!

    I get as far as this;

    Qt Code:
    1. ...
    2. ...
    3. CII=1 -DQT_STRICT_ITERATORS -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ qabstractgallery.h -o .obj/header_qabstractgallery.o
    4. In file included from qabstractgallery.h:45:0:
    5. ./qgalleryabstractrequest.h:96:74: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
    6. explicit QGalleryAbstractRequest(RequestType type, QObject *parent = 0);
    7. ^
    8. ./qgalleryabstractrequest.h:96:74: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
    9. ./qgalleryabstractrequest.h:97:102: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
    10. explicit QGalleryAbstractRequest( QAbstractGallery *gallery, RequestType type, QObject *parent = 0);
    11. ^
    12. ./qgalleryabstractrequest.h:97:102: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
    13. qabstractgallery.h:55:40: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
    14. QAbstractGallery(QObject *parent = 0);
    15. ^
    16. qabstractgallery.h:55:40: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
    17. cc1plus: all warnings being treated as errors
    18. make[3]: *** [.obj/header_qabstractgallery.o] Error 1
    19. make[3]: Leaving directory `/home/jan/Qt_git/qt5/qtdocgallery/src/gallery'
    20. make[2]: *** [sub-gallery-install_subtargets-ordered] Error 2
    21. make[2]: Leaving directory `/home/jan/Qt_git/qt5/qtdocgallery/src'
    22. make[1]: *** [sub-src-install_subtargets] Error 2
    23. make[1]: Leaving directory `/home/jan/Qt_git/qt5/qtdocgallery'
    24. make: *** [module-qtdocgallery-install_subtargets] Error 2
    To copy to clipboard, switch view to plain text mode 


    Has anyone here successfully build Qt5.7 on Ubuntu 14.04, if yes please let me know what I could be doing wrong.

    Thank you for any help you might provide me with.


    I Should add that I have a Qt.5.4 running on the same machine, so environment so my path is pointing to the Qt5.4 installation I have.
    Last edited by gig-raf; 29th July 2016 at 11:34.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Building Qt 5.7 on Ubuntu 14.04

    It seems that the chosen build flags don't quite match the code.

    Qt 5.7 is now officially using some bits of the newer C++ standards, it seems nullptr being one of them, so a compiler error is generted for using 0 instead of nullptr.

    However, this qtdocgallery sub module, whatever that is, seems to be not inline with that policy yet.

    Maybe you can exclude it through configure as well.

    Or try a non-developer build, it might have more agressive error options than the normal build.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    gig-raf (16th August 2016)

  4. #3
    Join Date
    Jun 2012
    Posts
    38
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Building Qt 5.7 on Ubuntu 14.04

    Thanks!. I have changed the *parent =0 to *parent=nullptr

    I am now try to build all again. I will report back "soon".

    cheers!

  5. #4
    Join Date
    Jun 2012
    Posts
    38
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Building Qt 5.7 on Ubuntu 14.04

    In the end the problem was a problem with my Vbox. I had 3D acceleration turned on. When turned off all the openGL errors vanished and I could finally build and run the examples and my own code via qtcreator again.


    Thanks for the help!

Similar Threads

  1. Replies: 4
    Last Post: 16th September 2015, 15:57
  2. Error building Qt5.0.01 on Ubuntu 12.10 with no-opengl flag
    By TorAn in forum Installation and Deployment
    Replies: 0
    Last Post: 22nd March 2013, 11:24
  3. Building Qt4.6.2 for OMAP3530 (BEAGLEBOARD) OpenGL for ubuntu-lucid
    By t.otsuki in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 21st April 2010, 17:17
  4. Qt 4 ver. for Ubuntu 8.04.1(problems building Stellarium)
    By Henry W. Peters in forum Installation and Deployment
    Replies: 2
    Last Post: 7th December 2008, 16:31
  5. Issues building 4.3.2 x11 shared version on Ubuntu 7.10
    By rickbsgu in forum Installation and Deployment
    Replies: 6
    Last Post: 11th December 2007, 02:44

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.