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. Cannot compile Qt 5 on Mac OS ML
Forum Updated to NodeBB v4.3 + New Features

Cannot compile Qt 5 on Mac OS ML

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 3.9k 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.
  • P Offline
    P Offline
    pciccone
    wrote on last edited by
    #1

    Hi.
    I'm trying to compile Qt 5.0 from git on Mac OS Mountain Lion with Xcode 4.5.2 installed and the process stops with error in compiling PCRE.
    I configured the compilation with:

    /configure -developer-build -opensource -nomake examples -nomake tests -framework

    following the instructions in the http://qt-project.org/wiki/Building_Qt_5_from_Git page ( added the -framework switch )

    When running "make" I get a series of errors while compiling PCRE. The first is:

    @tools/qregularexpression.cpp:796:5: error: unknown type name 'pcre16_extra'; did you mean 'pcre_extra'?
    pcre16_extra *optimizePattern();
    ^~~~~~~~~~~~
    pcre_extra@

    Another is:

    @tools/qregularexpression.cpp:822:5: error: unknown type name 'pcre16_extra'; did you mean 'pcre_extra'?
    pcre16_extra *studyData;@

    I'll appreciate any help in this matter, thank you.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      beakergoesmeepmeep
      wrote on last edited by
      #2

      I had the same issue at first but it went away when I changed my toolchain to the Apple provided clang. Change the environment variables CC=clang and CXX=clang in /etc/launchd.conf and restart.
      They were originally set for gcc and g++

      If you need to make the CC and CXX variables persist for sudoers then you need to follow the instructions here also:

      http://craiccomputing.blogspot.co.uk/2010/10/setting-environment-variables-for-sudo.html

      After all that I get a lot further but I can't get dbus to compile and it seems to ignore the -no-dbus option and try to compile it anyway, but that's a different issue!

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pciccone
        wrote on last edited by
        #3

        Hi.
        Thank you for the suggestion but I was already compiling with clang. I applied your suggestion anyway but I got the same error at the same point.

        Cheers.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andrewrjones
          wrote on last edited by
          #4

          I'm having the same problem. Did you ever get this fixed?

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pciccone
            wrote on last edited by
            #5

            Re-tried today with Qt 5.1, Mavericks a XCode 5, still the same issue. Is it possible that nobody can give a usable workflow to compile Qt 5 on Mac?

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pciccone
              wrote on last edited by
              #6

              I found the issue. There was an older version of pcre.h in my system. It was in /opt/local/include and Qt found it and used it instead of the one included in the Qt source. Do a system-wide search and you'll be able to find the problem.

              Hope this helps.

              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