Build Qt 4.7.4, on OSX Lion Machine, with MacOS10.5 SDK - 32 bit target
-
@./configure -platform macx-llvm -arch i386 -sdk /developer/SDKs/MacOSX10.5.sdk@
It succeeds
Builds for a while and then errors:
@/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.tcc:185: error: invalid use of incomplete type ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.tcc:185: error: invalid use of incomplete type ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.tcc:185: error: invalid use of incomplete type ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.tcc:185: error: invalid use of incomplete type ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>’
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.h: In member function ‘_Alloc std::basic_string<_CharT, _Traits, _Alloc>::get_allocator() const [with _CharT = wchar_t, _Traits = std::char_traits<wchar_t>, _Alloc = std::allocator<wchar_t>]’:
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.h:472: instantiated from ‘std::basic_string<_CharT, _Traits, _Alloc>::~basic_string() [with _CharT = wchar_t, _Traits = std::char_traits<wchar_t>, _Alloc = std::allocator<wchar_t>]’
../../include/QtCore/../../src/corelib/tools/qstring.h:1056: instantiated from here
/developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/basic_string.h:1525: error: return type ‘class std::allocator<wchar_t>’ is incomplete
make[2]: *** [.pch/debug-shared/QtCore_debug.gch/c++] Error 1
make[1]: *** [debug-all] Error 2
make: *** [sub-corelib-make_default-ordered] Error 2@Am I trying the formally impossible? Or perhaps I should use a different compiler?
-
Check that /Developer/SDKs actually exists. With the latest Xcode 4.3 update, the SDKs are now under /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs on my machine.
-
me too,have the same problem,seeking for solution.I'm developing on Mac os x 10.7.3,and would compile a program running on 10.5 and later. trying to compile QT 4.7.4 or 4.8.0. using:./configure -prefix /Users/mac/QTSDK_474_X86_10.5 -platform macx-g++ -sdk /Developer/SDKs/MacOSX10.5.sdk -arch x86 -release -opensource -nomake demos -nomake examples -no-qt3support -no-multimedia -no-opengl -no-openvg -no-libjpeg -no-libtif.
get the same build result error
-
I've find another way to fit the requirement,using the "MacOSX10.6.sdk" instead of "MacOSX10.5.sdk",compile the QT 4.7.4,then use it to complie my application. my application can work on 10.5. That's my solutions.
-
I have documented some of the issues here:
http://www.agile-workers.com/web/2012/03/qt-qmake-osx_sdk-xcode/