February 16, 2012

ronM71 ronM71
Lab Rat
225 posts

Build Qt 4.7.4, on OSX Lion Machine, with MacOS10.5 SDK - 32 bit target

 

  1. ./configure -platform macx-llvm -arch i386 -sdk /developer/SDKs/MacOSX10.5.sdk

It succeeds

  1. make

Builds for a while and then errors:

  1. /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>
  2. /developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>
  3. /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>
  4. /developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>
  5. /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>
  6. /developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>
  7. /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>
  8. /developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stringfwd.h:49: error: declaration of ‘class std::allocator<wchar_t>
  9. /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>]:
  10. /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>]
  11. ../../include/QtCore/../../src/corelib/tools/qstring.h:1056:   instantiated from here
  12. /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
  13. make[2]: *** [.pch/debug-shared/QtCore_debug.gch/c++] Error 1
  14. make[1]: *** [debug-all] Error 2
  15. make: *** [sub-corelib-make_default-ordered] Error 2

Am I trying the formally impossible? Or perhaps I should use a different compiler?

4 replies

February 26, 2012

miroslav miroslav
Lab Rat
228 posts

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.

 Signature 

Mirko Boehm | .(JavaScript must be enabled to view this email address) | KDE e.V.
FSFE Fellow
Qt Certified Specialist

March 22, 2012

heking heking
Lab Rat
2 posts

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

 Signature 

http://www.loogear.com

March 23, 2012

heking heking
Lab Rat
2 posts
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.
 Signature 

http://www.loogear.com

March 23, 2012

miroslav miroslav
Lab Rat
228 posts

I have documented some of the issues here:

http://www.agile-workers.com/web/2012/03/qt-qmake-osx_sdk-xcode/

 Signature 

Mirko Boehm | .(JavaScript must be enabled to view this email address) | KDE e.V.
FSFE Fellow
Qt Certified Specialist

 
  ‹‹ Release mode ntdll.dll error      [Solved] Moc file that does not get created ››

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