Qt 5.1.1 build: "QMAKE_MAC_SDK must be set when building on Mac"



  • Hi all,

    I repeatedly get this message during configure, having unarchived the source from "this file":http://download.qt-project.org/official_releases/qt/5.1/5.1.1/single/qt-everywhere-opensource-src-5.1.1.tar.gz.

    My environment includes the variable, exported in .bash_profile:
    @QMAKE_MAC_SDK=macosx10.8@

    and I've also tried the full path:
    @QMAKE_MAC_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk@

    My configure line is
    @./configure -opensource -nomake examples -nomake tests -shared -arch x86 -arch x86_64@
    And I've tried with the switch -sdk, set to each of the strings above too. No dice.

    As you can see I require a dual architecture build, otherwise I'd just use the precompiled version. Can anyone reproduce this or offer any help?



  • Please indulge me in a small bump. Apologies.



  • Could it be that Qt is looking for something specific into the SDK, like a subfolder or a particular configuration file?
    Try exploring the SDK folder a bit, see if any subfolder makes more sense than the main SDK folder. For example, on my Windows system, the Visual Studio SDK is installed in C:\Program Files (x86)\Microsoft Visual Studio 11.0 but the actual C++ include files (and all the stuff required for the build environment) resides in a subfolder called VC; so if I have to specify the SDK path I should set C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC



  • Thanks for posting, but no, I don't believe it's anything like that. All the configuration paths appear to be right, I just can't see how it's not reading the environment variable. I'll try and read through the script.



  • That is utterly bizarre. It works fine on another machine of much the same specs and configuration. I'll do some more investigation on my end and will post here if I can solve it.



  • This issue was solved by removing
    QMAKESPEC=/usr/local/Qt-5.0.1/mkspecs/macx-g++
    from my environment. Not totally sure how it got there.



  • where was this variable set? I have the same problem with QMAKE_MAC_SDK variable not being set. Im running on osx 10.8.5



  • In my bashrc if I recall correctly. Just echo it to see if it's set..



  • hmm, i cant find it anywhere in my environment settings :( Ive also tried to export it myself as you had, but no dice.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.