Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt compile error : glib/galloca.h not found in glib-2.0/glib.h
Forum Updated to NodeBB v4.3 + New Features

Qt compile error : glib/galloca.h not found in glib-2.0/glib.h

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 1.2k 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.
  • R Offline
    R Offline
    Ratataplam
    wrote on last edited by Ratataplam
    #1

    I've the following error during Qt compiling phase :

    In file included from ../test_ble2/main.cpp:12: /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib.h:30:10: fatal error: glib/galloca.h: No such file or directory 30 | #include <glib/galloca.h>

    compilation terminated. make: *** [Makefile:723: main.o] Error 1

    looking for *.h and I found it on the board so the problem seems in *.pro file :

    QT += quick
    
    LIBS += -lbluetooth
    LIBS += -lpython3
    LIBS += -llibglib-2.0
    SOURCES += \        
        main.cpp
    RESOURCES += qml.qrc
    
    QML_IMPORT_PATH =
    QML_DESIGNER_IMPORT_PATH =
    
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    packagesExist(glib-2.0) {
    CONFIG += link_pkgconfig
    PKGCONFIG += glib-2.0
    }
    
    HEADERS += \            
            include/gattlib.h
    unix:!macx: LIBS += -L$$PWD/lib/ -lgattlib
    INCLUDEPATH += $$PWD/include
    DEPENDPATH += $$PWD/include
    

    but I' dont fix it, any suggestion?

    The platform is yocto for imx8.

    Any suggestion? Thanks in advance

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

      Hi,

      Check the exact path where that file can be found and then update INCLUDEPATH to contain it as well. There might something like "some_path/glib-2.0/include" missing.

      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
      • R Offline
        R Offline
        Ratataplam
        wrote on last edited by
        #3

        Hello,

        I've checked and ...galloca.h is under :

        /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib/
        

        so in *.pro file I've added

        INCLUDEPATH += /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib/
        

        but the build fail again

        jsulmJ 1 Reply Last reply
        0
        • R Ratataplam

          Hello,

          I've checked and ...galloca.h is under :

          /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib/
          

          so in *.pro file I've added

          INCLUDEPATH += /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib/
          

          but the build fail again

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

          @Ratataplam glib/galloca.h is not found, so you have to add /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0

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

          1 Reply Last reply
          1
          • R Offline
            R Offline
            Ratataplam
            wrote on last edited by
            #5

            @jsulm said in Qt compile error : glib/galloca.h not found in glib-2.0/glib.h:

            /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0

            Thanks ! Solved

            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