Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1650

Adding default include paths breaks build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 1.18.1
    • Toolchains: GCC
    • None
    • nix

    Description

      Qbs adds /usr/include to the list of include paths if gcc doesn't spit out anything.

      This breaks builds in scenarios like Nix, where there is no universal include path analogous to /usr/include, and therefore forcibly inserting /usr/include causes the compiler to incorrectly grab packages from host in non-sandboxed scenarios, e.g. an interactive shell exposed to the host filesystem.

      Example of bad include flags generated by Qbs due to this behaviour:

      -I/usr/include -I/nix/store/rjl15c44nfjjlzqscjyyx5xdcn2xmigk-tdlib-e1ebf743/include '-I/home/jpontaoski/kde/src/tok/src/yoinked from qt automotive' -I/nix/store/yiyaf0ccqm9jzjgbn9khq0pw8mz8x2fi-icu4c-69.1-dev/include -I/nix/store/285vgyfv97bh9d7wgam78h7jc5kn1yx0-qtdeclarative-5.15.2-dev/include -I/nix/store/285vgyfv97bh9d7wgam78h7jc5kn1yx0-qtdeclarative-5.15.2-dev/include/QtQuick -I/nix/store/285vgyfv97bh9d7wgam78h7jc5kn1yx0-qtdeclarative-5.15.2-dev/include/QtQmlModels -I/nix/store/285vgyfv97bh9d7wgam78h7jc5kn1yx0-qtdeclarative-5.15.2-dev/include/QtQml/5.15.2 -I/nix/store/285vgyfv97bh9d7wgam78h7jc5kn1yx0-qtdeclarative-5.15.2-dev/include/QtQml/5.15.2/QtQml -I/nix/store/285vgyfv97bh9d7wgam78h7jc5kn1yx0-qtdeclarative-5.15.2-dev/include/QtQml -I/nix/store/czpzcq8v439j71wxl9gqywwr4pafsz52-qtmultimedia-5.15.2-dev/include -I/nix/store/czpzcq8v439j71wxl9gqywwr4pafsz52-qtmultimedia-5.15.2-dev/include/QtMultimedia -I/nix/store/6ypchrs5rjvkrqlzm5xi8iss2s4akjgd-qtbase-5.15.2-dev/include/QtNetwork -I/nix/store/6ypchrs5rjvkrqlzm5xi8iss2s4akjgd-qtbase-5.15.2-dev/include/QtCore/5.15.2 -I/nix/store/6ypchrs5rjvkrqlzm5xi8iss2s4akjgd-qtbase-5.15.2-dev/include/QtCore/5.15.2/QtCore -I/nix/store/6ypchrs5rjvkrqlzm5xi8iss2s4akjgd-qtbase-5.15.2-dev/include/QtConcurrent -I/nix/store/pj5mizpwkg0f0xnxqasifq8bjzwi7fr1-qt-full-5.15.2/mkspecs/linux-g++ -I/home/jpontaoski/kde/src/tok/_build/default/tokInternal.1bbad5b4/qt.headers

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            appadeia Carson Black
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: