Changes between Version 41 and Version 42 of BuildMacApp


Ignore:
Timestamp:
Oct 11, 2010, 5:20:31 AM (14 years ago)
Author:
charlief
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildMacApp

    v41 v42  
    22
    33= Building BOINC Project Applications for Macintosh OS X =
    4 '''Last updated 10/8/10'''
     4'''Last updated 10/11/10'''
    55
    66This document applies to BOINC libraries 6.11.9 and later.  It has instructions for building science project applications to run under BOINC on Macintosh OSX.  Information for building the BOINC Client and Manager for Macintosh OSX can be found [wiki:MacBuild here].
     
    2121Of course, you can choose to support only some of these platforms.  For example, you may not need a 64-bit version.  If your project does not support the x86_64-apple-darwin platform, BOINC will automatically request your i686-apple-darwin application.  And / or you may choose not to support the powerpc-apple-darwin platform.
    2222
    23 Although BOINC version 6.1.0 supports only Mac OS X 10.3.9 and later, earlier versions supported all versions back to OS 10.3.0.  The GCC compiler version 4.0 was introduced in OS 10.3.9.  OS 10.3.0 through 10.3.8 can't run applications built with GCC 4.0.  Also, starting with version 6.10.58,  the BOINC Client supports only Mac OS X 10.4.0 and later.  This allows it to be built with XCode 3.2 under OS 10.6.x, which does not support the Mac OS 10.3.9 SDK. 
     23Although BOINC version 6.1.0 supports only Mac OS X 10.3.9 and later, earlier versions supported all versions back to OS 10.3.0.  The GCC compiler version 4.0 was introduced in OS 10.3.9.  OS 10.3.0 through 10.3.8 can't run applications built with GCC 4.0.  Also, starting with version 6.10.58,  the BOINC Client supports only Mac OS X 10.4.0 and later.  This allows it to be built with XCode 3.2 under OS 10.6.x, which does not support the Mac OS 10.3.9 SDK.
    2424
    2525You have 2 choices if you want to support PowerPC (G3, G4 and G5) processors:
     26
    2627 * Build  your PowerPC application with GCC 4.0 and distribute it only to Macs running 10.3.9 (or 10.4.0) or later.
    2728 * Build your PowerPC application with GCC 3.3.
     
    4748
    4849XCode will automatically check compatibility back to OS 10.3 if the following are defined during compilation:
     50
    4951{{{
    5052MAC_OS_X_VERSION_MAX_ALLOWED=1030
    5153MAC_OS_X_VERSION_MIN_REQUIRED=1030
    5254}}}
    53 
    5455Note that the MacOS10.4u SDK is not automatically included unless you customize the installation; click  the '''Customize''' button in the ''Installation type'' step when you run the XCode Tools installer.
    5556
     
    6970
    7071''Important:'' set the value of MAC_OS_X_VERSION_MAX_ALLOWED to be the same as the value of MAC_OS_X_VERSION_MIN_REQUIRED.  Possible values for the C compiler flags are:
     72
    7173{{{
    7274-DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030
     
    7678These specify that the executable should be able to run on systems back to OS 10.3, OS 10.4 and OS 10.5, respectively.
    7779
    78 You can find examples in the following files in the BOINC SVN trunk:[[BR]]
    79 `boinc/mac_build/buildc-ares.sh`[[BR]]
    80 `boinc/mac_build/buildcurl.sh`[[BR]]
    81 `boinc/mac_build/buildjpeg.sh`[[BR]]
    82 `boinc/samples/example_app/MakeMacExample.sh`[[BR]]
    83 `boinc/samples/example_app/Makefile_mac2`[[BR]]
    84 `boinc/samples/example_app/Makefile_mac`[[BR]]
    85 `boinc/samples/wrapper/Makefile_mac`[[BR]]
     80You can find examples in the following files in the BOINC SVN trunk:[[BR]] `boinc/mac_build/buildc-ares.sh`[[BR]] `boinc/mac_build/buildcurl.sh`[[BR]] `boinc/mac_build/buildjpeg.sh`[[BR]] `boinc/samples/example_app/MakeMacExample.sh`[[BR]] `boinc/samples/example_app/Makefile_mac2`[[BR]] `boinc/samples/example_app/Makefile_mac`[[BR]] `boinc/samples/wrapper/Makefile_mac`[[BR]]
    8681
    8782== Preparing To Build ==
     
    9085Source files are now archived using Subversion. You can download svnX, a free GUI application for running Subversion from either [http://www.apple.com/downloads/macosx/development_tools/svnx.html] or [http://www.lachoseinteractive.net/en/community/subversion/svnx/].
    9186
    92 You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/]. 
     87You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/].
    9388
    9489If you are running OS X 10.6 and XCode 3.2, a recent version of Subversion is already installed in `/usr/bin/`.  To copy it into `/usr/local/bin/`, enter the following in the Terminal utility application:
     90
    9591{{{
    9692cd /usr/bin
     
    9894}}}
    9995Get the BOINC source tree from SVN, and put it in the same BOINC_dev folder. To do this, type the following in Terminal:
     96
    10097{{{
    10198cd {path}/BOINC_dev/
     
    109106
    110107BOINC itself is built using the `boinc.xcodeproj` file.  You can either build directly in XCode (more information below) or run the `BuildMacBOINC.sh` script.  Note: this script requires XCode 3.2 running under OS 10.6.x.  Run the script as follows:
     108
    111109{{{
    112110cd {path}/BOINC_dev/boinc/mac_build/
     
    138136 * '''boinc.xcodeproj''' builds BOINC. It can be used either with the BuildMacBOINC.sh script or as a stand-alone project. The Development build configuration builds only the native architecture and is used for debugging.  The Deployment build configuration builds a universal binary and is suitable for release builds.  If there are any other build configurations, they should not be used as they are obsolete.
    139137
    140 The standard release of BOINC version 6.1.0 and later contains a universal binary of the BOINC libraries containing builds for three architectures: ppc, i386 and x86_64. 
     138The standard release of BOINC version 6.1.0 and later contains a universal binary of the BOINC libraries containing builds for three architectures: ppc, i386 and x86_64.
    141139
    142140== Build Any Other Needed Libraries ==
     
    150148
    151149Note: you may see the following warning when building the PowerPC executable.  You may safely ignore it:
    152 {{{
    153 ld: warning: object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o
    154 }}}
    155 
     150
     151{{{
     152ld: warning: object file compiled with -mlong-branch which is no longer needed.
     153To remove this warning, recompile without -mlong-branch
     154}}}
    156155Use the example XCode project as a guide or a starting point to create an XCode project for your own application.  Pay special attention to the XCode build settings.  For more information on using XCode, see [http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/XcodeWorkspace XCode Workspace Guide].
    157156
     
    188187export MACOSX_DEPLOYMENT_TARGET=10.3
    189188}}}
    190 Specifies the Mac OSX Deployment Target, which is the minimum target OS X version on which you want your to application run.
    191 
    192 {{{
    193 export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk,-arch,ppc"
    194 }}}
    195 Specifies the appropriate SDK to use and the architecture for the linker. 
    196 
    197 {{{
    198 export VARIANTFLAGS="-arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
     189Specifies the Mac OSX Deployment Target, which is the minimum target OS X version on which you want your to application run.  This sets certain symbol variants which determine the UNIX standard to be followed.  For details, see [http://developer.apple.com/library/mac/#releasenotes/Darwin/SymbolVariantsRelNotes/ this page].  We recommend the following values for the MACOSX_DEPLOYMENT_TARGET:
     190 * For PowerPC builds: 10.3
     191 * For 32-bit Intel builds: 10.4
     192 * For 64-bit Intel builds: 10.5
     193
     194{{{
     195export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc"
     196}}}
     197Specifies the appropriate SDK to use and the architecture for the linker.
     198
     199{{{
     200export VARIANTFLAGS="-arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
    199201}}}
    200202Specifies the SDK to use and the architecture for the compiler.  MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED tell the compiler to generate an error if you are using any APIs not yet available in that version of the Mac OS.
     203
     204We recommend the following values for the SDK:
     205 * For PowerPC builds: MacOSX10.4u.sdk
     206 * For 32-bit Intel builds: MacOSX10.4u.sdk
     207 * For 64-bit Intel builds: MacOSX10.5.sdk
    201208
    202209=== Using a Custom Makefile ===