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

From Apache OpenOffice Wiki
Jump to: navigation, search
(El Capitan General build hints)
Line 90: Line 90:
 
</div>
 
</div>
  
= El Capitan General build hints =
+
= Reference Build System =
  
To build Apache OpenOffice under El Capitan, or even under other versions of OS X, it is generally easier to install MacPorts (https://www.macports.org) or HomeBrew (http://brew.sh). This will allow you to satisfy all general build requirements as well as OS X specifics. On a base install of OS X with Xcode and assuming MacPorts, these should be installed:
+
The reference build system for AOO 4.1.x and 4.2.x is a macOS VM with 6 cores and 16GB of RAM. It is currently running macOS 10.12 (Sierra) but requires Xcode7 due to SDK requirements (SDK 10.12 does not support QuickTime, which is a requirement for AOO). This setup is also configured to allow us to product the "Official" Community builds for macOS/OSX and supports versions as old as 10.7 (Lion). If building for your own setup, some of the below may not be required.
  
* port install gnutar
+
== 3rd Party Requirements ==
* port install autoconf
+
* port install serf
+
* port install apache-ant
+
  
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. I recommend installing epm and dmake directly, rather than using/building at AOO build time. Fortunately, these are easy and straightforward to install:
+
=== Installed in /usr/local: ===
  
{| class="prettytable" border="1" width="100%"
+
* Apache ant 1.9.9
|-
+
* dmake 4.12 (./configure --prefix=/usr/local)
! style="width: 20%"|What
+
* epm 4.4 or 4.3 (./configure --prefix=/usr/local)
! How
+
* openssl 1.0.2l (or later) (no-shared)
|-
+
* libxml2-2.9.6 (or later) (--prefix=/usr/local --enable-shared=no --without-iconv)
| epm
+
* libxslt-1.1.31 (or later) (--prefix=/usr/local --enable-shared=no)
| Run these commands in a terminal
+
* pkg-config 0.29.2 (or later) (--prefix=/usr/local)
curl -OL https://www.msweet.org/files/project2/epm-4.3-source.tar.gz
+
* jdk-7u80-macosx-x64
tar xvf epm-4.3-source.tar.gz
+
pushd epm-4.3
+
./configure --prefix=/usr/local
+
make
+
sudo make install
+
popd
+
|-
+
| dmake
+
| Run these commands in a terminal
+
curl -OL http://sourceforge.net/projects/oooextras.mirror/files/dmake-4.12.tar.bz2
+
tar xvfj dmake-4.12.tar.bz2
+
push dmake-4.12
+
./configure --prefix=/usr/local
+
make
+
sudo make install
+
popd
+
|}
+
  
 
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'''''.
 
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'''''.
  
Final Note: I know that it is generally recommended that MacPorts be installed in ''/opt/local'', but it is much easier if you install it in ''/usr/local''.
+
=== 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:
 +
** ANT_HOME=/usr/local/share/java/apache-ant
 +
** JUNIT_PATH=/usr/local/share/java/junit.jar
 +
** LIBRARY_PATH=/usr/local/lib
 +
** C_INCLUDE_PATH=/usr/local/include
 +
** CPLUS_INCLUDE_PATH=/usr/local/include

Revision as of 18:04, 1 December 2017

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 newer)

What Where to get / Remarks
Mac OS X version 10.7 (aka Lion) or later provided by Apple
Xcode version 4.5 or later. Use the App Store application to get and install it. For Xcode 5 (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 4.5 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 5 (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 6 cores and 16GB of RAM. It is currently running macOS 10.12 (Sierra) but requires Xcode7 due to SDK requirements (SDK 10.12 does not support QuickTime, which is a requirement for AOO). This setup is also configured to allow us to product the "Official" Community builds for macOS/OSX and supports versions as old as 10.7 (Lion). 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
  • dmake 4.12 (./configure --prefix=/usr/local)
  • epm 4.4 or 4.3 (./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.

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:
    • ANT_HOME=/usr/local/share/java/apache-ant
    • JUNIT_PATH=/usr/local/share/java/junit.jar
    • LIBRARY_PATH=/usr/local/lib
    • C_INCLUDE_PATH=/usr/local/include
    • CPLUS_INCLUDE_PATH=/usr/local/include
Personal tools