Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot build qt on linux with libc++ stdlib. fatal error: 'type_traits' file not found
QtWS25 Last Chance

Cannot build qt on linux with libc++ stdlib. fatal error: 'type_traits' file not found

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 1.2k Views
  • 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.
  • X Offline
    X Offline
    Xahon
    wrote on last edited by
    #1

    I'm trying to build qt from sources with that command:

    ./qt5/configure \
    -platform linux-clang-libc++ \
    QMAKE_CC="clang-9" \
    QMAKE_LINK_C="clang-9" \
    QMAKE_LINK_C_SHLIB="clang-9" \
    QMAKE_CXX="clang++-9" \
    QMAKE_LINK="clang++-9" \
    QMAKE_LINK_SHLIB="clang++-9" \
    QMAKE_CXXFLAGS+="-ftemplate-depth=1024"
    

    But it fails with that output

    Performing shadow build...
    Preparing build tree...
    Creating qmake...
    In file included from /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/qmake/main.cpp:30:
    In file included from /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/qmake/project.h:32:
    In file included from /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/qmake/library/qmakeevaluator.h:36:
    In file included from /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/qmake/library/qmakeparser.h:32:
    In file included from /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/qmake/library/qmake_global.h:32:
    In file included from /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/include/QtCore/qglobal.h:1:
    /home/user/conan/qt/5.15.2/my/my/source/qt5/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:45:12: fatal error: 'type_traits' file
          not found
    #  include <type_traits>
               ^~~~~~~~~~~~~
    1 error generated.
    

    I have installed libc++-9-dev and libc++abi-9-dev in my system. Path /usr/lib/llvm-9/include/c++/v1/ contains all standard lib headers (type_traits too of course). When I compiled other projects with -v flag, the path above was in the list of compiler search paths. I tried to add the same option with QMAKE_CXXFLAGS and CXXFLAGS but it doesn't "see" that. I also tried to add -I option with that path to ./configure call (as its help states it adds include search path). And I also tried to define environment variables INCLUDE and INCLUDEPATH but configure doesn't use them. All three approaches do the same thing - nothing, output is still the same

    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