Unable to compile Qt4.8.6 on OSX 10.9.4
-
I completed the "make" stage with the following errors:
@Undefined symbols for architecture x86_64:
"_CWKeychainCopyEAPIdentity", referenced from:
QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
"_CWKeychainCopyEAPUsernameAndPassword", referenced from:
QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
"_CWKeychainCopyPassword", referenced from:
QCoreWlanEngine::connectToId(QString const&) in qcorewlanengine.o
"_CWPowerDidChangeNotification", referenced from:
-[QNSListener init] in qcorewlanengine.o
"OBJC_CLASS$_CWInterface", referenced from:
objc-class-ref in qcorewlanengine.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [../../../../plugins/bearer/libqcorewlanbearer.dylib] Error 1
make[3]: *** [release] 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@Ah, every time it is something different, let see if this goes through the "make install" stage.
-
Yeah, it has not worked. When I have the GCC built Qt4.8.5 in my environment my example Qt project builds just fine.
When I switch to my new build Qt4.8.6 I get this when I try to build my simple example Qt project:
@g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/mkspecs/default -I. -I/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/lib/QtCore.framework/Headers -I/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/include/QtCore -I/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/lib/QtGui.framework/Headers -I/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/include/QtGui -I/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/include -I. -I. -F/Users/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/lib -o qtWidgetTest.o qtWidgetTest.cpp
In file included from qtWidgetTest.cpp:2:
In file included from /broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/lib/QtGui.framework/Headers/QApplication:1:
In file included from /broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/lib/QtGui.framework/Headers/qapplication.h:45:
/broadcast/myUser/apps/Darwin64/Qt-4.8.6-clang-503.0.40/include/QtCore/qcoreapplication.h:1:10: fatal error: '../../../qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.h' file not found
#include "../../../qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcoreapplication.h"
^
1 error generated.
make: *** [qtWidgetTest.o] Error 1@It seems like it it still looking for stuff in the src folder. This is really messed up.
:( -
Did you do a make install after the build ?
-
Sure.
First, the "./configure" stuff... then "make" and that last is "make install".
I am might need to give up on this (again) as I am running out of troubleshooting time, unfortunatelly. I installed the pre-compiled Qt4.8.6 package through the installation, and although I hate the idea, I will have to stick to it. I cannot understand why building Qt4.8.6 is such a pain. It has always been panful.
Thanks for your help and for your time, at least we tried :)
Thanks,
Milen -
Even with just
@./configure -release -opensource -nomake tests -sdk macosx10.8@
?
Note the -sdk parameter, it's not the full path to the SDK root
-
Hi,
I was providing the full SDK path with the configure. Ok, I will try the latest command one more time. But I need to provide a prefix path as well, as I have already installed Qt4 into the standart locations. So I will just add the prefix flag and a location? Actually, I can build it inside a build folder and run "make" and "make install" in that folder? Sorry geting a bit confused.
Thanks for your help,
Milen -
Yes you can add the prefix.
Yes you can without any problem. The advantage of an out of source build comes if want to do multiple different builds (e.g different plugins/built in or not etc.), you'll have to clean + configure + build. With an out of source build, you can re-use the same sources.
-
Here's my notes on compiling the latest packaged Qt4/Qt5 with the latest OSes and compilers, I used that on multiple machines already and this is used for our production releases:
https://www.icloud.com/iw/#pages/BAK2KLpkF7R28aMx7sKB2sL-V13uFSSSpzKF/Building_Qt
Providing the full sdk path works. Differences I see is the export PATH at the beginning (this is to avoid things like macports to interfere) and the modification to corewlan.pro.
-
Hi,
I am getting a bit confused here as the flag -sdk has been used with a full path pointing to the SDK folder and and sometimes with just the SDK name.
Let me make my self a bit more clear before going on and trying this again.
I would like to compile Qt4 myself, as I do not like the way things are scattered around in the /Developer folder with symbolic links created into /usr/local and etc. and etc.
I would like to compile the standard package of Qt4, into my own custom prefix, so everything stays together (headers, bins etc.) avoiding stripping components as much as possible.
I will now try to come up with a new ./configure command line, try this process again and report the results here.
Thanks.
-
Don't confuse Qt4 and Qt5, they are quite different. Full path for Qt4, name only for Qt5.
-
@ sandy.martel What do you mean by "Full path for Qt4, name only for Qt5" ?
-
For the sdk.
-
Hi,
My latest command:
@./configure -release -opensource -nomake tests -no-qt3support -prefix /Users/myApps/Qt-4.8.6-clang-503.0.41 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -arch x86_64@Unfortunately with no luck.
By the way, sandy.martel is right about the -sdk flag, did not work when I used only "macosx10.8", as seen above, had to provide the full path.
But anyway, still no success. Incomplete build and a partial install to the prefix folder. No working Qt4 at the end of the process.
I would like to thank all of you for trying to help me, I think I will try to make things work with the default Qt4 install. Although having Qt4 as a framework in "/Library/Frameworks" seems to be destine for other issues.
-
What version of Xcode are you using ?