Difference between revisions of "Documentation/Building Guide AOO/Building on MacOsX"

From Apache OpenOffice Wiki
Jump to: navigation, search
(xcode5 doesn't contain autoconf anymore)
(24 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
{{DISPLAYTITLE:Building on MacOSX}}
 
{{DISPLAYTITLE:Building on MacOSX}}
 
[[Category:MacOSX]][[Category:Documentation]]
 
[[Category:MacOSX]][[Category:Documentation]]
 +
[[Category:Build_System]]
  
 
__TOC__
 
__TOC__
Line 11: Line 12:
 
= Overview =
 
= Overview =
  
For general information on how to build Apache OpenOffice from source code, see the [[Documentation/Building_Guide_AOO|platform independent page]].
+
Building Apache OpenOffice from source code follows the  
 +
platform independent [[Documentation/Building_Guide_AOO| building guide]]
 +
when the build requirements outlined below are fulfilled.
  
See also this slightly older [[Documentation/Building_Guide/Building_on_MacOSX|building guide]].
+
= General build requirements =
  
 +
Please see the [[Documentation/Building Guide AOO#General_Build_Requirements|general build requirements]] page.
  
= Build requirements =
+
= Mac specific requirements for building AOO 4.1 (and older) =
Additionally to the [[Documentation/Building Guide AOO#General_Build_Requirements|general build requirements]] you need
+
 
+
== for building AOO 4.1 and newer ==
+
  
 
{| class="prettytable" border="1" width="100%"
 
{| class="prettytable" border="1" width="100%"
Line 29: Line 30:
 
| provided by Apple
 
| provided by Apple
 
|-  
 
|-  
| Xcode version 4.5 or later.
+
| Xcode version 7 or later.
| Use the App Store application to get and install it. If you got Xcode 5.x some [[#XCODE5|extra steps]] are needed.
+
| Use the App Store application to get and install it. For Xcode 7 (or newer) some [[#XCODE7|extra steps]] are needed.
 
You can also [http://developer.apple.com/technology/xcode.html download] it free of charge, but a registration at the [https://connect.apple.com/ Apple Developer Connection] site is required for that.  
 
You can also [http://developer.apple.com/technology/xcode.html download] it free of charge, but a registration at the [https://connect.apple.com/ Apple Developer Connection] site is required for that.  
 
|-  
 
|-  
 
| MacOSX SDK
 
| MacOSX SDK
| SDKs compatible with OSX 10.7 are automatically provided by installing XCode 4.5 or newer
+
| SDKs compatible with OSX 10.7 are automatically provided by installing XCode 7 or newer. That most recent compatible SDK is 10.11; SDKs for 10.12 and above are not supported due to Apple's deprecation of Quicktime, which is needed for vcl.
 
|-
 
|-
 
| gnutar
 
| gnutar
Line 41: Line 42:
 
|}
 
|}
  
== for building AOO 3.4 and 4.0 ==
+
<div id="XCODE5">
  
{| class="prettytable" border="1" width="100%"
+
= Requirements for Xcode 7 (or newer) =
|-
+
!style="width: 20%"|What
+
! Where to get / Remarks
+
|-
+
| Mac OS X version 10.4 (aka Tiger) or later
+
| If you are using 10.5 aka Leopard, have a look at [[User:Dyrcona/LeopardBuild#flex]].
+
|-
+
|Mac 10.4 SDK
+
|
+
|-
+
|XCode version 2.4.1 or later
+
|
+
*For Mac OS X 10.7 (aka Lion), XCode 3.2.6 has be installed.
+
*If you want to use a newer version than the one that is shipped with your Mac OS X installation media, you need to register at the [https://connect.apple.com/ Apple Developer Connection] site (free of charge) to be able to [http://developer.apple.com/technology/xcode.html download it].
+
*On Mac OS X 10.6 (Snow Leopard), make sure to install the optional 10.4 SDK with XCode.
+
|}
+
 
+
<div id="XCODE5">
+
== Extra Requirements for Xcode 5 ==
+
 
{| class="prettytable" border="1" width="100%"
 
{| class="prettytable" border="1" width="100%"
 
|-
 
|-
Line 74: Line 56:
 
| autoconf
 
| autoconf
 
| Run these commands in a terminal
 
| Run these commands in a terminal
  curl -OL http://ftpmirror.gnu.org/tar/autoconf-2.69.tar.bz2
+
  curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.bz2
 
  tar xvjf autoconf-2.69.tar.bz2
 
  tar xvjf autoconf-2.69.tar.bz2
 
  pushd autoconf-2.69
 
  pushd autoconf-2.69
Line 83: Line 65:
 
|}
 
|}
  
 +
Alternatively, you can also install via MacPorts
 
</div>
 
</div>
  
 
<div id="OSX109">
 
<div id="OSX109">
== Extra Requirements for OSX >= 10.9 ==
+
 
 +
= OSX 10.9 (or newer) specific requirements =
 
{| class="prettytable" border="1" width="100%"
 
{| class="prettytable" border="1" width="100%"
 
|-
 
|-
Line 103: Line 87:
 
  popd
 
  popd
 
|}
 
|}
 +
 +
Alternatively, you can also install via MacPorts
 +
 
</div>
 
</div>
  
{{Template:Documentation/Note|Java: On systems < Mac OS X 10.7 Apache OpenOffice does not build yet using Java SDK 1.6.0. If you didn't configure Mac OS X for a 1.6, you don't need to do anything - the default (1.5) is OK. To change the default Java version go to Applications/Utilities/Java and modify accordingly}}
+
= Reference Build System =
 +
 
 +
The reference build system for AOO 4.1.x and 4.2.x is a macOS VM with 8x3.33 cores and 24GB of RAM. The AOO 4.1.x VM is running macOS 10.13 (High Sierra) with Xcode 11,  but requires the MacOSX10.11.sdk (SDK 10.12 and above do not support QuickTime, which is a requirement for AOO 4.1.x). We use  [https://github.com/devernay/xcodelegacy xcodelegacy] to install the required SDK into Xcode (You could also use Xcode7 directly). This setup is also configured to allow us to product the "Official" Community builds for macOS/OSX and supports versions as old as 10.9 (''Mavericks''). On this platform it takes 2-3 hours for a full build.
 +
 
 +
For AOO 4.2.x and later, we are running macOS 10.15 (Catalina) and Xcode 12.2. This allows us to continue to build for older platforms (as old as OS X '''10.9'''! ) but also sign our releases for Apple Gatekeeper compatibility and deprecate the requirement for a QuickTime-compatible SDK.
 +
 
 +
If building for your own setup, some of the below may not be required.
 +
 
 +
== 3rd Party Requirements ==
 +
 
 +
=== Installed in /usr/local: ===
 +
 
 +
* Apache ant 1.9.9 (or later)
 +
* dmake 4.13.0 / https://github.com/jimjag/dmake/archive/v4.13.1/dmake-4.13.1.tar.gz  (./configure --prefix=/usr/local)
 +
* epm 5.0.0 / https://github.com/jimjag/epm/archive/v5.0.0/epm-5.0.0.tar.gz (./configure --prefix=/usr/local)
 +
* openssl 1.0.2l (or later) (no-shared)
 +
* libxml2-2.9.6 (or later) (--prefix=/usr/local --enable-shared=no --without-iconv)
 +
* libxslt-1.1.31 (or later) (--prefix=/usr/local --enable-shared=no)
 +
* pkg-config 0.29.2 (or later) (--prefix=/usr/local)
 +
* jdk-7u80-macosx-x64
 +
 
 +
You will notice that the recommended version of epm for OS X is 4.3 (or later); This is because previous versions required the long deprecated '''''PackageMaker''''' application (as well as '''''PackageMaker''''' being installed in a hardcoded location). Starting with epm 4.3, the official OS X ''pkgbuild'' utility is supported, removing the need for '''''PackageMaker'''''. AOO specific versions of epm and dmake are available [https://github.com/jimjag/ on Github].
 +
 
 +
=== Installed in /opt/local via MacPorts: ===
 +
 
 +
* autoconf (symlinked to /usr/local/bin)
 +
* gnutar (symlinked to /usr/local/bin)
 +
* perl5 (symlinked to /usr/local/bin)
 +
* subversion
 +
* git
 +
 
 +
You will also need to install the required Perl packages noted in the general build page since OS X does not include them by default. If you don't want to mix System and User modifications, you can use MacPorts/HomeBrew to install Perl and use this user-land version for these extra packages.
 +
 
 +
== Local Environment Requirements: ==
 +
* Make sure that ''/usr/local/bin'' is in your ''PATH''.
 +
* Set and export JAVA_HOME (export JAVA_HOME=$(/usr/libexec/java_home -v 1.7))
 +
* Ensure that these env variables are also correct (and exported):
 +
** ANT_HOME=/usr/local/share/java/apache-ant
 +
** LIBRARY_PATH=/usr/local/lib
 +
** C_INCLUDE_PATH=/usr/local/include
 +
** CPLUS_INCLUDE_PATH=/usr/local/include
 +
 
 +
== Configure and Build ==
 +
 
 +
{| class="prettytable" border="1" width="100%"
 +
| Run this command in a terminal
 +
./configure  \
 +
        --enable-verbose \
 +
        --with-openldap \
 +
        --enable-category-b \
 +
        --enable-bundled-dictionaries \
 +
        --enable-wiki-publisher \
 +
        --without-junit \
 +
        --with-jdk-home="$JAVA_HOME" \
 +
        --with-ant-home="$ANT_HOME" \
 +
        --with-epm=/usr/local/bin/epm \
 +
        --with-dmake-path=/usr/local/bin/dmake \
 +
        --without-stlport \
 +
        --with-package-format="dmg" \
 +
        --disable-systray \
 +
        --with-alloc=internal \
 +
        --with-lang="${LANGS}"
 +
|}
 +
 
 +
The ''LANGS'' env variable should contain the list of languages you wish to build for (e.g. "en-GB en-US es eu fi").
 +
 
 +
Continue with the standard, platform independent build instructions. Copies of the official build scripts (and their corresponding ''config.log'' outputs) can be found [https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ here].

Revision as of 19:04, 4 January 2021

Template:Documentation/Building Guide AOO TOC

Overview

Building Apache OpenOffice from source code follows the platform independent building guide when the build requirements outlined below are fulfilled.

General build requirements

Please see the general build requirements page.

Mac specific requirements for building AOO 4.1 (and older)

What Where to get / Remarks
Mac OS X version 10.7 (aka Lion) or later provided by Apple
Xcode version 7 or later. Use the App Store application to get and install it. For Xcode 7 (or newer) some extra steps are needed.

You can also download it free of charge, but a registration at the Apple Developer Connection site is required for that.

MacOSX SDK SDKs compatible with OSX 10.7 are automatically provided by installing XCode 7 or newer. That most recent compatible SDK is 10.11; SDKs for 10.12 and above are not supported due to Apple's deprecation of Quicktime, which is needed for vcl.
gnutar OSX<=10.8 contains the tool directly, for OSX>=10.9 some extra steps are needed.

Requirements for Xcode 7 (or newer)

What Where to get / Remarks
Xcode commandline tools run this command in a terminal
sudo xcode-select --install
autoconf Run these commands in a terminal
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.bz2
tar xvjf autoconf-2.69.tar.bz2
pushd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
popd

Alternatively, you can also install via MacPorts

OSX 10.9 (or newer) specific requirements

What Where to get / Remarks
gnutar Run these commands in a terminal
curl -OL http://ftpmirror.gnu.org/tar/tar-1.27.tar.bz2
tar xvjf tar-1.27.tar.bz2
pushd tar-1.27
./configure --prefix=/usr/local
make
sudo make install
sudo ln -s /usr/local/bin/tar /usr/local/bin/gnutar
popd

Alternatively, you can also install via MacPorts

Reference Build System

The reference build system for AOO 4.1.x and 4.2.x is a macOS VM with 8x3.33 cores and 24GB of RAM. The AOO 4.1.x VM is running macOS 10.13 (High Sierra) with Xcode 11, but requires the MacOSX10.11.sdk (SDK 10.12 and above do not support QuickTime, which is a requirement for AOO 4.1.x). We use xcodelegacy to install the required SDK into Xcode (You could also use Xcode7 directly). This setup is also configured to allow us to product the "Official" Community builds for macOS/OSX and supports versions as old as 10.9 (Mavericks). On this platform it takes 2-3 hours for a full build.

For AOO 4.2.x and later, we are running macOS 10.15 (Catalina) and Xcode 12.2. This allows us to continue to build for older platforms (as old as OS X 10.9! ) but also sign our releases for Apple Gatekeeper compatibility and deprecate the requirement for a QuickTime-compatible SDK.

If building for your own setup, some of the below may not be required.

3rd Party Requirements

Installed in /usr/local:

You will notice that the recommended version of epm for OS X is 4.3 (or later); This is because previous versions required the long deprecated PackageMaker application (as well as PackageMaker being installed in a hardcoded location). Starting with epm 4.3, the official OS X pkgbuild utility is supported, removing the need for PackageMaker. AOO specific versions of epm and dmake are available on Github.

Installed in /opt/local via MacPorts:

  • autoconf (symlinked to /usr/local/bin)
  • gnutar (symlinked to /usr/local/bin)
  • perl5 (symlinked to /usr/local/bin)
  • subversion
  • git

You will also need to install the required Perl packages noted in the general build page since OS X does not include them by default. If you don't want to mix System and User modifications, you can use MacPorts/HomeBrew to install Perl and use this user-land version for these extra packages.

Local Environment Requirements:

  • Make sure that /usr/local/bin is in your PATH.
  • Set and export JAVA_HOME (export JAVA_HOME=$(/usr/libexec/java_home -v 1.7))
  • Ensure that these env variables are also correct (and exported):
    • ANT_HOME=/usr/local/share/java/apache-ant
    • LIBRARY_PATH=/usr/local/lib
    • C_INCLUDE_PATH=/usr/local/include
    • CPLUS_INCLUDE_PATH=/usr/local/include

Configure and Build

Run this command in a terminal
./configure   \
       --enable-verbose \
       --with-openldap \
       --enable-category-b \
       --enable-bundled-dictionaries \
       --enable-wiki-publisher \
       --without-junit \
       --with-jdk-home="$JAVA_HOME" \
       --with-ant-home="$ANT_HOME" \
       --with-epm=/usr/local/bin/epm \
       --with-dmake-path=/usr/local/bin/dmake \
       --without-stlport \
       --with-package-format="dmg" \
       --disable-systray \
       --with-alloc=internal \
       --with-lang="${LANGS}" 

The LANGS env variable should contain the list of languages you wish to build for (e.g. "en-GB en-US es eu fi").

Continue with the standard, platform independent build instructions. Copies of the official build scripts (and their corresponding config.log outputs) can be found here.

Personal tools