<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ponderability</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ponderability"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Ponderability"/>
	<updated>2026-10-19T15:38:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=51468</id>
		<title>Mac OS X Build Instructions (X11)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=51468"/>
		<updated>2007-10-28T04:27:53Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Special Thanks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current build instructions also at: http://porting.openoffice.org/mac/build_680_X11.html. Those are being moved to this page at OOo Wiki.&lt;br /&gt;
&lt;br /&gt;
For historical reasons, there is also [[Mac OS X Build Instructions of SRC_m71]]&lt;br /&gt;
&lt;br /&gt;
Note: supported compilers for Mac can be found in [[Compiler versions used by port maintainers and release engineers]]&lt;br /&gt;
&lt;br /&gt;
Other [[:Category:MacOSX|Mac OS X related Wiki pages]].&lt;br /&gt;
&lt;br /&gt;
=== Building OpenOffice.org X11 for Mac OS X PPC and Mac OS X x86===&lt;br /&gt;
&lt;br /&gt;
Authors: Eric Hoch&lt;br /&gt;
&lt;br /&gt;
Revised 2006-01-23&lt;br /&gt;
&lt;br /&gt;
=== Introduction===&lt;br /&gt;
&lt;br /&gt;
These build instructions are based upon milestone 680_m140 and higher.&lt;br /&gt;
&lt;br /&gt;
Due to the nature of a port in progress this document cannot give a general overview of all the current patches necessary to build a specific milestone. To get this information we recommend you to subscribe to our porting mailing list dev@porting.openoffice.org.&lt;br /&gt;
&lt;br /&gt;
There you&amp;#039;ll get all the latest information about patches and everything else related to and needed to port OpenOffice.org to the Mac.&lt;br /&gt;
&lt;br /&gt;
=== Special Thanks===&lt;br /&gt;
Before we begin let me thank all the people without whom these build instructions would make no sense, the coders who are helping to bring OOo 2.0 to Mac OS X.&lt;br /&gt;
The coders and supporters behind the Mac port are:&lt;br /&gt;
&lt;br /&gt;
    Eric Bachard&lt;br /&gt;
    Thorsten Behrens&lt;br /&gt;
    Etsushi Kato&lt;br /&gt;
    Florian Heckl&lt;br /&gt;
    Pavel Janik&lt;br /&gt;
    Nakata Maho&lt;br /&gt;
    James McKenzie&lt;br /&gt;
    Tino Rachui&lt;br /&gt;
    Stephan Schäfer&lt;br /&gt;
    Eric Hoch&lt;br /&gt;
    Shaun McDonald&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
    * The fastest machine you can find. It&amp;#039;d be good if it had memory, too.&lt;br /&gt;
    * Mac OS X 10.3.5 or Mac OS X 10.4.x including all the latest available Security Updates for &lt;br /&gt;
      your version of Mac OS X&lt;br /&gt;
    * on Mac OS X 10.3.x: XCode 1.5 plus November 2004 gcc 3.3 Update for &lt;br /&gt;
    * on Mac OS X 10.4.x: XCode 2.1&lt;br /&gt;
      Note: You can get both applications after a free registration at http://connect.apple.com&lt;br /&gt;
    * JDK 1.4.2 plus latest SDK Updates (with full JDK SDK for the headers)&lt;br /&gt;
    * an installed X-Server. We recommend Apple&amp;#039;s X11 but you can also use the ones of X.org or Xfree86&lt;br /&gt;
    * A minimum of 4 to 5GB for a standard build. &lt;br /&gt;
      Note: Usage of disk space depends upon the number of localizations you build for. &lt;br /&gt;
      More localizations means more disk space needed.&lt;br /&gt;
      A minimum of 18GB for a full debug build.&lt;br /&gt;
    * If you can afford it we recommend you to backup clean sources and work with a second set of sources.&lt;br /&gt;
      With a second set of clean sources you can easily go back to clean sources if a module doesn&amp;#039;t build, &lt;br /&gt;
      a patch doesn&amp;#039;t solve the problem, you have to revert a patch or for any other reason there may be. &lt;br /&gt;
      In the meantime cvs sources could have been edited and you need to recompile more modules then just &lt;br /&gt;
      one and that&amp;#039;s probably not what you want...&lt;br /&gt;
&lt;br /&gt;
===Determine the shell you use for compilation===&lt;br /&gt;
&lt;br /&gt;
The default shell of a cleanly installed Mac OS X 10.3.x/Mac OS X 10.4.x is bash.&lt;br /&gt;
If you did an update to 10.3.x or 10.4.x from early versions of Mac OS X while keeping your personal settings you may still use the tcsh shell, the default shell of Mac OS X 10.0 to 10.2.x.&lt;br /&gt;
&lt;br /&gt;
Where necessary this read-me distinguishes between bash and tcsh.&lt;br /&gt;
&lt;br /&gt;
To determine the shell you currently use open Terminal.app and type the following command:&lt;br /&gt;
&lt;br /&gt;
ps -p $$&lt;br /&gt;
&lt;br /&gt;
The output shows you which shell you&amp;#039;re currently using.&lt;br /&gt;
&lt;br /&gt;
-/bin/bash or -bash means you are using bash&lt;br /&gt;
&lt;br /&gt;
-/bin/tcsh or -tcsh means you are using the c-shell&lt;br /&gt;
&lt;br /&gt;
===Getting OpenOffice.org and External Sources===&lt;br /&gt;
&lt;br /&gt;
====Getting OpenOffice.org Source from CVS====&lt;br /&gt;
&lt;br /&gt;
Once you have X properly installed, it&amp;#039;s time to get the OpenOffice.org sources and other external sources. If you&amp;#039;ve built OpenOffice.org from previous sources and have applied other patches, you will need to start from scratch with a fresh CVS version of the sources.&lt;br /&gt;
&lt;br /&gt;
Download the CVS distribution for SRC680_mXXX (replace XXX by the current milestonenumber):&lt;br /&gt;
&lt;br /&gt;
   1. Open a new Terminal (/Applications/Utilities/Terminal)&lt;br /&gt;
   2. mkdir 680_mXXX/source&lt;br /&gt;
   3. cd 680_mXXX/source&lt;br /&gt;
   4. Now set the CVSROOT&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            setenv CVSROOT :pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
   5. cvs login&lt;br /&gt;
   6. Enter the password anoncvs&lt;br /&gt;
   7. cvs -z3 co -r SRC680_mXXX OpenOffice2&lt;br /&gt;
      for later milestones simply replace the XXX with the most current milestonenumber&lt;br /&gt;
   8. go get some coffee, or a beer, since it&amp;#039;ll take a while to get it all &lt;br /&gt;
&lt;br /&gt;
Note that if your computer is behind a firewall and you&amp;#039;re trying to get the sources from the CVS server, you may need to find a proper way to get it to tunnel through the firewall. The protocol runs on port 2401, and some firewalls will not allow communication on this port.&lt;br /&gt;
&lt;br /&gt;
Attention: We recommend a broadband connection and a not too small amount of volume or time left within your contract since the sources are about 300MB and the checkout could take up to an hour or longer depending on the server load.&lt;br /&gt;
&lt;br /&gt;
For further information on this topic see get the source&lt;br /&gt;
&lt;br /&gt;
To get a second copy of the sources use the following commands within your 680_mXXX directory:&lt;br /&gt;
&lt;br /&gt;
   1. cd ..&lt;br /&gt;
   2. mkdir build&lt;br /&gt;
   3. cd build&lt;br /&gt;
   4. cp -R ../source/* .&lt;br /&gt;
&lt;br /&gt;
==== Additional software that&amp;#039;s not in the official OpenOffice.org sources ====&lt;br /&gt;
&lt;br /&gt;
Now that you have the sources it&amp;#039;s time to get the software that is not in the official OOo Source Code Tree.&lt;br /&gt;
&lt;br /&gt;
    * The perl module Archive::Zip&lt;br /&gt;
    * gpc - optional - NOT NEEDED&lt;br /&gt;
    * pkg-config&lt;br /&gt;
    * gtk2 - optional - not needed&lt;br /&gt;
    * X11&lt;br /&gt;
    * unowinreg.dll&lt;br /&gt;
&lt;br /&gt;
To install Archive::Zip use the following commands in Terminal.app:&lt;br /&gt;
&lt;br /&gt;
   1. perl -MCPAN -eshell&lt;br /&gt;
   2. install Archive::Zip&lt;br /&gt;
&lt;br /&gt;
If this is your first installation of a module using CPAN you&amp;#039;re asked to configure the CPAN environment. If you&amp;#039;re not 100% sure what to answer simply accept the default answers.&lt;br /&gt;
&lt;br /&gt;
Note: In some cases using CPAN with Mac OS X is a bit problematic. In this case simply follow the instructions given here on this website http://sial.org/howto/perl/life-with-cpan/macosx/ to solve the problem.&lt;br /&gt;
&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
Since OS X comes with no pkg-config, or to be more specific it&amp;#039;s simply not complete in OS X, you have to install it via fink (http://fink.sourceforge.net), MacPorts (http://www.macports.org) or the gentoo port system (http://www.metadistribution.org/macos/).&lt;br /&gt;
&lt;br /&gt;
If you need cups headers (on Mac OS X 10.3., building reports &amp;quot;cups.h missing&amp;quot;), then download them from http://ftp.cusoo.org/MacOSX/Utilities/PowerPC/cups_Panther/cups.tar.gz and put the headers to &amp;quot;/usr/include/cups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you want to compile OpenOffice.org with gtk2 support you have to install gtk2 via your porting_mechanism&lt;br /&gt;
Note: The most current versions of gkt2 and pkg-config are in about 90% of all cases only available as sources that you need to compile and not as binaries. Please consider this while preparing your mac.&lt;br /&gt;
&lt;br /&gt;
Additional Note for fink users: You need to install both packages gtk2 and gtk2-devel using fink install &amp;lt;/package name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yes, there are other porting mechanisms out there such as the one of NetBSD or you can get precompiled versions of gtk, gnu_copy and pkg-config via pages like osxgnu but the author of these build instructions has no experiences with these so no recommendation for them here.&lt;br /&gt;
&lt;br /&gt;
Note: If you need help with installing or maintaining packages please contact the project that provides the porting_mechanism.&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to compile pkg-config, gnu_copy as part of the gnu-coreutils and gtk2 without fink or Macports. Be aware that in this case you need to resolve the various dependencies yourself. So we recommend using one of the porting mechanisms.&lt;br /&gt;
&lt;br /&gt;
Because OS X does not install X11 by default and up to now you haven&amp;#039;t installed one, now may be the time do so.&lt;br /&gt;
There are various X for Mac OS X out there e.g. Apple&amp;#039;s X11, XDarwin.org&amp;#039;s XDarwin or simply use your porting_mechanism to install either X.org 6.8.x or Xfree86 &amp;gt;=4.3.&lt;br /&gt;
For help with your X11 please contact the provider of the package or your porting mechanism project&lt;br /&gt;
&lt;br /&gt;
By default OOo builds an Office Development Kit. This ODK requires you to download the unowinreg.dll from here  http://tools.openoffice.org/unowinreg_prebuild/680/.&lt;br /&gt;
&lt;br /&gt;
===Preparing to Build===&lt;br /&gt;
&lt;br /&gt;
====Adding gpc to OOo sources====&lt;br /&gt;
&lt;br /&gt;
   1. uncompress &amp;lt;path to gpc&amp;gt;/gpc231.tar.Z&lt;br /&gt;
   2. tar xvf &amp;lt;path to gpc&amp;gt;/gpc231.tar&lt;br /&gt;
   3. cp &amp;lt;path to gpc&amp;gt;/gpc.[hc] &amp;lt;ooo source directory&amp;gt;/build/external/gpc/&lt;br /&gt;
   4. rmdir gpc231&lt;br /&gt;
&lt;br /&gt;
====Adding unowinreg.dll to OOo sources====&lt;br /&gt;
&lt;br /&gt;
Copy the downloaded unowinreg.dll to &amp;lt;ooo source directory&amp;gt;/build/external/unowinreg/ &lt;br /&gt;
&lt;br /&gt;
====Applying Patches====&lt;br /&gt;
&lt;br /&gt;
To apply a patch&lt;br /&gt;
cd&lt;br /&gt;
into the direcotory for the module which needs to be patched and do a:&lt;br /&gt;
patch -p0 &amp;lt;path/to/the patch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the patches use the naming scheme&lt;br /&gt;
modul_(subdirectory_subdirectory_etc)_filetopatch.patch.&lt;br /&gt;
&lt;br /&gt;
To find all current patches do a search for issues in component subcomponent MacOSX.&lt;br /&gt;
&lt;br /&gt;
You can grab the patches necessary to avoid the freetype crash from my idisk public folder&lt;br /&gt;
&lt;br /&gt;
Due to the fact that not all the patches are from one author it&amp;#039;s sometimes necessary to change to the subdirectory/ies or not. In this case the patch knows which subdirectories to jump over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Building OpenOffice.org===&lt;br /&gt;
Now that we&amp;#039;ve got it all the source, it&amp;#039;s time to execute the build!&lt;br /&gt;
&lt;br /&gt;
   1. Open up a new Terminal.&lt;br /&gt;
   2. Configure for your build&lt;br /&gt;
   3. cd &amp;lt;path to ooo&amp;gt;/680_mXXX/build/config_office&lt;br /&gt;
   4. ./configure --with-x --with-lang=&amp;quot;de fr en-US&amp;quot;&lt;br /&gt;
      --with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home/&lt;br /&gt;
      --disable-build-mozilla --disable-neon --disable-gtk&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
      Instead of using --with-freetype2=... you can also use --with-system-freetype&lt;br /&gt;
      Attention: Darwinports gnu_copy is named gcp to avoid conflicts with Mac OS X cp&lt;br /&gt;
&lt;br /&gt;
      If you want to build with gtk-support please add --with-gtk2 to your configure script&lt;br /&gt;
      and/or want to use your own apache-ant add --with-ant-home=&amp;lt;your path&amp;gt;/680_mxx/apache-ant-1.6.5&lt;br /&gt;
&lt;br /&gt;
   5. If configure fails it will output an error message saying what&amp;#039;s missing or &lt;br /&gt;
      what else causes it&amp;#039;s breakage.&lt;br /&gt;
      Be sure to also check the warnings configure outputs at the end of the configuration process.&lt;br /&gt;
      Please report any breakage here with the error message output to dev@porting.openoffice.org&lt;br /&gt;
   6. cd ..&lt;br /&gt;
   7. ./bootstrap&lt;br /&gt;
   8. Set up your shell build enviroment:&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set.sh&lt;br /&gt;
            Intel: source MacOSXX86Env.Set.sh&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set&lt;br /&gt;
            Intel: source MacOSXX86Env.Set&lt;br /&gt;
   9. dmake&lt;br /&gt;
  10. Report any and all build failures to mac@porting.openoffice.org mail list&lt;br /&gt;
  11. cd instsetoo_native/unxmacxp.pro/OpenOffice/install&lt;br /&gt;
      Within this directory you will find a folder for each language that&lt;br /&gt;
      you build OpenOffice.org for. Those folders contain the installation disk images.&lt;br /&gt;
&lt;br /&gt;
====Additional Information for Macports Users====&lt;br /&gt;
When using Darwinports be sure to use ./configure without freetype since it leads to OpenOffice.org crashing with a version mismatch error when using Macport&amp;#039;s freetype. You will find the additional patches needed to build freetype within OpenOffice.org in the subdirectory freetype2_patches of the patch archive.&lt;br /&gt;
&lt;br /&gt;
====Using Mozilla within OpenOffice.org====&lt;br /&gt;
&lt;br /&gt;
If you decided to use Mozilla packages to get special functions OpenOffice.org provides you, as I did in the example configure script, you have two choices to get them:&lt;br /&gt;
&lt;br /&gt;
First:&lt;br /&gt;
&lt;br /&gt;
You let OpenOffice.org compile them. Be aware that this adds additional tim to your compiling time.&lt;br /&gt;
&lt;br /&gt;
If you decide to let OpenOffice.org compile Mozilla remove --disable-build-mozilla from the&lt;br /&gt;
./configure script and OpenOffice.org will compile Mozilla within the moz directory.&lt;br /&gt;
&lt;br /&gt;
   1. Before building Mozilla be sure to download Mozilla Sources. You can get them e.g. here:&lt;br /&gt;
      http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/&lt;br /&gt;
   2. cp mozilla-source-1.7.5.tar.gz &amp;lt;your path&amp;gt;/680_mXXX/moz/download&lt;br /&gt;
   3. cd &amp;lt;your path&amp;gt;/680_mXXX/moz&lt;br /&gt;
   4. cd config_office&lt;br /&gt;
   5. Use the same ./configure script out of but this time remove --disable-build-mozilla&lt;br /&gt;
   6. Continue with Step 5 of the &amp;quot;Building OpenOffice.org&amp;quot; paragraph&lt;br /&gt;
&lt;br /&gt;
OpenOffice.org should now compile mozilla within its build process.&lt;br /&gt;
&lt;br /&gt;
Second:&lt;br /&gt;
&lt;br /&gt;
You grab the Mozilla packages for PPC here:&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPinc.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPlib.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPruntime.zip&lt;br /&gt;
and put them into &amp;lt;ooo build directory&amp;gt;/680_mXXX/moz/zipped&lt;br /&gt;
OpenOffice.org should detect and use them.&lt;br /&gt;
&lt;br /&gt;
Please use the Mozilla packages from http://eric.bachard.free.fr/mac/moz/zipped/ these libraries are universal binaries. If you want to build using them on PPC architecture (with Tiger)  please rename them this way  :&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Archive || Name in Intel architecture || Name on PowerPC architecture&lt;br /&gt;
|-&lt;br /&gt;
| headers || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;inc.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;inc.zip&lt;br /&gt;
|-&lt;br /&gt;
| runtime || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;runtime.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;runtime.zip&lt;br /&gt;
|-&lt;br /&gt;
| libs || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;lib.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;lib.zip&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see, &amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039; means PowerPC, and &amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039; means Intel&lt;br /&gt;
&lt;br /&gt;
===Building the whole OpenOffice.org suite or just a single Project with Debug Information===&lt;br /&gt;
&lt;br /&gt;
To build the whole OpenOffice.org Suite with debug informations add&lt;br /&gt;
--enable-debug&lt;br /&gt;
to the configure command.&lt;br /&gt;
&lt;br /&gt;
To rebuild a complete project with debug information, remove all object files by removing the unxmacxp.pro directory. Then run dmake with the debug option set to true:&lt;br /&gt;
&lt;br /&gt;
    cd $SRC_ROOT/(module-name)&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; rm -rf unxmacxp.pro&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; build debug=true&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; deliver&lt;br /&gt;
&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:MacOSX]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=51467</id>
		<title>Mac OS X Build Instructions (X11)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=51467"/>
		<updated>2007-10-28T04:26:55Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current build instructions also at: http://porting.openoffice.org/mac/build_680_X11.html. Those are being moved to this page at OOo Wiki.&lt;br /&gt;
&lt;br /&gt;
For historical reasons, there is also [[Mac OS X Build Instructions of SRC_m71]]&lt;br /&gt;
&lt;br /&gt;
Note: supported compilers for Mac can be found in [[Compiler versions used by port maintainers and release engineers]]&lt;br /&gt;
&lt;br /&gt;
Other [[:Category:MacOSX|Mac OS X related Wiki pages]].&lt;br /&gt;
&lt;br /&gt;
=== Building OpenOffice.org X11 for Mac OS X PPC and Mac OS X x86===&lt;br /&gt;
&lt;br /&gt;
Authors: Eric Hoch&lt;br /&gt;
&lt;br /&gt;
Revised 2006-01-23&lt;br /&gt;
&lt;br /&gt;
=== Introduction===&lt;br /&gt;
&lt;br /&gt;
These build instructions are based upon milestone 680_m140 and higher.&lt;br /&gt;
&lt;br /&gt;
Due to the nature of a port in progress this document cannot give a general overview of all the current patches necessary to build a specific milestone. To get this information we recommend you to subscribe to our porting mailing list dev@porting.openoffice.org.&lt;br /&gt;
&lt;br /&gt;
There you&amp;#039;ll get all the latest information about patches and everything else related to and needed to port OpenOffice.org to the Mac.&lt;br /&gt;
&lt;br /&gt;
=== Special Thanks===&lt;br /&gt;
Before we begin let me thank all the people without whom those build instructions would make no sense, the coders that help bringing OOo 2.0 to Mac OS X.&lt;br /&gt;
The coders and supporters behind the Mac port are:&lt;br /&gt;
&lt;br /&gt;
    Eric Bachard&lt;br /&gt;
    Thorsten Behrens&lt;br /&gt;
    Etsushi Kato&lt;br /&gt;
    Florian Heckl&lt;br /&gt;
    Pavel Janik&lt;br /&gt;
    Nakata Maho&lt;br /&gt;
    James McKenzie&lt;br /&gt;
    Tino Rachui&lt;br /&gt;
    Stephan Schäfer&lt;br /&gt;
    Eric Hoch&lt;br /&gt;
    Shaun McDonald&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
    * The fastest machine you can find. It&amp;#039;d be good if it had memory, too.&lt;br /&gt;
    * Mac OS X 10.3.5 or Mac OS X 10.4.x including all the latest available Security Updates for &lt;br /&gt;
      your version of Mac OS X&lt;br /&gt;
    * on Mac OS X 10.3.x: XCode 1.5 plus November 2004 gcc 3.3 Update for &lt;br /&gt;
    * on Mac OS X 10.4.x: XCode 2.1&lt;br /&gt;
      Note: You can get both applications after a free registration at http://connect.apple.com&lt;br /&gt;
    * JDK 1.4.2 plus latest SDK Updates (with full JDK SDK for the headers)&lt;br /&gt;
    * an installed X-Server. We recommend Apple&amp;#039;s X11 but you can also use the ones of X.org or Xfree86&lt;br /&gt;
    * A minimum of 4 to 5GB for a standard build. &lt;br /&gt;
      Note: Usage of disk space depends upon the number of localizations you build for. &lt;br /&gt;
      More localizations means more disk space needed.&lt;br /&gt;
      A minimum of 18GB for a full debug build.&lt;br /&gt;
    * If you can afford it we recommend you to backup clean sources and work with a second set of sources.&lt;br /&gt;
      With a second set of clean sources you can easily go back to clean sources if a module doesn&amp;#039;t build, &lt;br /&gt;
      a patch doesn&amp;#039;t solve the problem, you have to revert a patch or for any other reason there may be. &lt;br /&gt;
      In the meantime cvs sources could have been edited and you need to recompile more modules then just &lt;br /&gt;
      one and that&amp;#039;s probably not what you want...&lt;br /&gt;
&lt;br /&gt;
===Determine the shell you use for compilation===&lt;br /&gt;
&lt;br /&gt;
The default shell of a cleanly installed Mac OS X 10.3.x/Mac OS X 10.4.x is bash.&lt;br /&gt;
If you did an update to 10.3.x or 10.4.x from early versions of Mac OS X while keeping your personal settings you may still use the tcsh shell, the default shell of Mac OS X 10.0 to 10.2.x.&lt;br /&gt;
&lt;br /&gt;
Where necessary this read-me distinguishes between bash and tcsh.&lt;br /&gt;
&lt;br /&gt;
To determine the shell you currently use open Terminal.app and type the following command:&lt;br /&gt;
&lt;br /&gt;
ps -p $$&lt;br /&gt;
&lt;br /&gt;
The output shows you which shell you&amp;#039;re currently using.&lt;br /&gt;
&lt;br /&gt;
-/bin/bash or -bash means you are using bash&lt;br /&gt;
&lt;br /&gt;
-/bin/tcsh or -tcsh means you are using the c-shell&lt;br /&gt;
&lt;br /&gt;
===Getting OpenOffice.org and External Sources===&lt;br /&gt;
&lt;br /&gt;
====Getting OpenOffice.org Source from CVS====&lt;br /&gt;
&lt;br /&gt;
Once you have X properly installed, it&amp;#039;s time to get the OpenOffice.org sources and other external sources. If you&amp;#039;ve built OpenOffice.org from previous sources and have applied other patches, you will need to start from scratch with a fresh CVS version of the sources.&lt;br /&gt;
&lt;br /&gt;
Download the CVS distribution for SRC680_mXXX (replace XXX by the current milestonenumber):&lt;br /&gt;
&lt;br /&gt;
   1. Open a new Terminal (/Applications/Utilities/Terminal)&lt;br /&gt;
   2. mkdir 680_mXXX/source&lt;br /&gt;
   3. cd 680_mXXX/source&lt;br /&gt;
   4. Now set the CVSROOT&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            setenv CVSROOT :pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
   5. cvs login&lt;br /&gt;
   6. Enter the password anoncvs&lt;br /&gt;
   7. cvs -z3 co -r SRC680_mXXX OpenOffice2&lt;br /&gt;
      for later milestones simply replace the XXX with the most current milestonenumber&lt;br /&gt;
   8. go get some coffee, or a beer, since it&amp;#039;ll take a while to get it all &lt;br /&gt;
&lt;br /&gt;
Note that if your computer is behind a firewall and you&amp;#039;re trying to get the sources from the CVS server, you may need to find a proper way to get it to tunnel through the firewall. The protocol runs on port 2401, and some firewalls will not allow communication on this port.&lt;br /&gt;
&lt;br /&gt;
Attention: We recommend a broadband connection and a not too small amount of volume or time left within your contract since the sources are about 300MB and the checkout could take up to an hour or longer depending on the server load.&lt;br /&gt;
&lt;br /&gt;
For further information on this topic see get the source&lt;br /&gt;
&lt;br /&gt;
To get a second copy of the sources use the following commands within your 680_mXXX directory:&lt;br /&gt;
&lt;br /&gt;
   1. cd ..&lt;br /&gt;
   2. mkdir build&lt;br /&gt;
   3. cd build&lt;br /&gt;
   4. cp -R ../source/* .&lt;br /&gt;
&lt;br /&gt;
==== Additional software that&amp;#039;s not in the official OpenOffice.org sources ====&lt;br /&gt;
&lt;br /&gt;
Now that you have the sources it&amp;#039;s time to get the software that is not in the official OOo Source Code Tree.&lt;br /&gt;
&lt;br /&gt;
    * The perl module Archive::Zip&lt;br /&gt;
    * gpc - optional - NOT NEEDED&lt;br /&gt;
    * pkg-config&lt;br /&gt;
    * gtk2 - optional - not needed&lt;br /&gt;
    * X11&lt;br /&gt;
    * unowinreg.dll&lt;br /&gt;
&lt;br /&gt;
To install Archive::Zip use the following commands in Terminal.app:&lt;br /&gt;
&lt;br /&gt;
   1. perl -MCPAN -eshell&lt;br /&gt;
   2. install Archive::Zip&lt;br /&gt;
&lt;br /&gt;
If this is your first installation of a module using CPAN you&amp;#039;re asked to configure the CPAN environment. If you&amp;#039;re not 100% sure what to answer simply accept the default answers.&lt;br /&gt;
&lt;br /&gt;
Note: In some cases using CPAN with Mac OS X is a bit problematic. In this case simply follow the instructions given here on this website http://sial.org/howto/perl/life-with-cpan/macosx/ to solve the problem.&lt;br /&gt;
&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
Since OS X comes with no pkg-config, or to be more specific it&amp;#039;s simply not complete in OS X, you have to install it via fink (http://fink.sourceforge.net), MacPorts (http://www.macports.org) or the gentoo port system (http://www.metadistribution.org/macos/).&lt;br /&gt;
&lt;br /&gt;
If you need cups headers (on Mac OS X 10.3., building reports &amp;quot;cups.h missing&amp;quot;), then download them from http://ftp.cusoo.org/MacOSX/Utilities/PowerPC/cups_Panther/cups.tar.gz and put the headers to &amp;quot;/usr/include/cups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you want to compile OpenOffice.org with gtk2 support you have to install gtk2 via your porting_mechanism&lt;br /&gt;
Note: The most current versions of gkt2 and pkg-config are in about 90% of all cases only available as sources that you need to compile and not as binaries. Please consider this while preparing your mac.&lt;br /&gt;
&lt;br /&gt;
Additional Note for fink users: You need to install both packages gtk2 and gtk2-devel using fink install &amp;lt;/package name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yes, there are other porting mechanisms out there such as the one of NetBSD or you can get precompiled versions of gtk, gnu_copy and pkg-config via pages like osxgnu but the author of these build instructions has no experiences with these so no recommendation for them here.&lt;br /&gt;
&lt;br /&gt;
Note: If you need help with installing or maintaining packages please contact the project that provides the porting_mechanism.&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to compile pkg-config, gnu_copy as part of the gnu-coreutils and gtk2 without fink or Macports. Be aware that in this case you need to resolve the various dependencies yourself. So we recommend using one of the porting mechanisms.&lt;br /&gt;
&lt;br /&gt;
Because OS X does not install X11 by default and up to now you haven&amp;#039;t installed one, now may be the time do so.&lt;br /&gt;
There are various X for Mac OS X out there e.g. Apple&amp;#039;s X11, XDarwin.org&amp;#039;s XDarwin or simply use your porting_mechanism to install either X.org 6.8.x or Xfree86 &amp;gt;=4.3.&lt;br /&gt;
For help with your X11 please contact the provider of the package or your porting mechanism project&lt;br /&gt;
&lt;br /&gt;
By default OOo builds an Office Development Kit. This ODK requires you to download the unowinreg.dll from here  http://tools.openoffice.org/unowinreg_prebuild/680/.&lt;br /&gt;
&lt;br /&gt;
===Preparing to Build===&lt;br /&gt;
&lt;br /&gt;
====Adding gpc to OOo sources====&lt;br /&gt;
&lt;br /&gt;
   1. uncompress &amp;lt;path to gpc&amp;gt;/gpc231.tar.Z&lt;br /&gt;
   2. tar xvf &amp;lt;path to gpc&amp;gt;/gpc231.tar&lt;br /&gt;
   3. cp &amp;lt;path to gpc&amp;gt;/gpc.[hc] &amp;lt;ooo source directory&amp;gt;/build/external/gpc/&lt;br /&gt;
   4. rmdir gpc231&lt;br /&gt;
&lt;br /&gt;
====Adding unowinreg.dll to OOo sources====&lt;br /&gt;
&lt;br /&gt;
Copy the downloaded unowinreg.dll to &amp;lt;ooo source directory&amp;gt;/build/external/unowinreg/ &lt;br /&gt;
&lt;br /&gt;
====Applying Patches====&lt;br /&gt;
&lt;br /&gt;
To apply a patch&lt;br /&gt;
cd&lt;br /&gt;
into the direcotory for the module which needs to be patched and do a:&lt;br /&gt;
patch -p0 &amp;lt;path/to/the patch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the patches use the naming scheme&lt;br /&gt;
modul_(subdirectory_subdirectory_etc)_filetopatch.patch.&lt;br /&gt;
&lt;br /&gt;
To find all current patches do a search for issues in component subcomponent MacOSX.&lt;br /&gt;
&lt;br /&gt;
You can grab the patches necessary to avoid the freetype crash from my idisk public folder&lt;br /&gt;
&lt;br /&gt;
Due to the fact that not all the patches are from one author it&amp;#039;s sometimes necessary to change to the subdirectory/ies or not. In this case the patch knows which subdirectories to jump over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Building OpenOffice.org===&lt;br /&gt;
Now that we&amp;#039;ve got it all the source, it&amp;#039;s time to execute the build!&lt;br /&gt;
&lt;br /&gt;
   1. Open up a new Terminal.&lt;br /&gt;
   2. Configure for your build&lt;br /&gt;
   3. cd &amp;lt;path to ooo&amp;gt;/680_mXXX/build/config_office&lt;br /&gt;
   4. ./configure --with-x --with-lang=&amp;quot;de fr en-US&amp;quot;&lt;br /&gt;
      --with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home/&lt;br /&gt;
      --disable-build-mozilla --disable-neon --disable-gtk&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
      Instead of using --with-freetype2=... you can also use --with-system-freetype&lt;br /&gt;
      Attention: Darwinports gnu_copy is named gcp to avoid conflicts with Mac OS X cp&lt;br /&gt;
&lt;br /&gt;
      If you want to build with gtk-support please add --with-gtk2 to your configure script&lt;br /&gt;
      and/or want to use your own apache-ant add --with-ant-home=&amp;lt;your path&amp;gt;/680_mxx/apache-ant-1.6.5&lt;br /&gt;
&lt;br /&gt;
   5. If configure fails it will output an error message saying what&amp;#039;s missing or &lt;br /&gt;
      what else causes it&amp;#039;s breakage.&lt;br /&gt;
      Be sure to also check the warnings configure outputs at the end of the configuration process.&lt;br /&gt;
      Please report any breakage here with the error message output to dev@porting.openoffice.org&lt;br /&gt;
   6. cd ..&lt;br /&gt;
   7. ./bootstrap&lt;br /&gt;
   8. Set up your shell build enviroment:&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set.sh&lt;br /&gt;
            Intel: source MacOSXX86Env.Set.sh&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set&lt;br /&gt;
            Intel: source MacOSXX86Env.Set&lt;br /&gt;
   9. dmake&lt;br /&gt;
  10. Report any and all build failures to mac@porting.openoffice.org mail list&lt;br /&gt;
  11. cd instsetoo_native/unxmacxp.pro/OpenOffice/install&lt;br /&gt;
      Within this directory you will find a folder for each language that&lt;br /&gt;
      you build OpenOffice.org for. Those folders contain the installation disk images.&lt;br /&gt;
&lt;br /&gt;
====Additional Information for Macports Users====&lt;br /&gt;
When using Darwinports be sure to use ./configure without freetype since it leads to OpenOffice.org crashing with a version mismatch error when using Macport&amp;#039;s freetype. You will find the additional patches needed to build freetype within OpenOffice.org in the subdirectory freetype2_patches of the patch archive.&lt;br /&gt;
&lt;br /&gt;
====Using Mozilla within OpenOffice.org====&lt;br /&gt;
&lt;br /&gt;
If you decided to use Mozilla packages to get special functions OpenOffice.org provides you, as I did in the example configure script, you have two choices to get them:&lt;br /&gt;
&lt;br /&gt;
First:&lt;br /&gt;
&lt;br /&gt;
You let OpenOffice.org compile them. Be aware that this adds additional tim to your compiling time.&lt;br /&gt;
&lt;br /&gt;
If you decide to let OpenOffice.org compile Mozilla remove --disable-build-mozilla from the&lt;br /&gt;
./configure script and OpenOffice.org will compile Mozilla within the moz directory.&lt;br /&gt;
&lt;br /&gt;
   1. Before building Mozilla be sure to download Mozilla Sources. You can get them e.g. here:&lt;br /&gt;
      http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/&lt;br /&gt;
   2. cp mozilla-source-1.7.5.tar.gz &amp;lt;your path&amp;gt;/680_mXXX/moz/download&lt;br /&gt;
   3. cd &amp;lt;your path&amp;gt;/680_mXXX/moz&lt;br /&gt;
   4. cd config_office&lt;br /&gt;
   5. Use the same ./configure script out of but this time remove --disable-build-mozilla&lt;br /&gt;
   6. Continue with Step 5 of the &amp;quot;Building OpenOffice.org&amp;quot; paragraph&lt;br /&gt;
&lt;br /&gt;
OpenOffice.org should now compile mozilla within its build process.&lt;br /&gt;
&lt;br /&gt;
Second:&lt;br /&gt;
&lt;br /&gt;
You grab the Mozilla packages for PPC here:&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPinc.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPlib.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPruntime.zip&lt;br /&gt;
and put them into &amp;lt;ooo build directory&amp;gt;/680_mXXX/moz/zipped&lt;br /&gt;
OpenOffice.org should detect and use them.&lt;br /&gt;
&lt;br /&gt;
Please use the Mozilla packages from http://eric.bachard.free.fr/mac/moz/zipped/ these libraries are universal binaries. If you want to build using them on PPC architecture (with Tiger)  please rename them this way  :&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Archive || Name in Intel architecture || Name on PowerPC architecture&lt;br /&gt;
|-&lt;br /&gt;
| headers || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;inc.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;inc.zip&lt;br /&gt;
|-&lt;br /&gt;
| runtime || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;runtime.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;runtime.zip&lt;br /&gt;
|-&lt;br /&gt;
| libs || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;lib.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;lib.zip&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see, &amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039; means PowerPC, and &amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039; means Intel&lt;br /&gt;
&lt;br /&gt;
===Building the whole OpenOffice.org suite or just a single Project with Debug Information===&lt;br /&gt;
&lt;br /&gt;
To build the whole OpenOffice.org Suite with debug informations add&lt;br /&gt;
--enable-debug&lt;br /&gt;
to the configure command.&lt;br /&gt;
&lt;br /&gt;
To rebuild a complete project with debug information, remove all object files by removing the unxmacxp.pro directory. Then run dmake with the debug option set to true:&lt;br /&gt;
&lt;br /&gt;
    cd $SRC_ROOT/(module-name)&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; rm -rf unxmacxp.pro&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; build debug=true&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; deliver&lt;br /&gt;
&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:MacOSX]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=50847</id>
		<title>Mac OS X Build Instructions (X11)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=50847"/>
		<updated>2007-10-19T14:55:45Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Additional Informations for Macports Users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current build instructions also at: http://porting.openoffice.org/mac/build_680_X11.html. Those are being moved to this page at OOo Wiki.&lt;br /&gt;
&lt;br /&gt;
For historical reasons, there is also [[Mac OS X Build Instructions of SRC_m71]]&lt;br /&gt;
&lt;br /&gt;
Note: supported compilers for Mac can be found in [[Compiler versions used by port maintainers and release engineers]]&lt;br /&gt;
&lt;br /&gt;
Other [[:Category:MacOSX|Mac OS X related Wiki pages]].&lt;br /&gt;
&lt;br /&gt;
=== Building OpenOffice.org X11 for Mac OS X PPC and Mac OS X x86===&lt;br /&gt;
&lt;br /&gt;
Authors: Eric Hoch&lt;br /&gt;
&lt;br /&gt;
Revised 2006-01-23&lt;br /&gt;
&lt;br /&gt;
=== Introduction===&lt;br /&gt;
&lt;br /&gt;
These build instructions are based upon milestone 680_m140 and higher.&lt;br /&gt;
&lt;br /&gt;
Due to the nature of a port in progress this document cannot give a general overview of all the current patches necessary to build a specific milestone. To get this informations we recommend you to subscribe to our porting mailing list dev@porting.openoffice.org.&lt;br /&gt;
&lt;br /&gt;
There you&amp;#039;ll get all the latest informations about patches and everything else related to and needed to port OpenOffice.org to the Mac.&lt;br /&gt;
&lt;br /&gt;
=== Special Thanks===&lt;br /&gt;
Before we begin let me thank all the people without whom those build instructions would make no sense, the coders that help bringing OOo 2.0 to Mac OS X.&lt;br /&gt;
The coders and supporters behind the Mac port are:&lt;br /&gt;
&lt;br /&gt;
    Eric Bachard&lt;br /&gt;
    Thorsten Behrens&lt;br /&gt;
    Etsushi Kato&lt;br /&gt;
    Florian Heckl&lt;br /&gt;
    Pavel Janik&lt;br /&gt;
    Nakata Maho&lt;br /&gt;
    James McKenzie&lt;br /&gt;
    Tino Rachui&lt;br /&gt;
    Stephan Schäfer&lt;br /&gt;
    Eric Hoch&lt;br /&gt;
    Shaun McDonald&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
    * The fastest machine you can find. It&amp;#039;d be good if it had memory, too.&lt;br /&gt;
    * Mac OS X 10.3.5 or Mac OS X 10.4.x including all the latest available Security Updates for &lt;br /&gt;
      your version of Mac OS X&lt;br /&gt;
    * on Mac OS X 10.3.x: XCode 1.5 plus November 2004 gcc 3.3 Update for &lt;br /&gt;
    * on Mac OS X 10.4.x: XCode 2.1&lt;br /&gt;
      Note: You can get both applications after a free registration at http://connect.apple.com&lt;br /&gt;
    * JDK 1.4.2 plus latest SDK Updates (with full JDK SDK for the headers)&lt;br /&gt;
    * an installed X-Server. We recommend Apple&amp;#039;s X11 but you can also use the ones of X.org or Xfree86&lt;br /&gt;
    * A minimum of 4 to 5GB for a standard build. &lt;br /&gt;
      Note: Usage of disk space depends upon the number of localizations you build for. &lt;br /&gt;
      More localizations means more disk space needed.&lt;br /&gt;
      A minimum of 18GB for a full debug build.&lt;br /&gt;
    * If you can afford it we recommend you to backup clean sources and work with a second set of sources.&lt;br /&gt;
      With a second set of clean sources you can easily go back to clean sources if a module doesn&amp;#039;t build, &lt;br /&gt;
      a patch doesn&amp;#039;t solve the problem, you have to revert a patch or for any other reason there may be. &lt;br /&gt;
      In the meantime cvs sources could have been edited and you need to recompile more modules then just &lt;br /&gt;
      one and that&amp;#039;s probably not what you want...&lt;br /&gt;
&lt;br /&gt;
===Determine the shell you use for compilation===&lt;br /&gt;
&lt;br /&gt;
The default shell of a cleanly installed Mac OS X 10.3.x/Mac OS X 10.4.x is bash.&lt;br /&gt;
If you did an update to 10.3.x or 10.4.x from early versions of Mac OS X while keeping your personal settings you may still use the tcsh shell, the default shell of Mac OS X 10.0 to 10.2.x.&lt;br /&gt;
&lt;br /&gt;
Where necessary this read-me distinguishes between bash and tcsh.&lt;br /&gt;
&lt;br /&gt;
To determine the shell you currently use open Terminal.app and type the following command:&lt;br /&gt;
&lt;br /&gt;
ps -p $$&lt;br /&gt;
&lt;br /&gt;
The output shows you which shell you&amp;#039;re currently using.&lt;br /&gt;
&lt;br /&gt;
-/bin/bash or -bash means you are using bash&lt;br /&gt;
&lt;br /&gt;
-/bin/tcsh or -tcsh means you are using the c-shell&lt;br /&gt;
&lt;br /&gt;
===Getting OpenOffice.org and External Sources===&lt;br /&gt;
&lt;br /&gt;
====Getting OpenOffice.org Source from CVS====&lt;br /&gt;
&lt;br /&gt;
Once you have X properly installed, it&amp;#039;s time to get the OpenOffice.org sources and other external sources. If you&amp;#039;ve built OpenOffice.org from previous sources and have applied other patches, you will need to start from scratch with a fresh CVS version of the sources.&lt;br /&gt;
&lt;br /&gt;
Download the CVS distribution for SRC680_mXXX (replace XXX by the current milestonenumber):&lt;br /&gt;
&lt;br /&gt;
   1. Open a new Terminal (/Applications/Utilities/Terminal)&lt;br /&gt;
   2. mkdir 680_mXXX/source&lt;br /&gt;
   3. cd 680_mXXX/source&lt;br /&gt;
   4. Now set the CVSROOT&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            setenv CVSROOT :pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
   5. cvs login&lt;br /&gt;
   6. Enter the password anoncvs&lt;br /&gt;
   7. cvs -z3 co -r SRC680_mXXX OpenOffice2&lt;br /&gt;
      for later milestones simply replace the XXX with the most current milestonenumber&lt;br /&gt;
   8. go get some coffee, or a beer, since it&amp;#039;ll take a while to get it all &lt;br /&gt;
&lt;br /&gt;
Note that if your computer is behind a firewall and you&amp;#039;re trying to get the sources from the CVS server, you may need to find a proper way to get it to tunnel through the firewall. The protocol runs on port 2401, and some firewalls will not allow communication on this port.&lt;br /&gt;
&lt;br /&gt;
Attention: We recommend a broadband connection and a not too small amount of volume or time left within your contract since the sources are about 300MB and the checkout could take up to an hour or longer depending on the server load.&lt;br /&gt;
&lt;br /&gt;
For further information on this topic see get the source&lt;br /&gt;
&lt;br /&gt;
To get a second copy of the sources use the following commands within your 680_mXXX directory:&lt;br /&gt;
&lt;br /&gt;
   1. cd ..&lt;br /&gt;
   2. mkdir build&lt;br /&gt;
   3. cd build&lt;br /&gt;
   4. cp -R ../source/* .&lt;br /&gt;
&lt;br /&gt;
==== Additional software that&amp;#039;s not in the official OpenOffice.org sources ====&lt;br /&gt;
&lt;br /&gt;
Now that you have the sources it&amp;#039;s time to get the software that is not in the official OOo Source Code Tree.&lt;br /&gt;
&lt;br /&gt;
    * The perl module Archive::Zip&lt;br /&gt;
    * gpc - optional - NOT NEEDED&lt;br /&gt;
    * pkg-config&lt;br /&gt;
    * gtk2 - optional - not needed&lt;br /&gt;
    * X11&lt;br /&gt;
    * unowinreg.dll&lt;br /&gt;
&lt;br /&gt;
To install Archive::Zip use the following commands in Terminal.app:&lt;br /&gt;
&lt;br /&gt;
   1. perl -MCPAN -eshell&lt;br /&gt;
   2. install Archive::Zip&lt;br /&gt;
&lt;br /&gt;
If this is your first installation of a module using CPAN you&amp;#039;re asked to configure the CPAN environment. If you&amp;#039;re not 100% sure what to answer simply accept the default answers.&lt;br /&gt;
&lt;br /&gt;
Note: In some cases using CPAN with Mac OS X is a bit problematic. In this case simply follow the instructions given here on this website http://sial.org/howto/perl/life-with-cpan/macosx/ to solve the problem.&lt;br /&gt;
&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
Since OS X comes with no pkg-config, or to be more specific it&amp;#039;s simply not complete in OS X, you have to install it via fink (http://fink.sourceforge.net), MacPorts (http://www.macports.org) or the gentoo port system (http://www.metadistribution.org/macos/).&lt;br /&gt;
&lt;br /&gt;
If you need cups headers (on Mac OS X 10.3., building reports &amp;quot;cups.h missing&amp;quot;), then download them from http://ftp.cusoo.org/MacOSX/Utilities/PowerPC/cups_Panther/cups.tar.gz and put the headers to &amp;quot;/usr/include/cups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you want to compile OpenOffice.org with gtk2 support you have to install gtk2 via your porting_mechanism&lt;br /&gt;
Note: The most current versions of gkt2 and pkg-config are in about 90% of all cases only available as sources that you need to compile and not as binaries. Please consider this while preparing your mac.&lt;br /&gt;
&lt;br /&gt;
Additional Note for fink users: You need to install both packages gtk2 and gtk2-devel using fink install &amp;lt;/package name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yes, there are other porting mechanisms out there such as the one of NetBSD or you can get precompiled versions of gtk, gnu_copy and pkg-config via pages like osxgnu but the author of these build instructions has no experiences with these so no recommendation for them here.&lt;br /&gt;
&lt;br /&gt;
Note: If you need help with installing or maintaining packages please contact the project that provides the porting_mechanism.&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to compile pkg-config, gnu_copy as part of the gnu-coreutils and gtk2 without fink or Macports. Be aware that in this case you need to resolve the various dependencies yourself. So we recommend using one of the porting mechanisms.&lt;br /&gt;
&lt;br /&gt;
Because OS X does not install X11 by default and up to now you haven&amp;#039;t installed one, now may be the time do so.&lt;br /&gt;
There are various X for Mac OS X out there e.g. Apple&amp;#039;s X11, XDarwin.org&amp;#039;s XDarwin or simply use your porting_mechanism to install either X.org 6.8.x or Xfree86 &amp;gt;=4.3.&lt;br /&gt;
For help with your X11 please contact the provider of the package or your porting mechanism project&lt;br /&gt;
&lt;br /&gt;
By default OOo builds an Office Development Kit. This ODK requires you to download the unowinreg.dll from here  http://tools.openoffice.org/unowinreg_prebuild/680/.&lt;br /&gt;
&lt;br /&gt;
===Preparing to Build===&lt;br /&gt;
&lt;br /&gt;
====Adding gpc to OOo sources====&lt;br /&gt;
&lt;br /&gt;
   1. uncompress &amp;lt;path to gpc&amp;gt;/gpc231.tar.Z&lt;br /&gt;
   2. tar xvf &amp;lt;path to gpc&amp;gt;/gpc231.tar&lt;br /&gt;
   3. cp &amp;lt;path to gpc&amp;gt;/gpc.[hc] &amp;lt;ooo source directory&amp;gt;/build/external/gpc/&lt;br /&gt;
   4. rmdir gpc231&lt;br /&gt;
&lt;br /&gt;
====Adding unowinreg.dll to OOo sources====&lt;br /&gt;
&lt;br /&gt;
Copy the downloaded unowinreg.dll to &amp;lt;ooo source directory&amp;gt;/build/external/unowinreg/ &lt;br /&gt;
&lt;br /&gt;
====Applying Patches====&lt;br /&gt;
&lt;br /&gt;
To apply a patch&lt;br /&gt;
cd&lt;br /&gt;
into the direcotory for the module which needs to be patched and do a:&lt;br /&gt;
patch -p0 &amp;lt;path/to/the patch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the patches use the naming scheme&lt;br /&gt;
modul_(subdirectory_subdirectory_etc)_filetopatch.patch.&lt;br /&gt;
&lt;br /&gt;
To find all current patches do a search for issues in component subcomponent MacOSX.&lt;br /&gt;
&lt;br /&gt;
You can grab the patches necessary to avoid the freetype crash from my idisk public folder&lt;br /&gt;
&lt;br /&gt;
Due to the fact that not all the patches are from one author it&amp;#039;s sometimes necessary to change to the subdirectory/ies or not. In this case the patch knows which subdirectories to jump over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Building OpenOffice.org===&lt;br /&gt;
Now that we&amp;#039;ve got it all the source, it&amp;#039;s time to execute the build!&lt;br /&gt;
&lt;br /&gt;
   1. Open up a new Terminal.&lt;br /&gt;
   2. Configure for your build&lt;br /&gt;
   3. cd &amp;lt;path to ooo&amp;gt;/680_mXXX/build/config_office&lt;br /&gt;
   4. ./configure --with-x --with-lang=&amp;quot;de fr en-US&amp;quot;&lt;br /&gt;
      --with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home/&lt;br /&gt;
      --disable-build-mozilla --disable-neon --disable-gtk&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
      Instead of using --with-freetype2=... you can also use --with-system-freetype&lt;br /&gt;
      Attention: Darwinports gnu_copy is named gcp to avoid conflicts with Mac OS X cp&lt;br /&gt;
&lt;br /&gt;
      If you want to build with gtk-support please add --with-gtk2 to your configure script&lt;br /&gt;
      and/or want to use your own apache-ant add --with-ant-home=&amp;lt;your path&amp;gt;/680_mxx/apache-ant-1.6.5&lt;br /&gt;
&lt;br /&gt;
   5. If configure fails it will output an error message saying what&amp;#039;s missing or &lt;br /&gt;
      what else causes it&amp;#039;s breakage.&lt;br /&gt;
      Be sure to also check the warnings configure outputs at the end of the configuration process.&lt;br /&gt;
      Please report any breakage here with the error message output to dev@porting.openoffice.org&lt;br /&gt;
   6. cd ..&lt;br /&gt;
   7. ./bootstrap&lt;br /&gt;
   8. Set up your shell build enviroment:&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set.sh&lt;br /&gt;
            Intel: source MacOSXX86Env.Set.sh&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set&lt;br /&gt;
            Intel: source MacOSXX86Env.Set&lt;br /&gt;
   9. dmake&lt;br /&gt;
  10. Report any and all build failures to mac@porting.openoffice.org mail list&lt;br /&gt;
  11. cd instsetoo_native/unxmacxp.pro/OpenOffice/install&lt;br /&gt;
      Within this directory you will find a folder for each language that&lt;br /&gt;
      you build OpenOffice.org for. Those folders contain the installation disk images.&lt;br /&gt;
&lt;br /&gt;
====Additional Information for Macports Users====&lt;br /&gt;
When using Darwinports be sure to use ./configure without freetype since it leads to OpenOffice.org crashing with a version mismatch error when using Macport&amp;#039;s freetype. You will find the additional patches needed to build freetype within OpenOffice.org in the subdirectory freetype2_patches of the patch archive.&lt;br /&gt;
&lt;br /&gt;
====Using Mozilla within OpenOffice.org====&lt;br /&gt;
&lt;br /&gt;
If you decided to use Mozilla packages to get special functions OpenOffice.org provides you, as I did in the example configure script, you have two choices to get them:&lt;br /&gt;
&lt;br /&gt;
First:&lt;br /&gt;
&lt;br /&gt;
You let OpenOffice.org compile them. Be aware that this adds additional tim to your compiling time.&lt;br /&gt;
&lt;br /&gt;
If you decide to let OpenOffice.org compile Mozilla remove --disable-build-mozilla from the&lt;br /&gt;
./configure script and OpenOffice.org will compile Mozilla within the moz directory.&lt;br /&gt;
&lt;br /&gt;
   1. Before building Mozilla be sure to download Mozilla Sources. You can get them e.g. here:&lt;br /&gt;
      http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/&lt;br /&gt;
   2. cp mozilla-source-1.7.5.tar.gz &amp;lt;your path&amp;gt;/680_mXXX/moz/download&lt;br /&gt;
   3. cd &amp;lt;your path&amp;gt;/680_mXXX/moz&lt;br /&gt;
   4. cd config_office&lt;br /&gt;
   5. Use the same ./configure script out of but this time remove --disable-build-mozilla&lt;br /&gt;
   6. Continue with Step 5 of the &amp;quot;Building OpenOffice.org&amp;quot; paragraph&lt;br /&gt;
&lt;br /&gt;
OpenOffice.org should now compile mozilla within its build process.&lt;br /&gt;
&lt;br /&gt;
Second:&lt;br /&gt;
&lt;br /&gt;
You grab the Mozilla packages for PPC here:&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPinc.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPlib.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPruntime.zip&lt;br /&gt;
and put them into &amp;lt;ooo build directory&amp;gt;/680_mXXX/moz/zipped&lt;br /&gt;
OpenOffice.org should detect and use them.&lt;br /&gt;
&lt;br /&gt;
Please use the Mozilla packages from http://eric.bachard.free.fr/mac/moz/zipped/ these libraries are universal binaries. If you want to build using them on PPC architecture (with Tiger)  please rename them this way  :&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Archive || Name in Intel architecture || Name on PowerPC architecture&lt;br /&gt;
|-&lt;br /&gt;
| headers || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;inc.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;inc.zip&lt;br /&gt;
|-&lt;br /&gt;
| runtime || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;runtime.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;runtime.zip&lt;br /&gt;
|-&lt;br /&gt;
| libs || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;lib.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;lib.zip&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see, &amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039; means PowerPC, and &amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039; means Intel&lt;br /&gt;
&lt;br /&gt;
===Building the whole OpenOffice.org suite or just a single Project with Debug Information===&lt;br /&gt;
&lt;br /&gt;
To build the whole OpenOffice.org Suite with debug informations add&lt;br /&gt;
--enable-debug&lt;br /&gt;
to the configure command.&lt;br /&gt;
&lt;br /&gt;
To rebuild a complete project with debug information, remove all object files by removing the unxmacxp.pro directory. Then run dmake with the debug option set to true:&lt;br /&gt;
&lt;br /&gt;
    cd $SRC_ROOT/(module-name)&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; rm -rf unxmacxp.pro&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; build debug=true&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; deliver&lt;br /&gt;
&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:MacOSX]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=50844</id>
		<title>Mac OS X Build Instructions (X11)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Mac_OS_X_Build_Instructions_(X11)&amp;diff=50844"/>
		<updated>2007-10-19T14:31:24Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Getting OpenOffice.org Source from CVS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current build instructions also at: http://porting.openoffice.org/mac/build_680_X11.html. Those are being moved to this page at OOo Wiki.&lt;br /&gt;
&lt;br /&gt;
For historical reasons, there is also [[Mac OS X Build Instructions of SRC_m71]]&lt;br /&gt;
&lt;br /&gt;
Note: supported compilers for Mac can be found in [[Compiler versions used by port maintainers and release engineers]]&lt;br /&gt;
&lt;br /&gt;
Other [[:Category:MacOSX|Mac OS X related Wiki pages]].&lt;br /&gt;
&lt;br /&gt;
=== Building OpenOffice.org X11 for Mac OS X PPC and Mac OS X x86===&lt;br /&gt;
&lt;br /&gt;
Authors: Eric Hoch&lt;br /&gt;
&lt;br /&gt;
Revised 2006-01-23&lt;br /&gt;
&lt;br /&gt;
=== Introduction===&lt;br /&gt;
&lt;br /&gt;
These build instructions are based upon milestone 680_m140 and higher.&lt;br /&gt;
&lt;br /&gt;
Due to the nature of a port in progress this document cannot give a general overview of all the current patches necessary to build a specific milestone. To get this informations we recommend you to subscribe to our porting mailing list dev@porting.openoffice.org.&lt;br /&gt;
&lt;br /&gt;
There you&amp;#039;ll get all the latest informations about patches and everything else related to and needed to port OpenOffice.org to the Mac.&lt;br /&gt;
&lt;br /&gt;
=== Special Thanks===&lt;br /&gt;
Before we begin let me thank all the people without whom those build instructions would make no sense, the coders that help bringing OOo 2.0 to Mac OS X.&lt;br /&gt;
The coders and supporters behind the Mac port are:&lt;br /&gt;
&lt;br /&gt;
    Eric Bachard&lt;br /&gt;
    Thorsten Behrens&lt;br /&gt;
    Etsushi Kato&lt;br /&gt;
    Florian Heckl&lt;br /&gt;
    Pavel Janik&lt;br /&gt;
    Nakata Maho&lt;br /&gt;
    James McKenzie&lt;br /&gt;
    Tino Rachui&lt;br /&gt;
    Stephan Schäfer&lt;br /&gt;
    Eric Hoch&lt;br /&gt;
    Shaun McDonald&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
    * The fastest machine you can find. It&amp;#039;d be good if it had memory, too.&lt;br /&gt;
    * Mac OS X 10.3.5 or Mac OS X 10.4.x including all the latest available Security Updates for &lt;br /&gt;
      your version of Mac OS X&lt;br /&gt;
    * on Mac OS X 10.3.x: XCode 1.5 plus November 2004 gcc 3.3 Update for &lt;br /&gt;
    * on Mac OS X 10.4.x: XCode 2.1&lt;br /&gt;
      Note: You can get both applications after a free registration at http://connect.apple.com&lt;br /&gt;
    * JDK 1.4.2 plus latest SDK Updates (with full JDK SDK for the headers)&lt;br /&gt;
    * an installed X-Server. We recommend Apple&amp;#039;s X11 but you can also use the ones of X.org or Xfree86&lt;br /&gt;
    * A minimum of 4 to 5GB for a standard build. &lt;br /&gt;
      Note: Usage of disk space depends upon the number of localizations you build for. &lt;br /&gt;
      More localizations means more disk space needed.&lt;br /&gt;
      A minimum of 18GB for a full debug build.&lt;br /&gt;
    * If you can afford it we recommend you to backup clean sources and work with a second set of sources.&lt;br /&gt;
      With a second set of clean sources you can easily go back to clean sources if a module doesn&amp;#039;t build, &lt;br /&gt;
      a patch doesn&amp;#039;t solve the problem, you have to revert a patch or for any other reason there may be. &lt;br /&gt;
      In the meantime cvs sources could have been edited and you need to recompile more modules then just &lt;br /&gt;
      one and that&amp;#039;s probably not what you want...&lt;br /&gt;
&lt;br /&gt;
===Determine the shell you use for compilation===&lt;br /&gt;
&lt;br /&gt;
The default shell of a cleanly installed Mac OS X 10.3.x/Mac OS X 10.4.x is bash.&lt;br /&gt;
If you did an update to 10.3.x or 10.4.x from early versions of Mac OS X while keeping your personal settings you may still use the tcsh shell, the default shell of Mac OS X 10.0 to 10.2.x.&lt;br /&gt;
&lt;br /&gt;
Where necessary this read-me distinguishes between bash and tcsh.&lt;br /&gt;
&lt;br /&gt;
To determine the shell you currently use open Terminal.app and type the following command:&lt;br /&gt;
&lt;br /&gt;
ps -p $$&lt;br /&gt;
&lt;br /&gt;
The output shows you which shell you&amp;#039;re currently using.&lt;br /&gt;
&lt;br /&gt;
-/bin/bash or -bash means you are using bash&lt;br /&gt;
&lt;br /&gt;
-/bin/tcsh or -tcsh means you are using the c-shell&lt;br /&gt;
&lt;br /&gt;
===Getting OpenOffice.org and External Sources===&lt;br /&gt;
&lt;br /&gt;
====Getting OpenOffice.org Source from CVS====&lt;br /&gt;
&lt;br /&gt;
Once you have X properly installed, it&amp;#039;s time to get the OpenOffice.org sources and other external sources. If you&amp;#039;ve built OpenOffice.org from previous sources and have applied other patches, you will need to start from scratch with a fresh CVS version of the sources.&lt;br /&gt;
&lt;br /&gt;
Download the CVS distribution for SRC680_mXXX (replace XXX by the current milestonenumber):&lt;br /&gt;
&lt;br /&gt;
   1. Open a new Terminal (/Applications/Utilities/Terminal)&lt;br /&gt;
   2. mkdir 680_mXXX/source&lt;br /&gt;
   3. cd 680_mXXX/source&lt;br /&gt;
   4. Now set the CVSROOT&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            setenv CVSROOT :pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
   5. cvs login&lt;br /&gt;
   6. Enter the password anoncvs&lt;br /&gt;
   7. cvs -z3 co -r SRC680_mXXX OpenOffice2&lt;br /&gt;
      for later milestones simply replace the XXX with the most current milestonenumber&lt;br /&gt;
   8. go get some coffee, or a beer, since it&amp;#039;ll take a while to get it all &lt;br /&gt;
&lt;br /&gt;
Note that if your computer is behind a firewall and you&amp;#039;re trying to get the sources from the CVS server, you may need to find a proper way to get it to tunnel through the firewall. The protocol runs on port 2401, and some firewalls will not allow communication on this port.&lt;br /&gt;
&lt;br /&gt;
Attention: We recommend a broadband connection and a not too small amount of volume or time left within your contract since the sources are about 300MB and the checkout could take up to an hour or longer depending on the server load.&lt;br /&gt;
&lt;br /&gt;
For further information on this topic see get the source&lt;br /&gt;
&lt;br /&gt;
To get a second copy of the sources use the following commands within your 680_mXXX directory:&lt;br /&gt;
&lt;br /&gt;
   1. cd ..&lt;br /&gt;
   2. mkdir build&lt;br /&gt;
   3. cd build&lt;br /&gt;
   4. cp -R ../source/* .&lt;br /&gt;
&lt;br /&gt;
==== Additional software that&amp;#039;s not in the official OpenOffice.org sources ====&lt;br /&gt;
&lt;br /&gt;
Now that you have the sources it&amp;#039;s time to get the software that is not in the official OOo Source Code Tree.&lt;br /&gt;
&lt;br /&gt;
    * The perl module Archive::Zip&lt;br /&gt;
    * gpc - optional - NOT NEEDED&lt;br /&gt;
    * pkg-config&lt;br /&gt;
    * gtk2 - optional - not needed&lt;br /&gt;
    * X11&lt;br /&gt;
    * unowinreg.dll&lt;br /&gt;
&lt;br /&gt;
To install Archive::Zip use the following commands in Terminal.app:&lt;br /&gt;
&lt;br /&gt;
   1. perl -MCPAN -eshell&lt;br /&gt;
   2. install Archive::Zip&lt;br /&gt;
&lt;br /&gt;
If this is your first installation of a module using CPAN you&amp;#039;re asked to configure the CPAN environment. If you&amp;#039;re not 100% sure what to answer simply accept the default answers.&lt;br /&gt;
&lt;br /&gt;
Note: In some cases using CPAN with Mac OS X is a bit problematic. In this case simply follow the instructions given here on this website http://sial.org/howto/perl/life-with-cpan/macosx/ to solve the problem.&lt;br /&gt;
&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
Since OS X comes with no pkg-config, or to be more specific it&amp;#039;s simply not complete in OS X, you have to install it via fink (http://fink.sourceforge.net), MacPorts (http://www.macports.org) or the gentoo port system (http://www.metadistribution.org/macos/).&lt;br /&gt;
&lt;br /&gt;
If you need cups headers (on Mac OS X 10.3., building reports &amp;quot;cups.h missing&amp;quot;), then download them from http://ftp.cusoo.org/MacOSX/Utilities/PowerPC/cups_Panther/cups.tar.gz and put the headers to &amp;quot;/usr/include/cups&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you want to compile OpenOffice.org with gtk2 support you have to install gtk2 via your porting_mechanism&lt;br /&gt;
Note: The most current versions of gkt2 and pkg-config are in about 90% of all cases only available as sources that you need to compile and not as binaries. Please consider this while preparing your mac.&lt;br /&gt;
&lt;br /&gt;
Additional Note for fink users: You need to install both packages gtk2 and gtk2-devel using fink install &amp;lt;/package name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yes, there are other porting mechanisms out there such as the one of NetBSD or you can get precompiled versions of gtk, gnu_copy and pkg-config via pages like osxgnu but the author of these build instructions has no experiences with these so no recommendation for them here.&lt;br /&gt;
&lt;br /&gt;
Note: If you need help with installing or maintaining packages please contact the project that provides the porting_mechanism.&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to compile pkg-config, gnu_copy as part of the gnu-coreutils and gtk2 without fink or Macports. Be aware that in this case you need to resolve the various dependencies yourself. So we recommend using one of the porting mechanisms.&lt;br /&gt;
&lt;br /&gt;
Because OS X does not install X11 by default and up to now you haven&amp;#039;t installed one, now may be the time do so.&lt;br /&gt;
There are various X for Mac OS X out there e.g. Apple&amp;#039;s X11, XDarwin.org&amp;#039;s XDarwin or simply use your porting_mechanism to install either X.org 6.8.x or Xfree86 &amp;gt;=4.3.&lt;br /&gt;
For help with your X11 please contact the provider of the package or your porting mechanism project&lt;br /&gt;
&lt;br /&gt;
By default OOo builds an Office Development Kit. This ODK requires you to download the unowinreg.dll from here  http://tools.openoffice.org/unowinreg_prebuild/680/.&lt;br /&gt;
&lt;br /&gt;
===Preparing to Build===&lt;br /&gt;
&lt;br /&gt;
====Adding gpc to OOo sources====&lt;br /&gt;
&lt;br /&gt;
   1. uncompress &amp;lt;path to gpc&amp;gt;/gpc231.tar.Z&lt;br /&gt;
   2. tar xvf &amp;lt;path to gpc&amp;gt;/gpc231.tar&lt;br /&gt;
   3. cp &amp;lt;path to gpc&amp;gt;/gpc.[hc] &amp;lt;ooo source directory&amp;gt;/build/external/gpc/&lt;br /&gt;
   4. rmdir gpc231&lt;br /&gt;
&lt;br /&gt;
====Adding unowinreg.dll to OOo sources====&lt;br /&gt;
&lt;br /&gt;
Copy the downloaded unowinreg.dll to &amp;lt;ooo source directory&amp;gt;/build/external/unowinreg/ &lt;br /&gt;
&lt;br /&gt;
====Applying Patches====&lt;br /&gt;
&lt;br /&gt;
To apply a patch&lt;br /&gt;
cd&lt;br /&gt;
into the direcotory for the module which needs to be patched and do a:&lt;br /&gt;
patch -p0 &amp;lt;path/to/the patch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the patches use the naming scheme&lt;br /&gt;
modul_(subdirectory_subdirectory_etc)_filetopatch.patch.&lt;br /&gt;
&lt;br /&gt;
To find all current patches do a search for issues in component subcomponent MacOSX.&lt;br /&gt;
&lt;br /&gt;
You can grab the patches necessary to avoid the freetype crash from my idisk public folder&lt;br /&gt;
&lt;br /&gt;
Due to the fact that not all the patches are from one author it&amp;#039;s sometimes necessary to change to the subdirectory/ies or not. In this case the patch knows which subdirectories to jump over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Building OpenOffice.org===&lt;br /&gt;
Now that we&amp;#039;ve got it all the source, it&amp;#039;s time to execute the build!&lt;br /&gt;
&lt;br /&gt;
   1. Open up a new Terminal.&lt;br /&gt;
   2. Configure for your build&lt;br /&gt;
   3. cd &amp;lt;path to ooo&amp;gt;/680_mXXX/build/config_office&lt;br /&gt;
   4. ./configure --with-x --with-lang=&amp;quot;de fr en-US&amp;quot;&lt;br /&gt;
      --with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home/&lt;br /&gt;
      --disable-build-mozilla --disable-neon --disable-gtk&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
      Instead of using --with-freetype2=... you can also use --with-system-freetype&lt;br /&gt;
      Attention: Darwinports gnu_copy is named gcp to avoid conflicts with Mac OS X cp&lt;br /&gt;
&lt;br /&gt;
      If you want to build with gtk-support please add --with-gtk2 to your configure script&lt;br /&gt;
      and/or want to use your own apache-ant add --with-ant-home=&amp;lt;your path&amp;gt;/680_mxx/apache-ant-1.6.5&lt;br /&gt;
&lt;br /&gt;
   5. If configure fails it will output an error message saying what&amp;#039;s missing or &lt;br /&gt;
      what else causes it&amp;#039;s breakage.&lt;br /&gt;
      Be sure to also check the warnings configure outputs at the end of the configuration process.&lt;br /&gt;
      Please report any breakage here with the error message output to dev@porting.openoffice.org&lt;br /&gt;
   6. cd ..&lt;br /&gt;
   7. ./bootstrap&lt;br /&gt;
   8. Set up your shell build enviroment:&lt;br /&gt;
          * for bash do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set.sh&lt;br /&gt;
            Intel: source MacOSXX86Env.Set.sh&lt;br /&gt;
          * for tcsh do:&lt;br /&gt;
            PPC: source MacOSXPPCEnv.Set&lt;br /&gt;
            Intel: source MacOSXX86Env.Set&lt;br /&gt;
   9. dmake&lt;br /&gt;
  10. Report any and all build failures to mac@porting.openoffice.org mail list&lt;br /&gt;
  11. cd instsetoo_native/unxmacxp.pro/OpenOffice/install&lt;br /&gt;
      Within this directory you will find a folder for each language that&lt;br /&gt;
      you build OpenOffice.org for. Those folders contain the installation disk images.&lt;br /&gt;
&lt;br /&gt;
====Additional Informations for Macports Users====&lt;br /&gt;
When using Darwinports be sure to use ./configure without freetype since it leads to OpenOffice.org crashing with a version mismatch error when using Macport&amp;#039;s freetype. You will find the additional patches needed to build freetype within OpenOffice.org in the subdirectory freetype2_patches of the patch archive.&lt;br /&gt;
====Using Mozilla within OpenOffice.org====&lt;br /&gt;
&lt;br /&gt;
If you decided to use Mozilla packages to get special functions OpenOffice.org provides you, as I did in the example configure script, you have two choices to get them:&lt;br /&gt;
&lt;br /&gt;
First:&lt;br /&gt;
&lt;br /&gt;
You let OpenOffice.org compile them. Be aware that this adds additional tim to your compiling time.&lt;br /&gt;
&lt;br /&gt;
If you decide to let OpenOffice.org compile Mozilla remove --disable-build-mozilla from the&lt;br /&gt;
./configure script and OpenOffice.org will compile Mozilla within the moz directory.&lt;br /&gt;
&lt;br /&gt;
   1. Before building Mozilla be sure to download Mozilla Sources. You can get them e.g. here:&lt;br /&gt;
      http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/&lt;br /&gt;
   2. cp mozilla-source-1.7.5.tar.gz &amp;lt;your path&amp;gt;/680_mXXX/moz/download&lt;br /&gt;
   3. cd &amp;lt;your path&amp;gt;/680_mXXX/moz&lt;br /&gt;
   4. cd config_office&lt;br /&gt;
   5. Use the same ./configure script out of but this time remove --disable-build-mozilla&lt;br /&gt;
   6. Continue with Step 5 of the &amp;quot;Building OpenOffice.org&amp;quot; paragraph&lt;br /&gt;
&lt;br /&gt;
OpenOffice.org should now compile mozilla within its build process.&lt;br /&gt;
&lt;br /&gt;
Second:&lt;br /&gt;
&lt;br /&gt;
You grab the Mozilla packages for PPC here:&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPinc.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPlib.zip&lt;br /&gt;
http://florian-heckl.de/ooo/MACOSXGCCPruntime.zip&lt;br /&gt;
and put them into &amp;lt;ooo build directory&amp;gt;/680_mXXX/moz/zipped&lt;br /&gt;
OpenOffice.org should detect and use them.&lt;br /&gt;
&lt;br /&gt;
Please use the Mozilla packages from http://eric.bachard.free.fr/mac/moz/zipped/ these libraries are universal binaries. If you want to build using them on PPC architecture (with Tiger)  please rename them this way  :&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Archive || Name in Intel architecture || Name on PowerPC architecture&lt;br /&gt;
|-&lt;br /&gt;
| headers || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;inc.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;inc.zip&lt;br /&gt;
|-&lt;br /&gt;
| runtime || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;runtime.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;runtime.zip&lt;br /&gt;
|-&lt;br /&gt;
| libs || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;lib.zip || MACOSXGCC&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;lib.zip&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see, &amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039; means PowerPC, and &amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039; means Intel&lt;br /&gt;
&lt;br /&gt;
===Building the whole OpenOffice.org suite or just a single Project with Debug Information===&lt;br /&gt;
&lt;br /&gt;
To build the whole OpenOffice.org Suite with debug informations add&lt;br /&gt;
--enable-debug&lt;br /&gt;
to the configure command.&lt;br /&gt;
&lt;br /&gt;
To rebuild a complete project with debug information, remove all object files by removing the unxmacxp.pro directory. Then run dmake with the debug option set to true:&lt;br /&gt;
&lt;br /&gt;
    cd $SRC_ROOT/(module-name)&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; rm -rf unxmacxp.pro&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; build debug=true&lt;br /&gt;
    $SRC_ROOT/(module-name)&amp;gt; deliver&lt;br /&gt;
&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:MacOSX]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24419</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24419"/>
		<updated>2007-02-04T15:44:56Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). &lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4.&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
If X11 and /or X11SDK is(are) not installed :&lt;br /&gt;
sudo mkdir -p  /usr/X11R6&lt;br /&gt;
&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you intend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( optional since m201) ====&lt;br /&gt;
&lt;br /&gt;
cp provided with XCode is now sufficient. If you prefer install GNU cp :&lt;br /&gt;
&lt;br /&gt;
Install Fink version : in Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Install Darwin version &lt;br /&gt;
&lt;br /&gt;
Last,  if you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== Fink ====&lt;br /&gt;
&lt;br /&gt;
You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m202/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (February 2nd 2007) is m202. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m202&lt;br /&gt;
 cd src680-m202&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m202 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m202 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 202. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m202 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m202 will become canvas_m202 , and then, cp canvas from aquavcl01-src into src-m202&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m202 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m202&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m202/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m202 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m202&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m202&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; (deprecated) m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;(deprecated) m200&amp;#039;&amp;#039;&amp;#039;: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m202/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Environment-Variables for the Build will be set up. For a detailed description see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be patient. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not advised.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m202/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m202/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m202/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.2_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.2&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.2.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Soon optional (tests in progress) &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.2 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.2.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): [[Previous_Mac_Meeting_logs]] [[MacOSXPortMeetings]]&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24418</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24418"/>
		<updated>2007-02-04T15:43:52Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). &lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4.&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
If X11 and /or X11SDK is(are) not installed :&lt;br /&gt;
sudo mkdir -p  /usr/X11R6&lt;br /&gt;
&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you intend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( optional since m201) ====&lt;br /&gt;
&lt;br /&gt;
cp provided with XCode is now sufficient. If you prefer install GNU cp :&lt;br /&gt;
&lt;br /&gt;
Install Fink version : in Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Install Darwin version &lt;br /&gt;
&lt;br /&gt;
Last,  if you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== Fink ====&lt;br /&gt;
&lt;br /&gt;
You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m202/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (February 2nd 2007) is m202. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m202&lt;br /&gt;
 cd src680-m202&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m202 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m202 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 202. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m202 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m202 will become canvas_m202 , and then, cp canvas from aquavcl01-src into src-m202&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m202 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m202&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m202/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m202 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m202&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m202&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; (deprecated) m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;(deprecated) m200&amp;#039;&amp;#039;&amp;#039;: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m202/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Environment-Variables for the Build will be set up. For a detailed description see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be patient. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m202/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m202/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m202/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.2_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.2&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.2.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Soon optional (tests in progress) &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.2 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.2.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): [[Previous_Mac_Meeting_logs]] [[MacOSXPortMeetings]]&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24190</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24190"/>
		<updated>2007-02-01T01:42:33Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Xcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4.&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24189</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24189"/>
		<updated>2007-02-01T01:40:38Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Xcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4, which can be downloaded at http://developer.apple.com/tools/download/.&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24188</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24188"/>
		<updated>2007-02-01T01:39:39Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Xcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4.&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24187</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24187"/>
		<updated>2007-02-01T01:38:39Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Xcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4, which can be downloaded at http://www.apple.com/macosx/features/xcode/.&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24186</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24186"/>
		<updated>2007-02-01T01:38:02Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Xcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4, which can be downloaded at [[http://www.apple.com/macosx/features/xcode/]].&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24185</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24185"/>
		<updated>2007-02-01T01:27:57Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The purpose of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to successfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can find the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you already did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24184</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24184"/>
		<updated>2007-02-01T01:21:31Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* Xcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The bias of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build enviroment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. If any earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to succsessfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can finde the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you arelady did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24183</id>
		<title>Documentation/Building Guide/Building on MacOSX</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_MacOSX&amp;diff=24183"/>
		<updated>2007-02-01T01:20:27Z</updated>

		<summary type="html">&lt;p&gt;Ponderability: /* &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&amp;#039;&amp;#039;&amp;#039;This document tries to wrap-up the build process for [[OpenOffice.org]] on MacOS X using the native windowing-toolkit of the platform named Aqua.&amp;#039;&amp;#039;&amp;#039; &amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important goal is to get the demonstration programs &amp;quot;svdem&amp;quot; up and running. They act as a fairly good starting point to further endeavours, since they are used to test the capabilities of the underlying [[VCL]] layer. If this is achieved, one can build and Install the full-fledged OpenOffice.org Package. The bias of this document is to describe the cumbersome build process of OpenOffice.org rather than to give a kickstart in the coding involved to get VCL ported to Carbon. A starting point for this is Pierre de Filippis excellent [[Intro To Mac Porting]].&lt;br /&gt;
&lt;br /&gt;
I use the bash shell in all examples, since to my belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build enviroment here: [http://tools.openoffice.org/build_env.html Open OfficeBuild Environment].&lt;br /&gt;
&lt;br /&gt;
Many thanks for help and assistance go to Pavel Janik and Eric Bachard.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Prerequisites&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]]. Here I like to outline the things you need to build the Aqua Version (besides the OS). You are much better off to install the Fink Package Manager on your Apple, to resolve these dependencies (and get some cool stuff too). Go to [http://fink.sourceforge.net Fink]&lt;br /&gt;
&lt;br /&gt;
=== Mandatory ===&lt;br /&gt;
&lt;br /&gt;
==== Xcode ====&lt;br /&gt;
&lt;br /&gt;
This is (with GNU cp, soon optional) the only mandatory part to be installed to build Aqua version of OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
Current verified working version is XCode 2.4&lt;br /&gt;
&lt;br /&gt;
Xcode 2.2, 2.3 are known to work for Aqua development. Please add earlier versions work as well, please add them here.&lt;br /&gt;
&lt;br /&gt;
==== X11SDK  (soon optional) ==== &lt;br /&gt;
&lt;br /&gt;
A dependency for Mozilla plugin needs some prototype defined in some Xllib.h header. &lt;br /&gt;
&lt;br /&gt;
Please note, this dependency is not needed in runtime, but only at buildtime. &lt;br /&gt;
&lt;br /&gt;
X11SDK.pkg archive is located in your Tiger&amp;#039;s DVD, and has to be installed in the case of you&amp;#039;re using Mozilla prebuild archives&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  XCode does contain Xlib headers.  Just modify INCLUDE path properly will solve the build issue.&lt;br /&gt;
&lt;br /&gt;
Meant replace ( not existing) &lt;br /&gt;
/usr/X11R6/include&lt;br /&gt;
&lt;br /&gt;
with (existing) : /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include &lt;br /&gt;
&lt;br /&gt;
Doing a symlink between them :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include  /usr/X11R6/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This issue should be fixed soon.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gnu copy ( soon optional ) ====&lt;br /&gt;
&lt;br /&gt;
Note : cloph05 will fix GNU cp version needed, and the one provided with XCode will become sufficient. &lt;br /&gt;
&lt;br /&gt;
In Fink terms this is in the package &amp;#039;&amp;#039;fileutils&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
If you prefer direct download, GNU coreutils can be found at http://www.gnu.org/software/coreutils/coreutils.html.&lt;br /&gt;
&lt;br /&gt;
After installing, you should copy or rename the newly installed cp to gnucp (located at /usr/local/bin/cp or /sw/bin/cp if you used Fink) (cf. http://qa.openoffice.org/issues/show_bug.cgi?id=69711)&lt;br /&gt;
&lt;br /&gt;
=== Strongly recommended ===&lt;br /&gt;
&lt;br /&gt;
==== ccache ====&lt;br /&gt;
If you indend to build several times OpenOffice, you probably can benefit of ccache. ccache will speed up your future builds. The first time you make a build with ccache you won&amp;#039;t notice it, but then the build will go up to five times faster.&lt;br /&gt;
&lt;br /&gt;
You can install it using fink. It is simply named &amp;quot;ccache&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use fink, you can download it and build it yourself using the source provided at http://ccache.samba.org/&lt;br /&gt;
&lt;br /&gt;
Then, in order to use it, you need to change the following environment variables (using bash) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
==== Java ====&lt;br /&gt;
&lt;br /&gt;
Normally installed with XCode.&lt;br /&gt;
&lt;br /&gt;
==== The perl module Archive::Zip ( optional ) ====&lt;br /&gt;
&lt;br /&gt;
Nothing is needed anymore with recent versions of XCode (means : not needed with XCode 2.4 at least).&lt;br /&gt;
&lt;br /&gt;
If you still have issues doing configure because of that, please install Archive::Zip repecting the instructions below :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
perl -MCPAN -eshell&lt;br /&gt;
install Archive::Zip&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gpc ( optional) ====&lt;br /&gt;
GPC is available here: ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z&amp;gt;&lt;br /&gt;
Attention: Direct Link to the download but it&amp;#039;s only a few hundred KB.&lt;br /&gt;
Note: You can alternatively use the libart_lgpl library instead of GPC. This requires an additional configure flag (--enable-libart) and a precompiled libart library installed in a standard location, such as /usr/lib.&lt;br /&gt;
&lt;br /&gt;
==== pkg-config (optional) ====&lt;br /&gt;
&lt;br /&gt;
Nothing to install on Aqua build, since --disable-gtk is forced&lt;br /&gt;
&lt;br /&gt;
Called &amp;#039;&amp;#039;pkgconfig&amp;#039;&amp;#039; in Fink.&lt;br /&gt;
&lt;br /&gt;
pkg-config can be found here : http://pkgconfig.freedesktop.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Apache Ant 1.6.5 (optional) ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Not Adviced&amp;#039;&amp;#039;&amp;#039; : XCode does provide a perfectly working version of ant.&lt;br /&gt;
&lt;br /&gt;
It is up to you if you prefer use this one.&lt;br /&gt;
&lt;br /&gt;
An up to date version of ant is shipped with XCode.&lt;br /&gt;
&lt;br /&gt;
For the OpenOffice Builds you need to have Apache&amp;#039;s Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/&lt;br /&gt;
 ln -s /opt/ant/ apache-ant-1.6.5&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set them, you just need to add these two previous parameters to your build.sh (see [[#One-Time preparations and scripts]] for details).&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Some Background (what is aquavcl01, EIS)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== EIS ===&lt;br /&gt;
OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a database on top called EIS (Environment Information System) which is used to keep track of Master- and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline trunk and undergo extensive QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report mentioned in the Links section gives a very good overview about the overall process. To learn more about Childworkspaces (CWS) have a look here: [[CWS]]. &lt;br /&gt;
&lt;br /&gt;
Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there. &lt;br /&gt;
&lt;br /&gt;
=== VCL (Visual Class Libraries) ===&lt;br /&gt;
&lt;br /&gt;
Porting OpenOffice.org to a new Windowing Toolkit is mostly porting of the OpenOffice&amp;#039;s VCL Layer (Visual Class Libraries) to the new platforms toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit.&lt;br /&gt;
&lt;br /&gt;
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is developed in a child workspace called &amp;#039;&amp;#039;&amp;#039;aquavcl01&amp;#039;&amp;#039;&amp;#039;. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.&lt;br /&gt;
&lt;br /&gt;
The basic approach to prepare a developer&amp;#039;s client system to succsessfully build OpenOffice/Aqua is the following:&lt;br /&gt;
&lt;br /&gt;
# checkout a given OpenOffice Milestone.&lt;br /&gt;
# checkout aquavcl01 Child Workspace.&lt;br /&gt;
# merge them together.&lt;br /&gt;
# apply the latest patches.&lt;br /&gt;
&lt;br /&gt;
The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and many others improvements are happening at tremendous pace at the moment. All of these improvements get distributed as patches/diffs against aquavcl01. Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Getting the code (checkout, merge and patch the puppy)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s have a look what to check-out and where. All these milestone numbers below highly depend on the given point-in-time. The current milestone as of now (January 27th 2007) is m200. You may change this to your needs. You can finde the current milestone of each cws in the EIS database.&lt;br /&gt;
&lt;br /&gt;
You also need to bear in mind that you have to access to the CVS-Server&amp;#039;s default port (2401). If a firewall stop&amp;#039;s you here you have to setup a CVS-Tunnel.&lt;br /&gt;
&lt;br /&gt;
==== create a directory for a given milestone, setup CVS access: ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir src680-m200&lt;br /&gt;
 cd src680-m200&lt;br /&gt;
 &lt;br /&gt;
 export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs&lt;br /&gt;
 cvs login&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please Enter the password &amp;#039;anoncvs&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== checkout Milestone m200 (1,5 GB): ==== &lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r SRC680_m200 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Once done, you&amp;#039;ll obtain milestone 200. this not exactly what we want, because all changes concerning aquavcl01 Child workspace are not included. To complete, we need to check aquavcl01 changes.&lt;br /&gt;
&lt;br /&gt;
==== checkout Aquavcl01 (50 MB): ==== &lt;br /&gt;
&lt;br /&gt;
1) First possibility : create a dedicated tree (cool backup )&lt;br /&gt;
&lt;br /&gt;
To check aquavcl01 Child workspace, the most simple is to create aquavcl01 directory, and go inside this dir&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 mkdir aquavcl01-src &lt;br /&gt;
 &lt;br /&gt;
 cd aquavcl01-src&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
 (assuming you arelady did cvs login ..etc )&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 The following modules will be present at the end :&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: lightyellow; border: 1px red dashed; padding: 3px 0 3px 15px;&amp;quot;&amp;gt;&lt;br /&gt;
canvas&lt;br /&gt;
&lt;br /&gt;
extensions&lt;br /&gt;
&lt;br /&gt;
fpicker&lt;br /&gt;
&lt;br /&gt;
padmin&lt;br /&gt;
&lt;br /&gt;
sal&lt;br /&gt;
&lt;br /&gt;
scp2&lt;br /&gt;
&lt;br /&gt;
sfx2&lt;br /&gt;
&lt;br /&gt;
solenv&lt;br /&gt;
&lt;br /&gt;
dtrans&lt;br /&gt;
&lt;br /&gt;
freetype&lt;br /&gt;
&lt;br /&gt;
psprint&lt;br /&gt;
&lt;br /&gt;
sj2&lt;br /&gt;
&lt;br /&gt;
vcl&lt;br /&gt;
&lt;br /&gt;
toolkit&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these modules are the ones we modified to create the native version :  they all are tagged &amp;quot;aquavcl01&amp;quot; (see all CVS/Tag files in the tree) and all you have to do is either rename or delete the one located in src680-m200 and replace them with the one located in aquavcl01-src.&lt;br /&gt;
&lt;br /&gt;
e.g.  : canvas in src680-m200 will become canvas_m200 , and then, cp canvas from aquavcl01-src into src-m200&lt;br /&gt;
&lt;br /&gt;
This applies for all the modules listed above.&lt;br /&gt;
&lt;br /&gt;
2) Second possibility : use a little script to extract changes : extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
This shell script, located in src680-m200 will contain :&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
list=&amp;quot;canvas extensions fpicker padmin scp2 sfx2 solenv dtrans freetype psprint sj2 vcl sal toolkit&amp;quot;&lt;br /&gt;
for i in $list ;  do &lt;br /&gt;
   mv $i $i-m200&lt;br /&gt;
   cvs -z3 co -r cws_src680_aquavcl01 $i&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then chmod +x extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
and run it :&lt;br /&gt;
&lt;br /&gt;
./extract_aquavcl01.sh&lt;br /&gt;
&lt;br /&gt;
When finished, and if no problem occurs, you should have a complete tree.&lt;br /&gt;
&lt;br /&gt;
=== One-Time preparations and scripts ===&lt;br /&gt;
&lt;br /&gt;
OpenOffice building gets configured by the popular open-source configuration-management package &amp;#039;autoconf&amp;#039;. So you can do your beloved &amp;#039;./configure&amp;#039; command, but in our case this is done in the &amp;#039;config_office&amp;#039; subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.&lt;br /&gt;
&lt;br /&gt;
My directory-structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 bin/&lt;br /&gt;
 src680-m182/&lt;br /&gt;
 src680-m196/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Now I go to the &amp;#039;config_office&amp;#039; subdir and link in my startscript:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ln -s ../../bin/build.sh&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And this is how &amp;#039;build.sh&amp;#039; looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 export BASE=`pwd|sed &amp;#039;s/\/config_office//&amp;#039;`&lt;br /&gt;
 export OOVERSION=`echo $BASE|sed &amp;#039;s/^\/.*\///&amp;#039;`&lt;br /&gt;
 echo Building from      : $BASE&lt;br /&gt;
 echo OpenOffice Version : $OOVERSION&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --with-lang=&amp;quot;de en-US&amp;quot; \&lt;br /&gt;
 --with-jdk-home=/Library/Java/Home/ \&lt;br /&gt;
 --with-gnu-cp=/sw/bin/cp \&lt;br /&gt;
 --with-epm=internal \&lt;br /&gt;
 --disable-mozab \&lt;br /&gt;
 --disable-odk \&lt;br /&gt;
 --disable-pasf \&lt;br /&gt;
 --disable-gtk \&lt;br /&gt;
 --disable-mozilla \&lt;br /&gt;
 --with-build-version=$OOVERSION-`date +%d-%m-%y` \&lt;br /&gt;
 --disable-fontconfig \&lt;br /&gt;
 --disable-neon \&lt;br /&gt;
 --without-nas&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--disable-odk will avoid you to download some windows dll which is not needed for aqua-build.&lt;br /&gt;
&lt;br /&gt;
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.&lt;br /&gt;
&lt;br /&gt;
--disable-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.&lt;br /&gt;
&lt;br /&gt;
This is allowedly a pretty much limited setup, but my overall goal is to get people to have &amp;#039;svdem&amp;#039; build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these offical builds are done in the long run is to be decided when we get there.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;List of Patches for a given Milestone&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here is a list of Patches one has to apply against a given Milestone of SRC680 (including CWS aquavcl01). Please keep the older Milestones here, since people are probably still on these Versions.&lt;br /&gt;
&lt;br /&gt;
                             &amp;lt;!--  &amp;#039;&amp;#039;&amp;#039;&amp;lt;big&amp;gt;IMPORTANT :  m200 resync is CURRENTLY in progress : please wait &amp;lt;/big&amp;gt;&amp;#039;&amp;#039;&amp;#039;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 PLEASE NOTE : &amp;#039;&amp;#039;&amp;#039;Current milestone for Aqua build is m200&amp;#039;&amp;#039;&amp;#039;  (older milestones are deprecated)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Milestone || Patch to apply || Status&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039; m200&amp;#039;&amp;#039;&amp;#039;  || To avoid crashes with several entries in menu  apply [http://eric.bachard.free.fr/patches/aqua/about_workaround/diff_salframe.diff about_workaround patch] in vcl/aqua/source/window  ||Work in progress &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Known build issues&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
m200: Breakage in instsetoo_native &lt;br /&gt;
&lt;br /&gt;
See [http://eric.bachard.free.fr/mac/aquavcl/patches/m200_aquavcl01/instsetoo_native_util_makefile.mk.diff  Fix for instsetoo_native breakage]&lt;br /&gt;
&lt;br /&gt;
how apply the patch ?&lt;br /&gt;
&lt;br /&gt;
Place it in &amp;lt;install_dir&amp;gt;/instsetoo_native/util&lt;br /&gt;
&lt;br /&gt;
type :&lt;br /&gt;
&lt;br /&gt;
patch -p0&amp;lt;instsetoo_native_util_makefile.mk.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m196:  Breakage in pyuno &lt;br /&gt;
&lt;br /&gt;
See [http://www.openoffice.org/issues/show_bug.cgi?id=72372 pyuno not found]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround&amp;#039;&amp;#039;&amp;#039; :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) either use the patch provided in issue 72372&lt;br /&gt;
&lt;br /&gt;
2) or simply do ( in the same terminal, or please source the environment before):&lt;br /&gt;
&lt;br /&gt;
cd bridges &lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
cd ../pyuno&lt;br /&gt;
build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; pyuno should build without any problem&lt;br /&gt;
&lt;br /&gt;
cd .. &amp;amp;&amp;amp; dmake &lt;br /&gt;
&lt;br /&gt;
will complete your build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Ericb|Ericb]] 14:52, 13 December 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Doing the build (about 4,5 GB)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Fine, now we have a (hopefully) working &amp;#039;build.sh&amp;#039; in the config_office subdir. We need to run it beforehand:&lt;br /&gt;
&lt;br /&gt;
 cd src680-m200/config_office/&lt;br /&gt;
 ./build.sh&lt;br /&gt;
&lt;br /&gt;
This will setup the necessary includefiles and create a couple of files in the &amp;#039;&amp;#039;&amp;#039;parent&amp;#039;&amp;#039;&amp;#039; directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for &amp;#039;MacOSXPPCEnv.Set.sh&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:&lt;br /&gt;
&lt;br /&gt;
On PowerPC :&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXPPCEnv.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or (on Mac Intel ) : &lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 source MacOSXX86Env.Set.sh&lt;br /&gt;
 time dmake&lt;br /&gt;
&lt;br /&gt;
The main purpose of the &amp;#039;&amp;#039;&amp;#039;boostrap&amp;#039;&amp;#039;&amp;#039; script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it&amp;#039;s history and manpage have a look here: http://tools.openoffice.org/dmake/index.html&lt;br /&gt;
&lt;br /&gt;
Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for &amp;#039;&amp;#039;&amp;#039;running&amp;#039;&amp;#039;&amp;#039; svdem later on. Here all the Enviroment-Variables for the Build will be set up. For a detailed descripton see [[Environment_Variables]]. Please note that on Intel machines, &amp;#039;MacOSXPPCEnv.Set&amp;#039; should be substituted with &amp;#039;MacOSXX86Env.Set&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours. Be paitioned. What can you do meanwhile? Do this:&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 while true ; do find . -maxdepth 1 -type d -anewer MacOSXPPCEnv.Set.sh |wc -l ; sleep 5; done&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and wait till the number reaches 174&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Creating Debug-Versions of Modules&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; Important: a new section about use XCode for OpenOffice.org debug has been created.&lt;br /&gt;
 See :&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[MacOSX_Debug_OpenOffice.org_using_XCode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to build the complete set with symbols included ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Currently not possible, and not adviced.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; is it possible to build some modules with symbols ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Yes, and that&amp;#039;s the simplest way to proceed. Some modules, like sal and vcl can be rebuilt using debug.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
To rebuild sal with symbols included, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
cd sal&lt;br /&gt;
rm -rf unxmacxp.pro&lt;br /&gt;
build debug=true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and recopy the libs into the bundle. gdb will display the symbols, and make your life easier.&lt;br /&gt;
&lt;br /&gt;
Note :  debug string is tested, and DEBUG is active when debug string is not empty. So debug=t works too.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; How change gdb options, and use e.g. -g -ggdb or -gdwarf-2  ?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To rebuild the module, you just have to modify the option in solenv/inc/unxmacx.mk, replacing -g with -ggdb&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Known issues&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Sometimes a build error, or a runtime error, may be seen in the normal build,  &lt;br /&gt;
 but the error goes away when --enable-debug is used or if the module is compiled with debug=true. &lt;br /&gt;
&lt;br /&gt;
The DEBUG build turns off optimisation, so this is a hint that compiler optimisation causes the error.&lt;br /&gt;
&lt;br /&gt;
The error might be due to incorrect code or a compiler fault.  Such errors might not be seen on all platforms, &lt;br /&gt;
&lt;br /&gt;
and might not be seen in different compiler versions on one platform.&lt;br /&gt;
&lt;br /&gt;
If the code can not be fixed there is a workaround using NOOPTFILES to build specified files with no optimisation.&lt;br /&gt;
 &lt;br /&gt;
Example : &lt;br /&gt;
&lt;br /&gt;
jvmfwk on Mac OS X: build jvmfwk in m183 on Mac OS X Intel leads to Bus Error when javaldx is run.&lt;br /&gt;
&lt;br /&gt;
Solution : use trial and error to rebuild individual files with debug=true. This proves the problem lies with vendorbase.cxx&lt;br /&gt;
&lt;br /&gt;
Have a look in sc/source/core/data/makefile.mk for an example to use NOOPTFILES&lt;br /&gt;
&lt;br /&gt;
To solve our problem: just add : NOOPTFILES= $(SLO)$/vendorbase.obj in the corresponding makefile.&lt;br /&gt;
&lt;br /&gt;
Take care in case some .IF is needed to prevent interference with other platforms.&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s some additional information around debugging on Christians Page [[User:CL#2006-09-03]]&lt;br /&gt;
&lt;br /&gt;
== Building and running svdem ==&lt;br /&gt;
&lt;br /&gt;
We want to run the demonstration programs called &amp;quot;svdem&amp;quot;. There are a couple of binaries called &amp;quot;svdem&amp;quot;, which area they cover is still somewhat unclear to me, I hope some of you guys can shed some light here. But hey, this is a wiki! Just correct here :-).&lt;br /&gt;
&lt;br /&gt;
==== svdem from VCL ====&lt;br /&gt;
To have the VCL Testprogram build you have to do:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[FIXME] replace this scetion with the same, but about svdem from svtools&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 cd vcl; build --all&lt;br /&gt;
&lt;br /&gt;
This should have created a file called &amp;quot;svdem&amp;quot; here: vcl/unxmacxp.pro/bin/svdem. If you managed to build these binaries, you are nearly there. What you need now, is a wrapper directory structure to make this binary a fellow Mac OSX application. I mean the ones which have this structure:&lt;br /&gt;
&lt;br /&gt;
 svdem.app/&lt;br /&gt;
 svdem.app/Contents&lt;br /&gt;
 svdem.app/Contents/Info.plist&lt;br /&gt;
 svdem.app/Contents/MacOS&lt;br /&gt;
 svdem.app/Contents/MacOS/applicat.rdb&lt;br /&gt;
 svdem.app/Contents/MacOS/svdem&lt;br /&gt;
&lt;br /&gt;
You can basically create this structure anywhere you want. And you can link-in the file you just created (svdem). So you build up this structure once and link-in the freshly created svdem there:&lt;br /&gt;
&lt;br /&gt;
 ls -l svdem applicat.rdb&lt;br /&gt;
 svdem -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/svdem&lt;br /&gt;
 applicat.rdb -&amp;gt; /opt/src/openoffice/src680-m200/vcl/unxmacxp.pro/bin/applicat.rdb&lt;br /&gt;
&lt;br /&gt;
Now only the Info.plist file is missing, so here we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[xml,N]&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDevelopmentRegion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;English&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;SvDem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.yourcompany.svdem&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleSignature&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;????&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;1.0&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;LSRequiresCarbon&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you created the directory structure properly you can do &amp;#039;./svdem&amp;#039; in the &amp;#039;svdem.app/Contents/MacOS/&amp;#039; directory. You should see the svdem coming up.&lt;br /&gt;
&lt;br /&gt;
==== svdem from svtools ====&lt;br /&gt;
* Copy the application package you created for the vcl svdem.&lt;br /&gt;
* Source your MacOSX[PPC-X86]Env.Set.sh&lt;br /&gt;
* Go into svtools/workben&lt;br /&gt;
* build svdem using dmake in the workben directory&lt;br /&gt;
* link the svdem and applicat.rdb from Contents/MacOS to the ones located in svtools/unxmacxp.pro/bin&lt;br /&gt;
&lt;br /&gt;
You are done : you can now source your environment and run svdem using your usual shell.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Installing, preparing and running OpenOffice.org&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Here I like to outline the steps to run OpenOffice.org after a successful build from the sources. Running the native Aqua Version of OpenOffice.org is somewhat tricky at the moment, since the installation procedure and mode are not in their final state. So right now one has to manually do some preparations to run the Office suite. This will change in the future when we are about to release some Alpha Builds to a wider audience.&lt;br /&gt;
&lt;br /&gt;
=== Drag &amp;amp; Drop Install the Application from the Diskimage ===&lt;br /&gt;
&lt;br /&gt;
When you are one of the lucky few (Don&amp;#039;t give up, Eric!), who have a successful build, you are going to see something like this as the last lines of the build:&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
    (CRC32 $11685D33: DiscRecording 3.1.3f2 (Apple_HFS : 2))&lt;br /&gt;
 Ressourcen hinzufügen…&lt;br /&gt;
 ......................................................................................................................................................&lt;br /&gt;
 Dauer: 15.406s&lt;br /&gt;
 Dateigröße: 144732418 Bytes, Prüfsumme: CRC32 $14E0BB67&lt;br /&gt;
 Bearbeitete Sektoren: 773848, 773845 komprimiert&lt;br /&gt;
 Geschwindigkeit: 24.5M Bytes/Sek&lt;br /&gt;
 Ersparnis: 63.5 %&lt;br /&gt;
 created: /opt/src/openoffice/src680-m200/instsetoo_native/unxmacxp.pro/OpenOffice/install/de/OpenOffice.org-2.1_de.dmg&lt;br /&gt;
&lt;br /&gt;
In this final step the &amp;quot;&amp;quot;instsetoo_native&amp;quot;&amp;quot; target creates the install Diskimages using Apple&amp;#039;s &amp;#039;hdiutil&amp;#039;. In my case it gives its output in German. After this disk image(s) have been created, double click the disk image to mount it (or type open &amp;lt;path to the DMG Image&amp;gt;) , and then move the icon named &amp;quot;OpenOffice.org 2.1&amp;quot; to your &amp;#039;&amp;#039;Applications&amp;#039;&amp;#039; folder (or any other folder you want this program to reside). The &amp;quot;OpenOffice.org 2.1&amp;quot; icon shown in the Finder is in fact a subdirectory called &amp;quot;OpenOffice.org 2.1.app&amp;quot;. Subdirectories named &amp;quot;.app&amp;quot; (along with some well-know files inside like Info.plist, etc) are called &amp;#039;&amp;#039;Bundles&amp;#039;&amp;#039; in Apple&amp;#039;s lingo.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the installation ===&lt;br /&gt;
&lt;br /&gt;
After the OpenOffice 2.1 Application has been copied to its destination, you have to go into this bundle and run a small shell script provided by Pavel Janik to prepare soffice.bin (OpenOffice.org launcher) for running. You have to run this script in the directory where a Universal Binary called &amp;quot;droplet&amp;quot; is located. This &amp;quot;droplet&amp;quot; binary was used to fire-off the X11 version of OpenOffice.org. Expect this to change, but as of now we have to do it like this.&lt;br /&gt;
&lt;br /&gt;
I have put my OpenOffice.org build in my home directory&amp;#039;s private &amp;quot;Application&amp;quot; folder (/Users/schmidtm/Applications), so please change this path to your installation. Now go to into the bundle and run the script:&lt;br /&gt;
&lt;br /&gt;
 cd /Users/schmidtm/Applications/OpenOffice.org 2.1.app/Contents/MacOS&lt;br /&gt;
 /opt/src/openoffice/bin/fix_installed_OOo&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[bash,N]&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 [ ! -f droplet ] &amp;amp;&amp;amp; {&lt;br /&gt;
     echo &amp;quot;Please run me in the directory, where binary named droplet is located.&amp;quot;&lt;br /&gt;
     exit 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mv THIRDPARTYLICENSEREADME.html help presets share ..&lt;br /&gt;
 mv droplet droplet.orig&lt;br /&gt;
 mv program/* .&lt;br /&gt;
 rmdir program&lt;br /&gt;
 &lt;br /&gt;
 cd ..&lt;br /&gt;
 ln -sf MacOS program&lt;br /&gt;
 sed &amp;#039;s#droplet#soffice.bin#&amp;#039; Info.plist &amp;gt;Info.plist.new&lt;br /&gt;
 mv Info.plist.new Info.plist&lt;br /&gt;
 cd MacOS&lt;br /&gt;
 &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run the soffice.bin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re nearly through, let&amp;#039;s fire-off the binary:&lt;br /&gt;
&lt;br /&gt;
 AQUA_NATIVE_MENUS=TRUE ./soffice.bin -nofirststartwizard -norestore&lt;br /&gt;
&lt;br /&gt;
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable || Function&lt;br /&gt;
|-&lt;br /&gt;
| SAL_NO_VCL=TRUE  || disable native controls code&lt;br /&gt;
|-&lt;br /&gt;
| AQUA_NATIVE_MENUS=TRUE || enable experimental native menus code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;HACK&amp;#039;&amp;#039;&amp;#039; : with current code, to enable native menus by defaut without have to define an environment variable, just comment as follow :&lt;br /&gt;
&lt;br /&gt;
in vcl/aqua/source/window/salmenu.cxx, around line 124 :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
     static const char *pExperimental = getenv (&amp;quot;AQUA_NATIVE_MENUS&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
     if ( !pExperimental || strcasecmp(pExperimental, &amp;quot;TRUE&amp;quot;) )&lt;br /&gt;
         return FALSE;&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
# Bug Database: http://www.openoffice.org/issues/query.cgi&lt;br /&gt;
# Mailinglist: mac@porting.openoffice.org&lt;br /&gt;
# IRC Meeting-Logs (#ooo_macport@freenode.org): http://eric.bachard.free.fr/mac/aquavcl/logs_meetings/&lt;br /&gt;
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf&lt;br /&gt;
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories&lt;br /&gt;
# Pavels Patch Wiki: http://blog.janik.cz/&lt;br /&gt;
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb&lt;br /&gt;
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL&lt;br /&gt;
# Carbon: http://developer.apple.com/carbon&lt;br /&gt;
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon&lt;br /&gt;
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html&lt;br /&gt;
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/&lt;br /&gt;
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/&lt;br /&gt;
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10&lt;br /&gt;
# Important screenshot (eventloop issue) : http://blog.janik.cz/images/MacOSX/  =&amp;gt; See : OOoMenus-separator-and-disabled_entries.png&lt;br /&gt;
# Native Menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_native_controls_03_11_06/aqua_menus_01.jpg&lt;br /&gt;
&lt;br /&gt;
More menus : http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MacOSX]]&lt;br /&gt;
[[Category:Porting]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Aqua]]&lt;/div&gt;</summary>
		<author><name>Ponderability</name></author>
	</entry>
</feed>