March 30, 2012

limdor limdor
Lab Rat
13 posts

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:

  1. 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  
  2. Undefined symbols for architecture x86_64:
  3.   "_kCWPowerDidChangeNotification", referenced from:
  4.       -[QNSListener init] in qcorewlanengine.o
  5.   "_kCWAssocKey8021XProfile", referenced from:
  6.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  7.   "_kCWScanKeySSID", referenced from:
  8.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  9.   "_kCWScanKeyRestTime", referenced from:
  10.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  11.       QScanThread::run()      in qcorewlanengine.o
  12.   "_kCWScanKeyScanType", referenced from:
  13.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  14.       QScanThread::run()      in qcorewlanengine.o
  15.   "_kCWScanKeyMerge", referenced from:
  16.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  17.       QScanThread::run()      in qcorewlanengine.o
  18.   "_SecKeychainSearchCreateFromAttributes", referenced from:
  19.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  20.   "_SecKeychainSearchCopyNext", referenced from:
  21.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  22.   "_SecKeychainItemCopyContent", referenced from:
  23.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  24.   "_SecKeychainItemFreeContent", referenced from:
  25.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  26.   "_kCWAssocKeyPassphrase", referenced from:
  27.       QCoreWlanEngine::connectToId(QString const&)  in qcorewlanengine.o
  28.   "_OBJC_CLASS_$_CWInterface", referenced from:
  29.       objc-class-ref in qcorewlanengine.o
  30.   "_OBJC_CLASS_$_CW8021XProfile", referenced from:
  31.       objc-class-ref in qcorewlanengine.o
  32. ld: symbol(s) not found for architecture x86_64
  33. collect2: ld returned 1 exit status
  34. make[4]: *** [../../../../plugins/bearer/libqcorewlanbearer_debug.dylib] Error 1
  35. make[3]: *** [debug-all] Error 2
  36. make[2]: *** [sub-corewlan-make_default] Error 2
  37. make[1]: *** [sub-bearer-make_default] Error 2
  38. make: *** [sub-plugins-make_default-ordered] Error 2

I use the following command:
  1. ./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:
  1. contains(QT_CONFIG, corewlan) {
  2.     isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") {
  3.          LIBS += -framework CoreWLAN -framework Security
  4.     }
  5. }

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

3 replies

May 20, 2012

limdor limdor
Lab Rat
13 posts

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

May 21, 2012

1920x1080p 1920x1080p
Lab Rat
1 posts

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

June 22, 2012

superdave superdave
Lab Rat
1 posts

I got past this same link error by using the OR operator || instead of |:

  1. isEmpty(QMAKE_MAC_SDK) || contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") {

 
  ‹‹ PySide SVG image formats not found?      About installing Qt creator by downloading binaries from qt.nokia.com ››

You must log in to post a reply. Not a member yet? Register here!