Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error while make the Makefile on cross compiler on Ubuntu 14.04
Forum Updated to NodeBB v4.3 + New Features

error while make the Makefile on cross compiler on Ubuntu 14.04

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    victor wang
    wrote on last edited by victor wang
    #1

    Hi everyone, i'm using qt5.5 on my computer.
    And i got the issue while i make my Makefile.

    I will got Makefile by sending this code.

    qmake -spec ../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/devices/linux-imx6-g++/ -o Makefile test.pro
    

    It has no problem with that but when send "make " to build my program, it will show this error to me.

    arm-poky-linux-gnueabi-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -I../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/devices/linux-imx6-g++ -o main.o main.cpp
    In file included from ../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:37:0,
                     from ../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:37,
                     from ../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qmainwindow.h:37,
                     from ../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QMainWindow:1,
                     from mainwindow.h:4,
                     from main.cpp:1:
    ../../sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:39:21: fatal error: cstddef: No such file or directory
    compilation terminated.
    make: *** [main.o] Error 1
    
    

    And in the other method, i could do this command to get the Makefile too.

    qmake test.pro
    

    In this case when i make my Makefile it doing fine.
    But if i using -spec to direct to the qmake.config that i want then will get the error like above.

    I don't know why will this happened.
    I'm using the meta-toolchain-qt5 for my cross compiler.

    Did i miss anything or it is the reason that gcc version is too old?

    Please Help !

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should use the qmake that was built with your cross-compiled version of Qt. That should make things easier.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      V 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        You should use the qmake that was built with your cross-compiled version of Qt. That should make things easier.

        V Offline
        V Offline
        victor wang
        wrote on last edited by
        #3

        @SGaist
        You mean give the directly path to qmake?
        Is that mean my qmake version is too old?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          No I mean that when you are building an application with a specific version of Qt, it's always best to use the qmake built along that version of Qt. Doing so you ensure that all the defaults for your projects are already set.

          Most likely you'll be using a version of Qt that is more recent than the one provided with your Linux distribution thus having had bug fixes done.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          V 1 Reply Last reply
          0
          • SGaistS SGaist

            No I mean that when you are building an application with a specific version of Qt, it's always best to use the qmake built along that version of Qt. Doing so you ensure that all the defaults for your projects are already set.

            Most likely you'll be using a version of Qt that is more recent than the one provided with your Linux distribution thus having had bug fixes done.

            V Offline
            V Offline
            victor wang
            wrote on last edited by
            #5

            @SGaist
            Now i'm just using

            qmake test.pro
            

            instead of

            qmake -spec ...
            

            I saw a document here.
            http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#migration-1.8-default-sysroot-poisoning

            I think it is the reason why i can't do the -spec to direct the specific qmake.config.

            But i still doubt this is the right way to fix it.
            I'm not sure that using default qmake can be the cross compile too?

            jsulmJ 1 Reply Last reply
            0
            • V victor wang

              @SGaist
              Now i'm just using

              qmake test.pro
              

              instead of

              qmake -spec ...
              

              I saw a document here.
              http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#migration-1.8-default-sysroot-poisoning

              I think it is the reason why i can't do the -spec to direct the specific qmake.config.

              But i still doubt this is the right way to fix it.
              I'm not sure that using default qmake can be the cross compile too?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @victor-wang As @SGaist already said you should call qmake from your cross-built Qt!
              Like so:

              PATH_TO_CROSS_BUILT_QT/bin/qmake -spec...
              

              If you just call "qmake" you most probably call qmake from your host Qt, not cross compiled Qt.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              V 1 Reply Last reply
              0
              • jsulmJ jsulm

                @victor-wang As @SGaist already said you should call qmake from your cross-built Qt!
                Like so:

                PATH_TO_CROSS_BUILT_QT/bin/qmake -spec...
                

                If you just call "qmake" you most probably call qmake from your host Qt, not cross compiled Qt.

                V Offline
                V Offline
                victor wang
                wrote on last edited by
                #7

                @jsulm
                Actually i had already try it for like this.

                /mnt/raid115/victor/freescale/opt/fsl-imx-wayland/4.1.15/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake -spec ...
                

                And it still got the same problem.

                Is the document i gave is the reason why will show this error?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  IIRC you shouldn't need to pass the spec parameter since you are using a Qt build that should already be tailored for your device.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved