Changes between Version 41 and Version 42 of BuildMacApp
- Timestamp:
- Oct 11, 2010, 5:20:31 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildMacApp
v41 v42 2 2 3 3 = Building BOINC Project Applications for Macintosh OS X = 4 '''Last updated 10/ 8/10'''4 '''Last updated 10/11/10''' 5 5 6 6 This 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]. … … 21 21 Of 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. 22 22 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. 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. 24 24 25 25 You have 2 choices if you want to support PowerPC (G3, G4 and G5) processors: 26 26 27 * Build your PowerPC application with GCC 4.0 and distribute it only to Macs running 10.3.9 (or 10.4.0) or later. 27 28 * Build your PowerPC application with GCC 3.3. … … 47 48 48 49 XCode will automatically check compatibility back to OS 10.3 if the following are defined during compilation: 50 49 51 {{{ 50 52 MAC_OS_X_VERSION_MAX_ALLOWED=1030 51 53 MAC_OS_X_VERSION_MIN_REQUIRED=1030 52 54 }}} 53 54 55 Note 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. 55 56 … … 69 70 70 71 ''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 71 73 {{{ 72 74 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 … … 76 78 These specify that the executable should be able to run on systems back to OS 10.3, OS 10.4 and OS 10.5, respectively. 77 79 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]] 80 You 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]] 86 81 87 82 == Preparing To Build == … … 90 85 Source 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/]. 91 86 92 You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/]. 87 You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/]. 93 88 94 89 If 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 95 91 {{{ 96 92 cd /usr/bin … … 98 94 }}} 99 95 Get the BOINC source tree from SVN, and put it in the same BOINC_dev folder. To do this, type the following in Terminal: 96 100 97 {{{ 101 98 cd {path}/BOINC_dev/ … … 109 106 110 107 BOINC 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 111 109 {{{ 112 110 cd {path}/BOINC_dev/boinc/mac_build/ … … 138 136 * '''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. 139 137 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. 138 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. 141 139 142 140 == Build Any Other Needed Libraries == … … 150 148 151 149 Note: 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 {{{ 152 ld: warning: object file compiled with -mlong-branch which is no longer needed. 153 To remove this warning, recompile without -mlong-branch 154 }}} 156 155 Use 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]. 157 156 … … 188 187 export MACOSX_DEPLOYMENT_TARGET=10.3 189 188 }}} 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" 189 Specifies 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 {{{ 195 export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc" 196 }}} 197 Specifies the appropriate SDK to use and the architecture for the linker. 198 199 {{{ 200 export 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" 199 201 }}} 200 202 Specifies 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 204 We 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 201 208 202 209 === Using a Custom Makefile ===