Opened 13 years ago

Closed 13 years ago

#30346 closed defect (fixed)

qt4-mac: trouble with libqcorewlanbearer.dylib (OS X 10.7)

Reported by: m.haller@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.0.0
Keywords: lion Cc: jamesfmarshall@…, mkae (Marko Käning), nerdling (Jeremy Lavergne), wanthalf@…, whcordis@…, axeljaeger@…, macports@…, joelburton (Joel Burton), nospam2000 (Michael Dreher), benjamin@…, hofione@…, elventear (Pepe Barbe), fares.chucri@…, mojca (Mojca Miklavec), raimue (Rainer Müller), alexey@…, stromnov (Andrey Stromnov), obutovich@…, martin@…, soehn@…, geekosaur, trottier@…
Port: qt4-mac

Description (last modified by ryandesign (Ryan Carsten Schmidt))

following error occurs while compiling qt4

[...]
/Developer/usr/bin/llvm-g++-4.2 -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.7.sdk -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.7 -Xarch_x86_64 -mmacosx-version-min=10.7 -o libqcorewlanbearer.dylib .obj/release-shared/main.o .obj/release-shared/qcorewlanengine.o .obj/release-shared/qnetworksession_impl.o .obj/release-shared/moc_qcorewlanengine.o .obj/release-shared/moc_qnetworksession_impl.o .obj/release-shared/moc_qbearerengine_impl.o    -framework Foundation -framework SystemConfiguration -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.7.3/lib -lQtNetwork -lQtCore  
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
  "_kCWAssocKeyPassphrase", referenced from:
      QCoreWlanEngine::connectToId(QString const&)  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
  "_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.dylib] Error 1
make[3]: *** [release-all] Error 2
make[2]: *** [sub-corewlan-all] Error 2
make[1]: *** [sub-bearer-all] Error 2
make: *** [sub-plugins-all-ordered] Error 2

Attachments (5)

main.log (19.2 MB) - added by m.haller@… 13 years ago.
Portfile (19.9 KB) - added by obutovich@… 13 years ago.
patch-src-corelib-global-qglobal.h.diff (588 bytes) - added by obutovich@… 13 years ago.
patch-src-plugins-bearer-corewlan-corewlan.pro.diff (559 bytes) - added by obutovich@… 13 years ago.
patch-src-plugins-bearer-corewlan-qcorewlanengine.mm.diff (459 bytes) - added by obutovich@… 13 years ago.

Change History (57)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: lion added
Owner: changed from macports-tickets@… to michaelld@…
Port: qt4-mac added; qt4 removed
Summary: qt4 trouble with libqcorewlanbearer.dylib (OS X 10.7)qt4-mac: trouble with libqcorewlanbearer.dylib (OS X 10.7)

Use WikiFormatting please. Remember to fill in the correct port name (qt4-mac not qt4), Cc that port's maintainer, and also please attach the entire main.log.

Changed 13 years ago by m.haller@…

Attachment: main.log added

comment:2 Changed 13 years ago by m.haller@…

After the error occured, I checked the log file and tried again

cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.7.3"
make all

... but without -j3 ... then I got the error messages above

comment:3 Changed 13 years ago by jamesfmarshall@…

Cc: jamesfmarshall@… added

Cc Me!

comment:4 Changed 13 years ago by m.haller@…

patch-src-plugins-bearer-corewlan-corewlan.pro.diff is wrong and has to be

--- src/plugins/bearer/corewlan/corewlan.pro.orig	2011-01-10 11:23:43.000000000 -0500
+++ src/plugins/bearer/corewlan/corewlan.pro	2011-01-10 11:29:19.000000000 -0500
@@ -5,7 +5,7 @@
 LIBS += -framework Foundation -framework SystemConfiguration
 
 contains(QT_CONFIG, corewlan) {
-    isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.6.sdk") {
+    isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "@DEVELOPER_DIR@/SDKs/MacOSX10.7.sdk") {
          LIBS += -framework CoreWLAN -framework Security
          DEFINES += MAC_SDK_10_7
     }

comment:5 Changed 13 years ago by m.haller@…

qcorewlanengine.mm in directory qt4-mac/work/qt-everywhere-opensource-src-4.7.3/src/plugins/bearer/corewlan has to be patched with

54a55,58
> #ifdef MAC_SDK_10_7
> 	#include <CoreWLAN/CoreWLANConstants.h>
> 	#include <CoreWLAN/CoreWLANTypes.h>
> #endif 

this works together with the above patch of patch-src-plugins-bearer-corewlan-corewlan.pro.diff

compilation and linking of libqcorewlanbearer.dylib is error free

dear macports team, please test and submit these fixes

comment:6 Changed 13 years ago by m.haller@…

Please check also Ticket 29141 ... /qt4-mac/work/qt-everywhere-opensource-src-4.7.3/src/corelib/global/qglobal.h has to be patched as well

comment:7 Changed 13 years ago by michaelld (Michael Dickens)

There's probably a way to make the corewlan.pro patch more generic, by moving it into the Portfile as a 'reinplace'. I don't know about the other change, since I don't have 10.7 yet.

I'm traveling right now, and probably won't be able to download / install Lion until early August. So, unless someone can come up with a patch in the interim, folks will just have to be patient for a few weeks until I can get to this ticket. I grant permission for others to checkin fixes for this ticket, if/as appropriate.

comment:8 Changed 13 years ago by m.haller@…

I confirm that the above fixes are enough to obtain a working port of qt-everywhere-opensource-src-4.7.3 ... successful installation is possible

[...]
--->  Cleaning qt4-mac
--->  Removing work directory for qt4-mac

comment:9 Changed 13 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:10 Changed 13 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:11 Changed 13 years ago by wanthalf@…

Cc: wanthalf@… added

Cc Me!

comment:12 Changed 13 years ago by whcordis@…

Cc: whcordis@… added

Cc Me!

comment:13 Changed 13 years ago by axeljaeger@…

Cc: axeljaeger@… added

Cc Me!

comment:14 Changed 13 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:15 Changed 13 years ago by joelburton (Joel Burton)

Cc: joel@… added

Cc Me!

comment:16 Changed 13 years ago by nospam2000 (Michael Dreher)

Cc: nospam2000@… added

Cc Me!

comment:17 Changed 13 years ago by benjamin@…

Cc: benjamin@… added

Cc Me!

comment:18 Changed 13 years ago by hofione@…

Cc: hofione@… added

Cc Me!

comment:19 in reply to:  4 ; Changed 13 years ago by mkae (Marko Käning)

Replying to m.haller@…:

Wouldn't your patch make building fail on 10.6 for all those who do not yet intend to upgrade their MacOSX to Lion?!

comment:20 Changed 13 years ago by nerdling (Jeremy Lavergne)

Like the patches need to become conditional based on what SDK is available.

comment:21 in reply to:  19 Changed 13 years ago by m.haller@…

Replying to mk@…: Replying to snc@…:

Sure, the patch should depend on the version of OS X and the version of Qt SDK. Probably, this issue will be resolved in a future version of Qt. I'm hopeful that Michael will consider this.

comment:22 Changed 13 years ago by elventear (Pepe Barbe)

Cc: elventear@… added

Cc Me!

comment:23 Changed 13 years ago by fares.chucri@…

Cc Me!

comment:24 Changed 13 years ago by fares.chucri@…

I have a question:

I modified the files corewlan.pro and qcorewlanengine.mm but yet after a (sudo) make clean and make all in src/plugins/bearer i still get the same error message.

The modification of corewlan.pro is straight forward, but in qcorewlanengine.mm i just added the lines proposed in the beginning of the file. Did i do it wrong? should i remove some includes???

The changes of qglobal.h did work and i could compile src/corelib/

Thx

comment:25 Changed 13 years ago by fares.chucri@…

Cc: fares.chucri@… added

Cc Me!

comment:26 in reply to:  24 ; Changed 13 years ago by wanthalf@…

Replying to fares.chucri@…:

Neither for me. I had to remove the conditions completely from the corewlan.pro file and *then* it finally compiled. I.e., I only left there the lines:

LIBS += -framework CoreWLAN -framework Security
DEFINES += MAC_SDK_10_7

(Obviously, this is no solution, just a workaround for my system.)

comment:27 in reply to:  26 ; Changed 13 years ago by m.haller@…

Replying to wanthalf@…:

Was QMAKE_MAC_SDK set to MacOSX10.7.sdk? maybe there is some problem with the conditions ...

comment:28 in reply to:  27 Changed 13 years ago by fares.chucri@…

Replying to m.haller@…:

Replying to wanthalf@…:

Was QMAKE_MAC_SDK set to MacOSX10.7.sdk? maybe there is some problem with the conditions ...

Where is QMAKE_MAC_SDK set? Removing the condition allowed me to compile src/plugins/bearer

qt4-mac is still compiling but it looks ok until now.

comment:29 in reply to:  26 Changed 13 years ago by hofione@…

Replying to wanthalf@…:

Same problem here with the same solution. Thanks

Replying to fares.chucri@…:

Neither for me. I had to remove the conditions completely from the corewlan.pro file and *then* it finally compiled. I.e., I only left there the lines:

LIBS += -framework CoreWLAN -framework Security
DEFINES += MAC_SDK_10_7

(Obviously, this is no solution, just a workaround for my system.)

comment:30 Changed 13 years ago by hofione@…

qt4-mac built successfully finally based on your suggestions above, thanks.

unfortunately redland is the next broken one (while installing kde4-baseapps)

:info:build make[3]: *** No rule to make target `-lltdl', needed by `librdf.la'.  Stop.

:/

comment:31 Changed 13 years ago by mojca (Mojca Miklavec)

Cc: mojca.miklavec.lists@… added

Cc Me!

comment:32 in reply to:  30 Changed 13 years ago by hofione@…

might it be a solution for this

http://goo.gl/xuQYE

Replying to hofione@…:

qt4-mac built successfully finally based on your suggestions above, thanks.

unfortunately redland is the next broken one (while installing kde4-baseapps) :info:build make[3]: * No rule to make target -lltdl', needed by librdf.la'. Stop.

:/

comment:33 Changed 13 years ago by raimue (Rainer Müller)

Cc: raimue@… added

Multiple solutions have been suggested above. Please attach a patch in unified diff format.

comment:34 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: alexey@… added

Has duplicate #30536.

comment:35 Changed 13 years ago by stromnov (Andrey Stromnov)

Cc: stromnov@… added

Cc Me!

comment:36 Changed 13 years ago by obutovich@…

Cc: obutovich@… added

Cc Me!

comment:37 Changed 13 years ago by martin@…

Cc: martin@… added

Cc Me!

comment:38 in reply to:  8 Changed 13 years ago by johannes@…

Hi, the changes don't work for me: After 30 minutes of frantic compiling the issue of undefined symbols comes back:

:info:build Undefined symbols for architecture x86_64: :info:build "_kCWPowerDidChangeNotification", referenced from: :info:build -[QNSListener init] in qcorewlanengine.o

frustrating...I hope there will be a patch soon.

Anyway, thanks Michael and M.!

Replying to m.haller@…:

I confirm that the above fixes are enough to obtain a working port of qt-everywhere-opensource-src-4.7.3 ... successful installation is possible

[...]
--->  Cleaning qt4-mac
--->  Removing work directory for qt4-mac

Changed 13 years ago by obutovich@…

Attachment: Portfile added

Changed 13 years ago by obutovich@…

Changed 13 years ago by obutovich@…

comment:39 Changed 13 years ago by obutovich@…

I have attached Portfile and additional patches. With that I have managed to compile the qt4-mac.. hope it helps to create official solution :) Thanx for sharing your fixes

comment:40 Changed 13 years ago by raimue (Rainer Müller)

This patch patch-src-plugins-bearer-corewlan-corewlan.pro.diff would probably produce build errors on Snow Leopard and earlier releases. It either needs to be reworked to support multiple OS X versions or there have to be multiple patches applied conditionally.

comment:41 Changed 13 years ago by soehn@…

Cc: soehn@… added

Cc Me!

comment:42 Changed 13 years ago by michaelld (Michael Dickens)

The patch for "patch-src-plugins-bearer-corewlan-corewlan.pro.diff" doesn't work on 10.6. We need a 2-step approach, to replace both the DEVELOPER_DIR and OS version. I'm working on it & will post updates Friday morning.

comment:43 Changed 13 years ago by raimue (Rainer Müller)

At least I can confirm that after hours and hours, qt4-mac built for me on Lion with these patches. Thanks a lot!

comment:44 Changed 13 years ago by geekosaur

Cc: allbery.b@… added

Cc Me!

comment:45 Changed 13 years ago by michaelld (Michael Dickens)

OK; this afternoon. It's taking longer than expected to re-do the Portfile to make it all work cleanly.

comment:46 Changed 13 years ago by michaelld (Michael Dickens)

Committed in r81844. Please do a selfupdate & see if the changes work.

comment:47 Changed 13 years ago by trottier@…

Thanks!!

Original problem seems to be gone after doing a selfupdate and "port clean qt4-mac" (*still* building). Lots of "This version of Mac OS X is unsupported" warnings, though.

comment:48 Changed 13 years ago by trottier@…

Correction: the error is still there (??)

Will clean, selfupdate, and try again ...

/Developer/usr/bin/llvm-g++-4.2 -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.7.sdk -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.7 -Xarch_x86_64 -mmacosx-version-min=10.7 -o libqcorewlanbearer.dylib .obj/release-shared/main.o .obj/release-shared/qcorewlanengine.o .obj/release-shared/qnetworksession_impl.o .obj/release-shared/moc_qcorewlanengine.o .obj/release-shared/moc_qnetworksession_impl.o .obj/release-shared/moc_qbearerengine_impl.o    -framework Foundation -framework SystemConfiguration -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.7.3/lib -lQtNetwork -lQtCore  
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
  "_kCWAssocKeyPassphrase", referenced from:
      QCoreWlanEngine::connectToId(QString const&)  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
  "_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.dylib] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.7.3/src/plugins/bearer/corewlan'
make[3]: *** [release-all] Error 2
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.7.3/src/plugins/bearer/corewlan'
make[2]: *** [sub-corewlan-all] Error 2

comment:49 Changed 13 years ago by trottier@…

Cc: trottier@… added

Cc Me!

comment:50 Changed 13 years ago by trottier@…

Worked!

comment:51 Changed 13 years ago by michaelld (Michael Dickens)

Great! It works for me on 10.6, XCode 3 (latest). I'm hopeful it'll also work using 10.6, XCode 4 (waiting to hear back, snc :). I'll also double-check on 10.7 once I get that installed later this weekend.

comment:52 Changed 13 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

It also worked for me on 10.7!

Note: See TracTickets for help on using tickets.