Difference between revisions of "How to build AOO on MacOSX 10.8"

From Apache OpenOffice Wiki
Jump to: navigation, search
(To solve build break #1)
Line 34: Line 34:
 
== To solve build break #1 ==
 
== To solve build break #1 ==
 
<big>Module</big> : pyuno
 
<big>Module</big> : pyuno
 +
 
<big>The original error message</big>
 
<big>The original error message</big>
 
   /Users/hchao/Apache/build/aoo.20120802/code/main/pyuno/source/module/pyuno_runtime.cxx:68: error: ‘PyVarObject_HEAD_INIT’ was not declared in this scope
 
   /Users/hchao/Apache/build/aoo.20120802/code/main/pyuno/source/module/pyuno_runtime.cxx:68: error: ‘PyVarObject_HEAD_INIT’ was not declared in this scope
 +
 
<big>Root cause</big> : There is no "PyVarObject_HEAD_INIT" for Python 2.7 on MacOSX 10.8.  The related revision is 1367858 "pyuno: Replace PyObject_HEAD_INIT with PyVarObject_HEAD_INIT and add some initial Python3 safeguards."
 
<big>Root cause</big> : There is no "PyVarObject_HEAD_INIT" for Python 2.7 on MacOSX 10.8.  The related revision is 1367858 "pyuno: Replace PyObject_HEAD_INIT with PyVarObject_HEAD_INIT and add some initial Python3 safeguards."
  
Line 44: Line 46:
 
   build
 
   build
 
   deliver
 
   deliver
 
+
 
 
== To solve build break #2 ==
 
== To solve build break #2 ==
 
<big>Module</big> : avmedia
 
<big>Module</big> : avmedia

Revision as of 05:32, 8 August 2012

I'm trying to make AOO buildable on the latest MacOSX 10.8 - Mountain Lion. As what we did on MacOSX 10.7, we have to install Xcode 3.2 with SDK 10.4u. There are still some build breaks for AOO, which need to solve one by one.

To install Xcode 3.2 on MacOSX 10.8

Please refer to [1]. You need to change "10.7" to "10.9". The machine will reboot and the system will meet "kernel panics" after install Xcode 3.2. You need to enter the "Safe Mode" and delete some files.

Press "shift" during startup to enter the "Safe Mode". Go to the dir "/System/Library/Extentions/". Delete the following files, which belong to Xcode 3.2 on MacOSX 10.6

    (1) AppleProfileFamily.kext
    (2) CHUDKernLib.kext
    (3) CHUDProf.kext
    (4) CHUDUtils.kext

Reboot the machine normally. Please refer to [2]

To install JVM

Go to dir "/Applications/Utilities/", launch "Java Preferences.app" to start to download JVM

To install command support package with Xcode 4.4

There is no commands like "make", "svn" in "/usr/bin" on MacOSX 10.8 with Xcode 3.2. You need to download Xcode 4.4, launch it, click on memu "Xcode / Preferences..." to popup a dialog, select "Downloads / Components", click to install "Command Line Tools"

To build AOO's source code

Open a terminal, run cmds as below

    svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk/ code
    cd code/main
    autoconf
    ./configure --with-dmake-url="http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2" --with-epm-url="http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz" --disable-build-mozilla --enable-category-b --enable-minimizer --enable-presenter-console --enable-wiki-publisher
    ./bootstrap
    source MacOSXX86Env.Set.sh
    cd instsetoo_native
    build --all -P4
  

To solve build break #1

Module : pyuno

The original error message

 /Users/hchao/Apache/build/aoo.20120802/code/main/pyuno/source/module/pyuno_runtime.cxx:68: error: ‘PyVarObject_HEAD_INIT’ was not declared in this scope

Root cause : There is no "PyVarObject_HEAD_INIT" for Python 2.7 on MacOSX 10.8. The related revision is 1367858 "pyuno: Replace PyObject_HEAD_INIT with PyVarObject_HEAD_INIT and add some initial Python3 safeguards."

Solution : To revert the revision from 1367858 to 1366479 for module pyuno

 cd pyuno
 rm -rf unxmaci.pro
 svn up -r 1366479
 build
 deliver

To solve build break #2

Module : avmedia The original error message

 Checking DLL ../unxmacxi.pro/lib/libavmedia.dylib ...: ERROR: dlopen(../unxmacxi.pro/lib/libavmedia.dylib, 2): Symbol not found: ___CFConstantStringClassReference
 Referenced from: /Users/hchao/Apache/build/aoo.20120802/code/main/solver/350/unxmacxi.pro/lib/libsfx.dylib
 Expected in: /Users/hchao/Apache/build/aoo.20120802/code/main/solver/350/unxmacxi.pro/lib/libsfx.dylib

Root cause : can not link to "___CFConstStringClassReference"

Solution : ?

 cd avmedia
 rm -rf unxmaci.pro
 ???
 build
 deliver

Reference

[1] http://anatomicwax.tumblr.com/post/7906770311/installing-xcode-3-2-6-on-lion

[2] https://discussions.apple.com/thread/4145448?start=0&tstart=0

Personal tools