[Qt-interest] Mac deployment to 10.4

Israel Brewster israel at frontierflying.com
Wed Nov 11 22:39:19 CET 2009


Well, I haven't built a 64 bit executable, but I have had no problems  
with distributing a single linked 32 bit binary to 10.4, 10.5, and  
10.6, using just the -static and -universal flags. I don't specify - 
arch at all when building Qt, and it seems to work well. The only  
problems I have run into are when something I am statically linking in  
(like postgresql drivers) doesn't have the proper architecture. But  
that isn't a QT problem :)

On Nov 11, 2009, at 12:06 PM, Rush Manbert wrote:

> On Oct 9, 2009, at 12:29 PM, Dave Thorup wrote:
> <snip>
>>
>> As others have already mentioned you'll need to download the Qt  
>> sources and build the Qt libraries yourself using the 10.4 SDK as  
>> well as targeting 10.4 ( MACOSX_DEPLOYMENT_TARGET=10. ).  You'll  
>> also need to be sure that you build Qt as Universal Binaries in  
>> order to target your G4 iBook.  We target Mac OS X 10.4 while  
>> developing on 10.5 (and now 10.6), you just need to make sure that  
>> you build your Qt libraries properly and get your project settings  
>> correct as well.  Here are my notes on building Qt to target 10.4:
>>
>>> Qt needs some special configuration flags to work well with  
>>> Leopard. The MACOSX_DEPLOYMENT_TARGET environment variable must be  
>>> set to 10.4 (or 10.3 for earlier compatibility). Enter the  
>>> following in Terminal before configuring Qt:
>>> MACOSX_DEPLOYMENT_TARGET=10.4
>>> export MACOSX_DEPLOYMENT_TARGET
>>> Configure Qt with the following (note that this doesn't make the  
>>> demos or examples which is much faster):
>>> ./configure -nomake demos -nomake examples -dwarf2 -sdk /Developer/ 
>>> SDKs/MacOSX10.4u.sdk -universal
>>> This will ensure that source code is visible in Xcode when  
>>> debugging. Add "-universal" to build a Universal Binary version of  
>>> Qt.
>>> You'll also need to set the following in your Qt pro file for your  
>>> projects:
>>> QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
>>> QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
>>> In order to view the Qt sources in the Xcode Debugger you'll need  
>>> to double-click on the "bibblepro" executable in the Executables  
>>> section of the Xcode project and select "Use <debug> suffix when  
>>> loading frameworks." Where <debug> is selected from a popup menu.
>>
>> We use Qt 4.4.3, but it should be the same with Qt 4.5.
>>
>
> This is an old thread by now, but I would like to extend the  
> discussion a little bit.
>
> We need to support deployment on OS X 10.4 through 10.6, and on 10.6  
> we need to support X86_64. We want to statically link our  
> executables, so we want to build Qt to have static libraries. We  
> develop on 10.6 using the Xcode 3.2 toolset.
>
> This seems to get us into a problematic area for Qt. The help for  
> configure says in regard to the "-arch " setting:
>     -arch <arch> ....... Build Qt for <arch>
>                          Example values for <arch>: x86 ppc x86_64  
> ppc64
>                          Multiple -arch arguments can be specified,  
> 64-bit archs
>                          will be built with the Cocoa framework.
>
> and it says in regard to the "-cocoa" setting:
>     -cocoa ............. Build the Cocoa version of Qt. Note that - 
> no-framework
>                          and -static is not supported with -cocoa.  
> Specifying
>                          this option creates Qt binaries that  
> requires Mac OS X
>                          10.5 or higher.
>
> It would seem that if we specify "-arch X86_64" we implicitly  
> specify "-cocoa" and "-framework" and we limit ourselves to  
> deployment on 10.5 and above.
>
> But if we only build the 32 bit architectures, specify "-static",  
> and omit "-cocoa", then we can't build 64 bit libraries.
>
> What we would like is this:
> 	- static libraries
> 	- cocoa or carbon
> 	- each library supports ppc, x86, and x86_64 architectures (the  
> 10.6 notion of "universal")
> 	- deployable on 10.4, 10.5, and 10.6
>
> but that doesn't look like it's possible. In fact, it looks as if I  
> could reduce my requirements to this:
> 	- a single linked application
> 	- deployable on 10.4, 10.5, and 10.6
>
> and still not be able to satisfy them!
>
> Has anyone else solved/worked around these issues?
>
> - Rush
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/06f523ce/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/06f523ce/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/06f523ce/attachment-0001.html 


More information about the Qt-interest-old mailing list