Changes between Version 14 and Version 15 of MacBuild


Ignore:
Timestamp:
Dec 6, 2007, 2:46:19 AM (17 years ago)
Author:
charlief
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacBuild

    v14 v15  
    11= Building BOINC Clients and Applications on Macintosh OS X =
    2 '''Last updated 11/14/07'''
    3 
    4 This document applies to BOINC version 5.10.30 and later. It has instructions for building BOINC for Macintosh OS X, plus information for building science project applications to run under BOINC on Macintosh OS X.
     2'''Last updated 12/6/07'''
     3
     4This document applies to BOINC version 6.1.0 and later. It has instructions for building BOINC for Macintosh OS X, plus information for building science project applications to run under BOINC on Macintosh OS X.
    55
    66Note: the information in this document changes from time to time for different versions of BOINC. For any version of BOINC source files, the corresponding version of this document can be found in the source tree at:
     
    1212Contents of this document:
    1313
    14 [[PageOutline(1-9,,inline)]]
     14[[PageOutline(1-10,,inline)]]
    1515
    1616== Important requirements for building BOINC software for the Mac ==
    1717
    18 All BOINC software for Power PC Macs must be built using GCC 3.3 and MacOS10.3.9 SDK to assure backward compatibility with OS 10.3. All BOINC software for Intel Macs must be built using GCC 4.0 and MacOS 10.4.u SDK to allow cross-compiling. '''This includes not only BOINC itself, but also the wxWidgets, JPEG and cURL libraries, as well as all project applications.'''
     18BOINC version 6.1.0 supports only Mac OS X 10.3.9 and later; support for OS 10.3.0 through 10.3.8 has been discontinued.  This allows us to build the BOINC Client and Manager using only GCC 4.0, which offers a number of advantages.
     19
     20BOINC version 6.1.0 Client and libraries include support for the x86_64 (64-bit Intel) architecture.
     21
     22All BOINC software for Power PC Macs must be built using MacOS10.3.9 SDK to assure backward compatibility with OS 10.3.9. 
     23All 32-bit BOINC software for Intel Macs must be built using GCC 4.0 and MacOS10.4.u SDK to allow cross-compiling. 
     24All 64-bit BOINC software for Intel Macs must be built using GCC 4.0 and MacOS10.5 SDK. 
     25
     26'''The above requirements apply not only BOINC itself, but also the WxWidgets, JPEG and cURL libraries, as well as all project applications.''' The BOINC Client does not use WxWidgets or JPEG, so only the cURL library must be built for  the x86_64 architecture.
     27
     28Be sure to follow the directions in this document to ensure that these requirements are met.
     29
     30'''Building BOINC now requires XCode Tools version 2.4.1 or later; XCode 3.0 or later is recommended.'''
     31
     32Source 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/].
     33
     34You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/]
     35
     36== Building BOINC libraries to link with project applications ==
     37
     38BOINC version 6.1.0 supports only Mac OS X 10.3.9 and later; support for OS 10.3.0 through 10.3.8 has been discontinued.  This allows us to build the BOINC Client and Manager using only GCC 4.0.  However, to ensure that science projects are compatible with older versions of BOINC running under OS 10.3.0 through 10.3.8, the PowerPC builds of the libraries are still built using GCC 3.3.
    1939
    2040Beware of using the wrong compiler! Apple's release notes for GCC 4.0 say:
     
    2646    Do not link C++ modules compiled with one of these compilers against modules compiled with the other. Even if the modules appear to link correctly, C++ ABI differences may still cause problems that will not manifest themselves until run time.
    2747
    28 Be sure to follow the directions in this document to ensure that these requirements are met.
    29 
    30 Building BOINC now requires XCode Tools version 2.4.1 or later. (Version 2.3 may work; this has not been tested.)
    31 
    32 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/].
    33 
    34 You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/]
    35 
    36 == Building BOINC libraries to link with project applications ==
    37 
    38 If you are building a project application to be run by BOINC, you only need to build the BOINC libraries `libboinc_api.a`, `libboinc.a`, and (if you want graphics) `libboinc_graphics_api.a`. There are two ways to do this:
     48If you are building a project application to be run by BOINC, you only need to build the BOINC libraries `libboinc_api.a`, `libboinc.a`, and (if you want graphics) `libboinc_graphics_api.` or `libboinc_graphics2.a`.  (`libboinc_graphics2.a` is used for version 6 graphics, which is the method recommended for all applications.) There are two ways to do this:
    3949
    4050  1. Use the BOINC autoconf / automake scripts to build these libraries and the jpeg and curl libraries on which they depend. You must do all of this twice: once on a PowerPC Mac running OS 10.3.x (do NOT use OS 10.4), and once on an Intel Mac running OS 10.4.x.
    4151
    4252 (If you wish, you can combine separate Intel and PowerPC builds in a single Universal Binary mach-O file using the command-line utility lipo. For details on lipo, type 'man lipo' in Terminal; it is available on all Macs running OS10.4.x.)
    43   2. Use scripts setupForBOINC.sh and BuildMacBOINC.sh. You do this once on any Macintosh (PowerPC or Intel) running OS 10.4.x and with XCode 2.4.1 (or later) installed. This will produce Universal Binaries of all the libraries. These can then be linked with both PowerPC applications and Mac Intel applications.
     53 
     54At the time this is written, the BOINC autoconf / automake scripts do not build 64-bit binaries.
     55
     56(2) Use scripts setupForBOINC.sh and BuildMacBOINC.sh.  You do this once on any Macintosh (PowerPC or Intel) running either OS 10.4.x and XCode 2.4.1, or OS 10.5.x and XCode 3.0 (or later) installed.  This will produce Universal Binaries of all the libraries.  These can then be linked with PowerPC, 32-bit Intel and 64-bit Intel Mac applications.
    4457
    4558This document gives instructions only for the second method.
    4659
    47 After building the libraries as Universal Binaries using the second method, you probably still want to build your actual application separately on the two architectures: on a PowerPC Mac running OS 10.3.x (do NOT use OS 10.4), and also on an Intel Mac running OS 10.4.x. Or you can look at the scripts buildcurl.sh and buildjpeg.sh for examples of environment settings which can cross-compile on one Mac running OS 10.4.x.
     60After building the libraries as Universal Binaries using the second method, you may still want to build your actual application separately on the two architectures: on a PowerPC Mac running OS 10.3.x (do NOT use OS 10.4), and also on an Intel Mac running OS 10.4.x.  To build for the x86_64 architecture, use a Mac running either OS 10.4 or OS 10.5 and specify the -arch x86_64 option to the compiler and linker.
     61
     62If you prefer, you can cross-compile on one Mac running OS 10.4.x or OS 10.5.x.  Look at the scripts buildcurl.sh and buildjpeg.sh for examples of environment settings which allow you to do this.
    4863
    4964== Building BOINC Manager with embedded Core Client plus libraries libboinc.a and libboinc_graphics_api.a ==