Changes between Version 35 and Version 36 of MacBuild


Ignore:
Timestamp:
Apr 3, 2008, 8:46:59 PM (17 years ago)
Author:
charlief
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacBuild

    v35 v36  
    1616== Important requirements for building BOINC software for the Mac ==
    1717
     18Building applications for Macintosh OS X is complicated by the fact that Mac OS X is actually 3 different platforms:
     19 * '''powerpc-apple-darwin''': PowerPC processors running OS 10.3.0 and above
     20 * '''i686-apple-darwin''': 32-bit intel processors running OS 10.4.0 and above
     21 * '''x86_64-apple-darwin''': 64-bit intel processors running OS 10.5.0 and above
     22BOINC does not support 64-bit PowerPC applications for the Mac.
     23
     24You need to take certain steps to ensure that you use only APIs that are available in all the OS versions BOINC supports for each architecture.  There are two basic ways to accomplish this:
     25 * Build each platform on a system running the oldest OS you need to support, then combine them into a Universal Binary using the lipo command-line utility:
     26    * A PowerPC development system running OS 10.3.0 through 10.3.8 (or 10.3.9 if you won't support the older systems)
     27    * An Intel development system running OS 10.4.x
     28    * A 64-bit development Intel system running OS 10.5.x (The original Intel Macs used an Intel Core Duo processor which was 32-bit only.  You must have an Intel Core 2 Duo or newer processor to run 64-bit applications.)  However, at the time this is written, the BOINC Makefiles do not directly build 64-bit binaries
     29 * Use a single development system running OS 10.5.x and cross-compile for the various platforms.  The remainder of this document describes that process.
     30
     31'''The above requirements apply not only BOINC itself, but also the !WxWidgets, JPEG, c-ares and cURL libraries, as well as all project applications.''' The BOINC Client does not use !WxWidgets or JPEG, so only the c-ares and cURL libraries must be built for  the x86_64 architecture.
     32
     33Be sure to follow the directions in this document to ensure that these requirements are met.
     34
    1835BOINC 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.
    1936
    20 BOINC version 6.1.0 Client and libraries include support for the x86_64 (64-bit Intel) architecture.
    21 
    22 All BOINC software for Power PC Macs must be built using MacOS10.3.9 SDK to assure backward compatibility with OS 10.3.9.[[BR]]
    23 All 32-bit BOINC software for Intel Macs must be built using GCC 4.0 and MacOS10.4.u SDK to allow cross-compiling.[[BR]]
    24 All 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, c-ares and cURL libraries, as well as all project applications.''' The BOINC Client does not use !WxWidgets or JPEG, so only the c-ares and cURL libraries must be built for  the x86_64 architecture.
    27 
    28 Be sure to follow the directions in this document to ensure that these requirements are met.
     37The BOINC Client includes support for the x86_64 (64-bit Intel) architecture beginning with version 6.1.0.
    2938
    3039'''Building BOINC now requires XCode Tools version 2.4.1 or later; XCode 3.0 or later is recommended.'''  Note that the MacOS10.3.9 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.
     
    3443You also need to install Subversion itself. One place to get it is: [http://www.codingmonkeys.de/mbo/]
    3544
    36 == Building BOINC libraries to link with project applications ==
    37 
    38 BOINC 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 and science applications are still built using GCC 3.3.
    39 
    40 Beware of using the wrong compiler! Apple's release notes for GCC 4.0 say:
    41 
    42     If your application must support versions of Mac OS X prior to 10.3.9, you must not use the GCC 4.0 compiler. Instead, build your project using the GCC 3.3 compiler.
    43 
    44 Elsewhere on Apple's web site is the warning:
    45 
    46     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.
    47 
    48 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) either `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:
    49 
    50   1. Use the BOINC autoconf / automake scripts to build these libraries and any 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.
    51 
    52  (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.)
    53  
    54 At 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.
    57 
    58 This document gives instructions only for the second method.
    59 
    60 After 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 
    62 If you prefer, you can cross-compile on one Mac running OS 10.4.x or OS 10.5.x.  See [wiki:MacBuild/#Buildingprojectapplications Building project applications] below.
    63 
    6445== Building BOINC Manager with embedded Core Client plus libraries libboinc.a and libboinc_graphics_api.a ==
     46
    6547
    6648BOINC depends on four third-party libraries: wxMac-2.8.7, c-ares-1.5.1, curl-7.18.0, and jpeg-6b. You can obtain these from the following URLs: