0

I try to build qtdeclarative from source code but an compilation error occured

fatal error: QtCore/private/qglobal_p.h: No such file or directory.

Below is some information about my situation

  1. OS: Ubuntu 14.04
  2. Build Steps

    • Install qt5 library

      $ sudo apt-get install qt5-default

    • Getting the qtbase source

      $ mkdir qt; cd qt

      $ git clone git://code.qt.io/qt/qtbase.git

    • Build the qtbase source

      $ export QTVER=qt5

      $ export QTDIR=/opt/qt/$QTVER

      $ export PATH=$QTDIR/bin/:$PATH

      $ export LD_LIBRARY_PATH=$QTDIR/lib/:$LD_LIBRARY_PATH

      $ export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig/:$PKG_CONFIG_PATH

      $ export QT_PLUGIN_PATH=$QTDIR/lib/plugins

      $cd qtbase

      $ ./configure -confirm-license -opensource -debug -nomake examples -nomake tests -make libs -prefix ${QTDIR}

      $ make

      $ sudo make install

      => Build success

    • Getting the qtdeclarative source

      $ cd ..

      $ mkdir qtdeclarative; cd qtdeclarative

      $ git clone git://code.qt.io/qt/qtdeclarative.git

    • Build the qtdeclarative source

      $ qmake

      $ make

==> ERROR at this step

fatal error: QtCore/private/qglobal_p.h: No such file or directory.

What did i do wrong or missing something ?

TuanPM
  • 685
  • 8
  • 29
  • Which version of Qt ? Once this issue happened in v5.8, see [this](https://bugreports.qt.io/browse/QTBUG-56044) – Raptor Jun 01 '17 at 04:29
  • @Raptor: i just clone source from git, i'm not sure about the version. Could you teach me how to check it and how to workaround this problem ? – TuanPM Jun 01 '17 at 04:43
  • 2
    If you are going to compile you should use the source code and libraries of the same version, when you run: `sudo apt-get install qt5-default` installs version 5.2, and when downloading from git is the last version 5.9, unless you change branch, to have Those problems could be installed declarative with the following command: `sudo apt-get install qtdeclarative5-dev` – eyllanesc Jun 01 '17 at 05:02

0 Answers0