Construyendo en on windows con Cygwin y MSVCExpress

From The Document Foundation Wiki
Jump to: navigation, search

This notices are based on a build of "master" on WinXP. Building on Windows 7 might slightly differ. For your own build you have to adapt the pathes.

My goal was to examine, which parameters are really needed for a build on Windows using Cygwin and Visual Studio Express and which files are needed in addition.

While building the first time, you should log the output of the commands. In addition, problems with the parameters for ./autogen.sh are logged in the file config.log. Build breaks are logged in the file build_error.log. Both are overwritten with the next attempt, so make a backup before using the next command.

Sumario

Parametros

./autogen.sh \
 --disable-build-mozilla \
 --disable-nss-module \
 --with-ant-home=/ant \
 --without-junit \
 --disable-atl \
 --disable-activex

Archivos adicionales

Pon manualmente

  • gdiplus.dll en external\gdiplus
  • WNTMSCIinc.zip, WNTMSCIlib.zip, y WNTMSCIruntime.zip en moz\zipped
  • msvcp80.dll, msvcr80.dll, y Microsoft.VC80.CRT.manifest en external\msvcp80

ccache

En config.log
configure:6733: WARNING: ccache's cache size is less than 1GB using it is counter-producive: Disabling auto-ccache detection

Nada de que preocuparse. ccache no puede usarse en Windows. Referencia: http://lists.freedesktop.org/archives/libreoffice/2011-September/017728.html

midl.exe

En config.log
configure:10218: checking for midl.exe
configure:10251: result: no

and in output of ./autogen.sh
checking for midl.exe... no

Ni idea de las consecuencias. The build runs through. But it would also be possible to define the path with parameter --with-midl-path="/cygdrive/c/Programme/Microsoft SDKs/Windows/v6.0A/bin"

csc.exe

En config.log
configure:10289: checking for csc.exe
configure:10322: result: no
and in output of ./autogen.sh
checking for csc.exe... no

Ni idea de las consecuencias. The build runs through. But it would also be possible to define the path with parameter --with-csc-path="/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5"

valgrind

En config.log
conftest.c(42) : fatal error C1083: Cannot open include file: 'valgrind.h': No such file or directory

En output of ./autogen.sh
checking valgrind.h usability... no
checking valgrind.h presence... no
checking for valgrind.h... no

Nada de que preocuparse. Valgrind no existe en Windows y eso es lo que dice la salida. It does not hinder the build. Reference: http://lists.freedesktop.org/archives/libreoffice/2011-September/017730.html

mozilla

En output of ./autogen.sh
checking which Mozilla to use... internal
checking for toolkit Mozilla should use... checking whether to build Mozilla/SeaMonkey... yes
checking whether to build provided NSS module... yes
checking for Mozilla build tooling... configure: error: Mozilla build tooling not found.
Use the --with-mozilla-build option after installing the tools obtained
from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32
Error running configure at ./autogen.sh line 157.

The given advise is not suitable for building with Cygwin and MSVC Express. Mozilla cannot be build with them, at least whoever tried it, failed. If you want to try it, look at the readme.txt in module nss and report, if you are successful.
Usa el parametro --disable-mozilla to totally disable the use of Mozilla. Or use the parameter --disable-build-mozilla to use the precompiled binaries, see Development/BuildingOnWindows.
Si usas el parametro --disable-build-mozilla entonces tendrás que usar --disable-nss-module as well, otherwise you still get the demand for "Mozilla build tooling". You need additional files, see section msvcp80.
Mozilla is currently (LO3.5 Sept.2011) needed for the security and address book features.

ant

En output of ./autogen.sh
configure: error: Ant not found - Make sure it's in the path or use --with-ant-home

Sigue la recomendación. The parameter --with-ant-home=/ant works for an ant, which is installed as subfolder of cygwin. The path is relative to the directory of cygwin, not to your LibreOffice source code repository. Make sure, that your path has no blanks.

junit

En output of ./autogen.sh
checking for JUnit 4... no
configure: error: cannot find JUnit 4 jar; please install one in the default
location (/usr/share/java), specify its pathname via
--with-junit=..., or disable it via --without-junit

Use the parameter --without-junit. In consequence some Java based tests will not be used.
I don't know, whether JUnit is possible on Windows.

atl, activex

If you use a Visual Studio Express, the file atlbase.h is missing. Use the parameter --disable-atl, otherwise the build breaks in embedserv. Use the parameter --disable-activex in addition, if it still breaks in extensions\source\activex\.

--with-max-jobs / --with-num-cpus

The default make has version 3.81 on Cygwin. This version crashes, when you try parallelism. So leave this parameter out and use the default settings. Be patient, your first build might last 18 hours.

msvcp80

If you use the prebuild Mozilla binaries which were compiled using Visual Studio 2005, you need some files from that compiler, see the readme in folder msvcp80. Otherwise build will break in module instsetoo_native.

Perhaps you find these files already on your PC, because another application has installed them. Look into a subfolder of Windows\winsxs which name starts with x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b.

Another way is to use the 'Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)', last seen at http://www.microsoft.com/download/en/details.aspx?id=5638. Unfortunately it does not deliver the file MICROSOFT.VC80.CRT.manifest. But this is a pure textfile and you can write it using your editor. Use DOS line ends and UTF-8. For me the following content works, although it might not be "correct". I don't know whether it works on Windows7 too. I took the version number from the files.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInheritable/>
    <assemblyIdentity 
        type="win32" 
        name="Microsoft.VC80.CRT" 
        version="8.00.50727.6195" 
        processorArchitecture="x86" 
        publicKeyToken="1fc8b3b9a1e18e3b"
    />
    <file name="msvcr80.dll"/>
    <file name="msvcp80.dll"/>
    <file name="msvcm80.dll"/>
</assembly>

gdiplus

With make fetch a lot of additional stuff is downloaded, among them the installer for gdiplus.dll. It will create a path \asms\10\msft\windows\gdiplus under the path you give it during installation. But from there the file gdiplus.dll is not found and you have to copy it manually to external/gdiplus.