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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Build requirements)
(35 intermediate revisions by 7 users not shown)
Line 13: Line 13:
 
For general information on how to build Apache OpenOffice from source code, see the [[Documentation/Building_Guide_AOO|platform independent page]].
 
For general information on how to build Apache OpenOffice from source code, see the [[Documentation/Building_Guide_AOO|platform independent page]].
  
{{Template:Documentation/Windows|This document explains the platform specific details.}}
+
{{Win|This document explains the platform specific details.}}
 
For building Apache OpenOffice the [http://www.cygwin.com Cygwin environment] is required.  Cygwin is a set of programs that run on Windows but emulate a complete Unix command line environment.  
 
For building Apache OpenOffice the [http://www.cygwin.com Cygwin environment] is required.  Cygwin is a set of programs that run on Windows but emulate a complete Unix command line environment.  
  
As compiler we use Microsoft's Visual C++, not the gcc from Cygwin.  Therefore Visual Studio Express can be used for debugging.
+
As compiler we use Microsoft's Visual C++ 2008 SP1, not the gcc from Cygwin.  Therefore Visual Studio Express/Professional (version 2008 or later) can be used for debugging.
  
 
To use this document you should be familiar with a bourne command line interpreter (sh or bash), but you need not be a UNIX shell wizard.
 
To use this document you should be familiar with a bourne command line interpreter (sh or bash), but you need not be a UNIX shell wizard.
{{Template:Documentation/Tip|If you have never used a Unix shell, you might want to take a look at the [http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/index.html shell introduction at TLDP].}}
+
{{Tip|If you have never used a Unix shell, you might want to take a look at the [http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/index.html shell introduction at TLDP].}}
  
 
=Build requirements=
 
=Build requirements=
Line 30: Line 30:
 
!style="width: 20%"|How to install
 
!style="width: 20%"|How to install
 
|-
 
|-
| Windows XP, Windows Vista, Windows 7
+
| Windows 7 (recommended), Windows Vista, Windows XP
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| Cygwin
 
| Cygwin
| http://www.cygwin.com, minimum version: 1.5.10, preferred: current version]
+
| http://www.cygwin.com, '''32bit version''', minimum version: 1.5.10, preferred: current version]
  
 
See [[#Setting up Cywin|below]] for setting up cygwin and the required packages.
 
See [[#Setting up Cywin|below]] for setting up cygwin and the required packages.
 
| (default)
 
| (default)
 
|-
 
|-
| Visual C++ 2008 Express
+
| Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
(C/C++ compiler, debugger)
+
| http://www.microsoft.com/en-us/download/details.aspx?id=3138
| http://www.microsoft.com/express/download/.
+
 
Free download, basic install, no optional parts required
+
It brings the Visual Studio 2008 C++ compiler with it.
| --with-cl-home=
+
|-
+
| Windows SDK for Windows Server 2008
+
| http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en
+
  
 
This is either a DVD image or a net installer. You can either mount the DVD with a suitable tool, burn it do a DVD or use tools like winrar or 7zip to extract files from the ISO file directly. You don't need to install samples or documentation (saves a lot of disk space). It will also install the .NET Framework 3.5 SDK.  It might be best to install the Windows SDK into the default directory, and if not that into one without capital letters in the path.
 
This is either a DVD image or a net installer. You can either mount the DVD with a suitable tool, burn it do a DVD or use tools like winrar or 7zip to extract files from the ISO file directly. You don't need to install samples or documentation (saves a lot of disk space). It will also install the .NET Framework 3.5 SDK.  It might be best to install the Windows SDK into the default directory, and if not that into one without capital letters in the path.
 
|  
 
|  
 +
|-
 +
| Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
 +
| vcredist_x86.exe, download found [https://www.microsoft.com/en-us/download/details.aspx?id=26368 here]
 +
It is just packed as it is into the installation package.
 +
 +
The exact download URL may have changed. In that case you have to search Microsoft's website.
 +
 +
{{Warn|Make sure you install the latest update.}}
 +
 +
| main/external/vcredist
 +
|-
 +
| Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)
 +
| vcredist_x64.exe, download found [https://www.microsoft.com/en-us/download/details.aspx?id=26368 here]
 +
It is just packed as it is into the installation package.
 +
 +
The exact download URL may have changed. In that case you have to search Microsoft's website.
 +
 +
{{Warn|Make sure you install the latest update.}}
 +
 +
| main/external/vcredist
 
|-
 
|-
 
| GDI+ Redistributable
 
| GDI+ Redistributable
 
| http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en.  Genuine Windows Validation required.
 
| http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en.  Genuine Windows Validation required.
 
| main/external/gdiplus
 
| main/external/gdiplus
 +
|-
 +
| Runtime libraries 10.0
 +
| msvcp100.dll and msvcr100.dll for Java 7 support - see issue [https://issues.apache.org/ooo/show_bug.cgi?id=120979 120979].
 +
Get them from the Microsoft Visual C++ 2010 Redistributable Package (x86) from the Microsoft site - http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft+Visual+C%2b%2b+2010+Redistributable
 +
| main/external/msvcp100
 +
|
 
|-
 
|-
 
| dbghelp.dll
 
| dbghelp.dll
| http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CD1FC4B2-0885-47F4-AF45-7FD5E14DB6C0
+
| http://msdn.microsoft.com/en-us/library/windows/desktop/ms679309%28v=vs.85%29.aspx
  
 
The exact download URL may have changed. In that case you have to search Microsoft's website.
 
The exact download URL may have changed. In that case you have to search Microsoft's website.
 +
 +
Search for it on your PC or on the web. E.g., it is part of the Windows Driver Kit.
 
| main/external/dbghelp
 
| main/external/dbghelp
 
|-
 
|-
| Runtime libraries
+
| Windows Driver Kit Version 7.1.0
| Microsoft_VC90_CRT_x86.msm and policy_9_0_Microsoft_VC90_CRT_x86.msm for non debug builds and Microsoft_VC90_DebugCRT_x86.msm and policy_9_0_Microsoft_VC90_DebugCRT_x86.msm for debug builds
+
| http://www.microsoft.com/downloads/details.aspx?id=11800
  
You can find these files in your directory <code>c:\Program Files\Common Files\Merge Modules</code> or <code>c:\Program Files (x86)\Common Files\Merge Modules</code> . These merge modules are available in Visual Studio 2008 Express Edition and Professional Edition.
+
To enable ATL and ActiveX in the build - it is optional
| main/external/msm90
+
 
 +
related configure options are:
 +
--with-atl-include, --with-atl-lib-dir, --with-mfc-include-dir, --with-mfc-lib-dir
 +
|  
 
|-
 
|-
| Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
+
| Microsoft DirectX SDK
| vcredist_x86.exe, download found [http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft%20Visual%20C%2b%2b%202008%20Redistributable%20Package&p=0&r=10&t=&s=availabledate~Descending here]
+
| http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812
It is just packed as it is into the installation package.
+
  
The exact download URL may have changed. In that case you have to search Microsoft's website.
+
To enable DirectX in the build - it is optional
| main/external/vcredist
+
 
 +
related configure option is:
 +
--with-directx-home
 +
|  
 
|-
 
|-
| Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)
+
| NSIS, version >= 3.0
| vcredist_x64.exe, download found [http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft%20Visual%20C%2b%2b%202008%20Redistributable%20Package&p=0&r=10&t=&s=availabledate~Descending here]
+
| Since branch AOO413 and trunk revision 1766031, NSIS version 3.0 or greater is required if you want to build a Windows installer.
It is just packed as it is into the installation package.
+
http://nsis.sourceforge.net/Download
  
The exact download URL may have changed. In that case you have to search Microsoft's website.
+
For previous versions, use Unicode NSIS, version 2.46.5 from http://code.google.com/p/unsis/downloads/detail?name=nsis-2.46.5-Unicode-setup.exe&can=2&q=
| main/external/vcredist
+
|
 
|}
 
|}
  
Requirements for optional features:
+
When building Apache OpenOffice 3.4.x or 4.0.x you need to provide some additional binaries:
 
+
 
{| class="prettytable" border="1" width="100%"
 
{| class="prettytable" border="1" width="100%"
|-
 
!style="width: 25%"|What
 
! Where to get
 
!style="width: 20%"|How to install
 
|-
 
| Mozilla binary distribution
 
| http://tools.openoffice.org/moz_prebuild/OOo3.2 (WNTMSCIruntime.zip,WNTMSCIlib.zip,WNTMSCIinc.zip) Needed as prebuilts for module moz (SeaMonkey) as the current used SeaMonkey version 1.1.4 does not support a build with Visual Studio C++ 2008 compiler.
 
| main/moz/zipped
 
 
|-
 
|-
 
| Runtime libraries 7.1
 
| Runtime libraries 7.1
| msvcr71.dll and msvcp71.dll for Mozilla libraries. Search for them on the web or on your PC. These files should be named as all lower case. Sometimes when downloaded they are upper case and this will cause 'file not found' errors towards the end of the build))
+
| msvcr71.dll for Mozilla libraries. Search for them on the web or on your PC. These files should be named as all lower case. Sometimes when downloaded they are upper case and this will cause 'file not found' errors towards the end of the build))
 
| main/external/msvcp71  
 
| main/external/msvcp71  
 
|-
 
|-
Line 102: Line 122:
 
| msvcp80.dll and msvcr80.dll for Mozilla libraries. Search for them on the web or on your PC.
 
| msvcp80.dll and msvcr80.dll for Mozilla libraries. Search for them on the web or on your PC.
 
| main/external/msvcp80
 
| main/external/msvcp80
|
 
|-
 
| Microsoft DirectX SDK
 
| http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812
 
| --with-directx-home=
 
|-
 
| Nullsoft Scriptable Install System (NSIS)
 
| http://nsis.sourceforge.net/
 
 
If NSIS is available, a self contained Windows installer is created in addition to the MSI installer files.
 
 
It used to be that newer version of NSIS broke the build (see {{Bug|85657}}), but it seems that it now works for NSIS up to 2.3.7.
 
 
|}
 
|}
  
 
=Remarks=
 
=Remarks=
  
{{Template:Documentation/Note|OOo uses some Mozilla libraries. Building the corresponding sources is only possible with the VC2003 compiler so you have to use precompiled libraries that require the msvx71 libraries mentioned above. On Windows the Mozilla libraries are needed only for Mozilla address book support. Unfortunately a bug in the module dependencies makes it necessary that the Mozilla libaries are used anyway as otherwise building the module <tt>xmlsecurity</tt> fails (see below).}}
+
{{Note|OOo uses some Mozilla libraries. Building the corresponding sources is only possible with the VC2003 compiler so you have to use precompiled libraries that require the msvx71 libraries mentioned above. On Windows the Mozilla libraries are needed only for Mozilla address book support. Unfortunately a bug in the module dependencies makes it necessary that the Mozilla libaries are used anyway as otherwise building the module <tt>xmlsecurity</tt> fails.}}
 
+
{{Template:Documentation/Note|The default cygwin version offered on http://www.cygwin.com/ now is 1.7.x. For current milestones it is recommended to use this version as it fixes the .dll remapping probelm (see below) and is required for builds on Windows 7. If you need to build old versions of the source code, check out http://www.cygwin.com/win-9x.html}}
+
  
 
= Setting up Cygwin =
 
= Setting up Cygwin =
  
Go to http://www.cygwin.com/ and download and install the current version.
+
Go to http://www.cygwin.com/ and download and install the current 32bit version.
{{Template:Documentation/Caution|Make sure that you keep the filetype set to “Unix/binary”.}}
+
{{Warn|Make sure that you keep the filetype set to “Unix/binary”.}}
{{Template:Documentation/Caution|Make sure that the PATH variable in your cygwin shell does not contain any unquoted blanks and quotes, otherwise configure will not work}}
+
{{Warn|Make sure that the PATH variable in your cygwin shell does not contain any unquoted blanks and quotes, otherwise configure will not work}}
 +
 
 +
 
 +
=== Additional packages for Cygwin to serve the AOO build ===
  
 
Cygwin consists of some basic and a lot of optional packages. As building AOO needs some of these optional packages you have to select them in the installer.
 
Cygwin consists of some basic and a lot of optional packages. As building AOO needs some of these optional packages you have to select them in the installer.
Line 140: Line 149:
 
** gperf
 
** gperf
 
** make
 
** make
** openssl-devel (only needed for perl modules for CWS tooling, see below)
+
** patch
** mercurial (or cvs for 2.x-3.0, or subversion for 3.1 codeline)
+
 
** readline
 
** readline
 +
** subversion (if you want to use svn inside the cygwin shell to checkout and update your working copy of AOO (which is highly recommended as Windows Tools can mess up Line breaks))
 
* Category Libs
 
* Category Libs
** openssl
+
** libexpat-devel
 
* Category Net
 
* Category Net
 
** openssh
 
** openssh
 +
** openssl
 
* Category Perl
 
* Category Perl
** perl
+
** perl - see [http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO#General_Build_Requirements General Build Requirements] for additional Perl modules
 
* Category Shells
 
* Category Shells
 
** mintty
 
** mintty
 
* Category Utils
 
* Category Utils
** patch
 
 
** gnupg
 
** gnupg
 
* Category Web
 
* Category Web
 
** wget
 
** wget
  
{{Template:Documentation/Note|The installer will automatically check and download some more packages needed by thosed listed here. The whole process takes roughly 20 minutes.}}
+
{{Note|The installer will automatically check and download some more packages needed by whose listed here. The whole process takes roughly 20 minutes.}}
 +
 
 +
=== Breaking links to executable ===
 +
 
 +
Within the Cygwin Toolkit, some executables might be symlinks: awk.exe and gunzip.exe, tar.exe (in older releases only). This can lead to a break of the build later, and the symlinks should be replaced by copies of the command they link to.
 +
 
 +
To check this, execute:
 +
 
 +
ls -l /bin/awk.exe
 +
 
 +
whether e.g. awk.exe is a symlink. In version 1.5.24-2 awk.exe is a link to gawk.exe. The shell will show this by putting out “awk.exe -> gawk.exe”. In this case gawk.exe must be copied to awk.exe by executing:
 +
 
 +
cd /bin
 +
rm awk.exe
 +
cp gawk.exe awk.exe
 +
 
 +
In case you overlook something here or you have a newer Cygwin version with additional symlinks not mentioned here it's not a problem. You will get a helpful error message about an existing link in the configuration step (configure) later. The message will tell you which link you have to remove and you can do it following the advice given above for the awk.exe/gawk.exe pair.
 +
 
 +
 
 +
=== Installing additional perl modules in cygwin ===
 +
 
 +
As explained some perl modules must be installed with CPAN. The necessary command in the cygwin shell is
 +
 
 +
perl -MCPAN -e shell
 +
 
 +
If this command is executed the first time CPAN will ask for configuration. Choose autoconfiguration.
 +
 
 +
{{Warn|Please note that CPAN is not able to deal with usernames containing spaces. To work around this fact, when CPAN asks you to specify the ''CPAN build and cache directory'', change the default suggestion to <tt>/cpan</tt>.}}
 +
 
 +
At the end the CPAN shell appeared and is ready to accept commands for installations. Each module is installed by typing <code>install $MODULENAME</code>. The modules that must be installed are:
 +
 
 +
* Archive::Zip
 +
* LWP::UserAgent
 +
* XML::Parser (though it seems that this is already installed; doesn't hurt to do it)
 +
 
 +
CPAN will detect if a selected module depends on other modules and it will offer to download them also. As explained please just confirm this.
 +
 
 +
{{Warn|I got an error message from CPAN somewhat like the following:
 +
<pre>C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
 +
address as parent(0x7C0000) != 0x7D0000</pre>
 +
To fix this, I had to exit the Cygwin shell, run cmd.exe, then type "c:\cygwin\bin\ash.exe" to start the minimal shell, then type <code>/bin/rebaseall</code>. Then CPAN worked when I ran it again.
 +
 
 +
If you can't install LWP::UserAgent because of libwww-perl copy, gcc and g++ compiler.
 +
<pre>
 +
cd /usr/bin
 +
cp gcc.exe gcc-4.exe
 +
cp g++.exe g++-4.exe
 +
</pre>
 +
}}
  
 
= Configure switches (Windows specific) =
 
= Configure switches (Windows specific) =
Line 163: Line 220:
 
Additionally to the general [[Documentation/Building_Guide_AOO#Configuration_and_bootstrapping|configure switches]] there are several that only have to be used on Windows or have Windows specific values.
 
Additionally to the general [[Documentation/Building_Guide_AOO#Configuration_and_bootstrapping|configure switches]] there are several that only have to be used on Windows or have Windows specific values.
  
Typical values for the compiler and SDK:
+
Typical values for the compiler and SDK. If default installation paths are used these configure switches are not needed:
  --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC"            \
+
   --with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0"
  --with-mspdb-path="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE" \
+
   --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0"
   --with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"             \
+
   --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0/Bin"
   --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"             \
+
   --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin"          \
+
  --with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/Bin"        \
+
  --with-csc-path="/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.5"
+
For Java SDK and Ant:
+
  --with-jdk-home="/cygdrive/c/Program Files (x86)/Java/jdk1.6.0_27"                    \
+
  --with-ant-home="/cygdrive/c/ant"
+
 
For DirectX:
 
For DirectX:
 
   --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
 
   --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
For the Express edition of Visual Studio
+
For ATL and ActiveX:
   --disable-atl                                                                         \
+
   --with-atl-include-dir=/cygdrive/c/WinDDK/7600.16385.1/inc/atl71
   --disable-activex
+
   --with-atl-lib-dir=/cygdrive/c/WinDDK/7600.16385.1/lib/ATL/i386
 +
  --with-mfc-include-dir=/cygdrive/c/WinDDK/7600.16385.1/inc/mfc42
 +
  --with-mfc-lib-dir=/cygdrive/c/WinDDK/7600.16385.1/lib/Mfc/i386
 +
 
 
And some more:
 
And some more:
   --enable-pch                                                                         \
+
   --enable-pch
 
   --enable-dbgutil
 
   --enable-dbgutil

Revision as of 10:10, 16 July 2018

Template:Documentation/Building Guide AOO TOC

Overview

For general information on how to build Apache OpenOffice from source code, see the platform independent page.

Documentation windows.png This document explains the platform specific details.

For building Apache OpenOffice the Cygwin environment is required. Cygwin is a set of programs that run on Windows but emulate a complete Unix command line environment.

As compiler we use Microsoft's Visual C++ 2008 SP1, not the gcc from Cygwin. Therefore Visual Studio Express/Professional (version 2008 or later) can be used for debugging.

To use this document you should be familiar with a bourne command line interpreter (sh or bash), but you need not be a UNIX shell wizard.

Tip.png If you have never used a Unix shell, you might want to take a look at the shell introduction at TLDP.


Build requirements

Additionally to the general build requirements you need

What Where to get How to install
Windows 7 (recommended), Windows Vista, Windows XP
Cygwin http://www.cygwin.com, 32bit version, minimum version: 1.5.10, preferred: current version]

See below for setting up cygwin and the required packages.

(default)
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 http://www.microsoft.com/en-us/download/details.aspx?id=3138

It brings the Visual Studio 2008 C++ compiler with it.

This is either a DVD image or a net installer. You can either mount the DVD with a suitable tool, burn it do a DVD or use tools like winrar or 7zip to extract files from the ISO file directly. You don't need to install samples or documentation (saves a lot of disk space). It will also install the .NET Framework 3.5 SDK. It might be best to install the Windows SDK into the default directory, and if not that into one without capital letters in the path.

Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) vcredist_x86.exe, download found here

It is just packed as it is into the installation package.

The exact download URL may have changed. In that case you have to search Microsoft's website.

Documentation caution.png Make sure you install the latest update.
main/external/vcredist
Microsoft Visual C++ 2008 SP1 Redistributable Package (x64) vcredist_x64.exe, download found here

It is just packed as it is into the installation package.

The exact download URL may have changed. In that case you have to search Microsoft's website.

Documentation caution.png Make sure you install the latest update.
main/external/vcredist
GDI+ Redistributable http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en. Genuine Windows Validation required. main/external/gdiplus
Runtime libraries 10.0 msvcp100.dll and msvcr100.dll for Java 7 support - see issue 120979.

Get them from the Microsoft Visual C++ 2010 Redistributable Package (x86) from the Microsoft site - http://www.microsoft.com/en-us/download/search.aspx?q=Microsoft+Visual+C%2b%2b+2010+Redistributable

main/external/msvcp100
dbghelp.dll http://msdn.microsoft.com/en-us/library/windows/desktop/ms679309%28v=vs.85%29.aspx

The exact download URL may have changed. In that case you have to search Microsoft's website.

Search for it on your PC or on the web. E.g., it is part of the Windows Driver Kit.

main/external/dbghelp
Windows Driver Kit Version 7.1.0 http://www.microsoft.com/downloads/details.aspx?id=11800

To enable ATL and ActiveX in the build - it is optional

related configure options are: --with-atl-include, --with-atl-lib-dir, --with-mfc-include-dir, --with-mfc-lib-dir

Microsoft DirectX SDK http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812

To enable DirectX in the build - it is optional

related configure option is: --with-directx-home

NSIS, version >= 3.0 Since branch AOO413 and trunk revision 1766031, NSIS version 3.0 or greater is required if you want to build a Windows installer.

http://nsis.sourceforge.net/Download

For previous versions, use Unicode NSIS, version 2.46.5 from http://code.google.com/p/unsis/downloads/detail?name=nsis-2.46.5-Unicode-setup.exe&can=2&q=

When building Apache OpenOffice 3.4.x or 4.0.x you need to provide some additional binaries:

Runtime libraries 7.1 msvcr71.dll for Mozilla libraries. Search for them on the web or on your PC. These files should be named as all lower case. Sometimes when downloaded they are upper case and this will cause 'file not found' errors towards the end of the build)) main/external/msvcp71
Runtime libraries 8.0 msvcp80.dll and msvcr80.dll for Mozilla libraries. Search for them on the web or on your PC. main/external/msvcp80

Remarks

Documentation note.png OOo uses some Mozilla libraries. Building the corresponding sources is only possible with the VC2003 compiler so you have to use precompiled libraries that require the msvx71 libraries mentioned above. On Windows the Mozilla libraries are needed only for Mozilla address book support. Unfortunately a bug in the module dependencies makes it necessary that the Mozilla libaries are used anyway as otherwise building the module xmlsecurity fails.

Setting up Cygwin

Go to http://www.cygwin.com/ and download and install the current 32bit version.

Documentation caution.png Make sure that you keep the filetype set to “Unix/binary”.
Documentation caution.png Make sure that the PATH variable in your cygwin shell does not contain any unquoted blanks and quotes, otherwise configure will not work


Additional packages for Cygwin to serve the AOO build

Cygwin consists of some basic and a lot of optional packages. As building AOO needs some of these optional packages you have to select them in the installer. Here's a complete list of the required packages:

  • Category Archive:
    • unzip
    • zip
  • Category Devel :
    • autoconf
    • bison
    • flex
    • gcc-g++
    • gperf
    • make
    • patch
    • readline
    • subversion (if you want to use svn inside the cygwin shell to checkout and update your working copy of AOO (which is highly recommended as Windows Tools can mess up Line breaks))
  • Category Libs
    • libexpat-devel
  • Category Net
    • openssh
    • openssl
  • Category Perl
  • Category Shells
    • mintty
  • Category Utils
    • gnupg
  • Category Web
    • wget
Documentation note.png The installer will automatically check and download some more packages needed by whose listed here. The whole process takes roughly 20 minutes.

Breaking links to executable

Within the Cygwin Toolkit, some executables might be symlinks: awk.exe and gunzip.exe, tar.exe (in older releases only). This can lead to a break of the build later, and the symlinks should be replaced by copies of the command they link to.

To check this, execute:

ls -l /bin/awk.exe

whether e.g. awk.exe is a symlink. In version 1.5.24-2 awk.exe is a link to gawk.exe. The shell will show this by putting out “awk.exe -> gawk.exe”. In this case gawk.exe must be copied to awk.exe by executing:

cd /bin
rm awk.exe
cp gawk.exe awk.exe

In case you overlook something here or you have a newer Cygwin version with additional symlinks not mentioned here it's not a problem. You will get a helpful error message about an existing link in the configuration step (configure) later. The message will tell you which link you have to remove and you can do it following the advice given above for the awk.exe/gawk.exe pair.


Installing additional perl modules in cygwin

As explained some perl modules must be installed with CPAN. The necessary command in the cygwin shell is

perl -MCPAN -e shell

If this command is executed the first time CPAN will ask for configuration. Choose autoconfiguration.

Documentation caution.png Please note that CPAN is not able to deal with usernames containing spaces. To work around this fact, when CPAN asks you to specify the CPAN build and cache directory, change the default suggestion to /cpan.

At the end the CPAN shell appeared and is ready to accept commands for installations. Each module is installed by typing install $MODULENAME. The modules that must be installed are:

  • Archive::Zip
  • LWP::UserAgent
  • XML::Parser (though it seems that this is already installed; doesn't hurt to do it)

CPAN will detect if a selected module depends on other modules and it will offer to download them also. As explained please just confirm this.

Documentation caution.png I got an error message from CPAN somewhat like the following:
C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
address as parent(0x7C0000) != 0x7D0000

To fix this, I had to exit the Cygwin shell, run cmd.exe, then type "c:\cygwin\bin\ash.exe" to start the minimal shell, then type /bin/rebaseall. Then CPAN worked when I ran it again.

If you can't install LWP::UserAgent because of libwww-perl copy, gcc and g++ compiler.

cd /usr/bin
cp gcc.exe gcc-4.exe
cp g++.exe g++-4.exe

Configure switches (Windows specific)

Additionally to the general configure switches there are several that only have to be used on Windows or have Windows specific values.

Typical values for the compiler and SDK. If default installation paths are used these configure switches are not needed:

 --with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0"
 --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0"
 --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0/Bin"

For DirectX:

 --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"

For ATL and ActiveX:

 --with-atl-include-dir=/cygdrive/c/WinDDK/7600.16385.1/inc/atl71
 --with-atl-lib-dir=/cygdrive/c/WinDDK/7600.16385.1/lib/ATL/i386
 --with-mfc-include-dir=/cygdrive/c/WinDDK/7600.16385.1/inc/mfc42
 --with-mfc-lib-dir=/cygdrive/c/WinDDK/7600.16385.1/lib/Mfc/i386

And some more:

 --enable-pch
 --enable-dbgutil
Personal tools