Compile error on Mac OS X Lion, Qt 4.8.1, 64 bits



  • I compile Qt 4.8.1 on Mac OS X Lion 64 bits and I get the following error:
    @g++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.5 -Xarch_x86_64 -mmacosx-version-min=10.5 -o libqcorewlanbearer_debug.dylib .obj/debug-shared/qcorewlanengine.o .obj/debug-shared/main.o .obj/debug-shared/qnetworksession_impl.o .obj/debug-shared/moc_qcorewlanengine.o .obj/debug-shared/moc_qnetworksession_impl.o .obj/debug-shared/moc_qbearerengine_impl.o -F/Users/User/Desktop/qt-everywhere-opensource-src-4.8.1/lib -L/Users/User/Desktop/qt-everywhere-opensource-src-4.8.1/lib -framework Foundation -framework SystemConfiguration -framework QtNetwork -L/Users/User/Desktop/qt-everywhere-opensource-src-4.8.1/lib -F/Users/User/Desktop/qt-everywhere-opensource-src-4.8.1/lib -framework QtCore
    Undefined symbols for architecture x86_64:
    "_kCWPowerDidChangeNotification", referenced from:
    -[QNSListener init] in qcorewlanengine.o
    "_kCWAssocKey8021XProfile", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "_kCWScanKeySSID", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "_kCWScanKeyRestTime", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    QScanThread::run() in qcorewlanengine.o
    "_kCWScanKeyScanType", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    QScanThread::run() in qcorewlanengine.o
    "_kCWScanKeyMerge", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    QScanThread::run() in qcorewlanengine.o
    "_SecKeychainSearchCreateFromAttributes", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "_SecKeychainSearchCopyNext", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "_SecKeychainItemCopyContent", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "_SecKeychainItemFreeContent", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "_kCWAssocKeyPassphrase", referenced from:
    QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
    "OBJC_CLASS$_CWInterface", referenced from:
    objc-class-ref in qcorewlanengine.o
    "OBJC_CLASS$_CW8021XProfile", referenced from:
    objc-class-ref in qcorewlanengine.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    make[4]: *** [../../../../plugins/bearer/libqcorewlanbearer_debug.dylib] Error 1
    make[3]: *** [debug-all] Error 2
    make[2]: *** [sub-corewlan-make_default] Error 2
    make[1]: *** [sub-bearer-make_default] Error 2
    make: *** [sub-plugins-make_default-ordered] Error 2@
    I use the following command:
    @./configure -debug-and-release -arch x86_64 -qt-zlib -qt-libpng -qt-libjpeg -shared -fast -no-qt3support -no-webkit -nomake examples -nomake demos -opensource -prefix /Developer/Qt/4.8.1 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -framework@
    Any suggestion about what I am doing wrong? It happens in the part of bearer plugin, I'm not sure if can be some relation with the following piece of code into the corewlan.pro:
    @contains(QT_CONFIG, corewlan) {
    isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.[67].sdk") {
    LIBS += -framework CoreWLAN -framework Security
    }
    }@

    It refers to the /Developer folder but now into the Mac OS X Lion this folder is inside the Xcode application.
    Another option for me could be to compile Qt without the bearer plugin but I don't know how to do this.

    Thanks



  • Nobody have the same problem? How do you compile Qt on Mac? Is this a bug?



  • I have seen this same error once when compiling after a failed configuration. I eventually just deleted my Qt source directory and re-extracted the source from the tar.gz file downloaded from qt.nokia.com.

    My configuration line:

    ./configure -opensource -platform macx-llvm -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -carbon -arch x86 -no-qt3support -silent



  • I got past this same link error by using the OR operator || instead of |:
    @isEmpty(QMAKE_MAC_SDK) || contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.[67].sdk") {@


Log in to reply
 

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