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. Building Qt 4.8.2 with clang and libc++
Qt 6.11 is out! See what's new in the release blog

Building Qt 4.8.2 with clang and libc++

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 5.6k 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.
  • N Offline
    N Offline
    nna_misc
    wrote on last edited by
    #1

    Has anybody build Qt 4.8.2 with cland and libc++. I tried by modifying the linux-clang mkspec:
    @
    QMAKE_CXXFLAGS += -stdlib=libc++ -I/local/mnt/workspace/libcxx/include
    QMAKE_LFLAGS += -L/local/mnt/workspace/libcxx/build
    @

    However the compilation cant find <ext/atomicity.h> which is really the case since libcxx/include does not have that file.
    /local/mnt/workspace/ashoknn/519_libcxx_transition/Qt/src/4.8.2/qt-qt/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h:82:10: fatal error: 'ext/atomicity.h' file not found
    #include <ext/atomicity.h>
    ^
    Any clues?

    TIA

    1 Reply Last reply
    0
    • J Offline
      J Offline
      japaget
      wrote on last edited by
      #2

      Please post a little bit more information so that we can be a bit more helpful:

      1. What platform are you using? (Windows, Mac, or Linux)
      2. What is your exact operating system version? (such as Windows 7 Professional 64-bit, Mac OS X "Lion", or CentOS Linux 6.2)
      3. What version of Clang are you using?
      4. What Qt platform definition did you use to configure your build:
        -platform unsupported/macx-clang or -platform unsupported/linux-clang ?
      5. What attempts have you made to solve the problem yourself? (So we don't suggest something that you already tried and that didn't work.)

      I am a fellow Qt Developer Forum newbie. I don't know the answer to your question but am also interested in building Qt with Clang and came across your posting when I did a Google search to see if anyone had succeeded. However, I did find one site that might be helpful:

      http://philippmuenzel.de/wordpress/fun-with-clang-or-how-to-build-qt-4-8-with-clang-3-without-going-insane/

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nna_misc
        wrote on last edited by
        #3

        Here is some additional info:

        • Linux system: Ubuntu 11.04
        • Clang 3.1 release
        • platform unsupported/linux-clang used to configure

        Here is what I had to do to get it compiling with clang and libc++:

        • I had to disable QtScript and translations (-nomake translations -no-script)
        • Change corelib/tools/qiterator.h to disable forward-declaration:

        +// Forward declaration causes problem when compiling with libc++

        +#if 0

        namespace std {

         struct bidirectional_iterator_tag;
        
         struct random_access_iterator_tag;
        

        }

        +#endif

        +#include <iterator>

        Ofcourse this is assuming that you have compiled and created the softlinks mentioned on libc++ website.

        HTH

        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