April 20, 2006 16:17

Compiling Mozilla in OpenOffice.org 2.0.3 Win32

I am compiling OpenOffice.org OOB680m5 (2.0.2) under Win32 with cygwin and tcsh. As part of the build process, Mozilla 1.7.5 autoconf breaks. I got the following error:

cd ./wntmsci10.pro/misc/build/mozilla/ && sh -c "./configure  --disable-tests --<snip>
creating cache ./config.cache
checking host system type... i586-pc-msvc
checking target system type... i586-pc-msvc
checking build system type... i586-pc-msvc
checking for gcc... cl.exe
checking whether the C compiler (cl.exe  ) works... yes
checking whether the C compiler (cl.exe  ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cl.exe accepts -g... no
checking for c++... cl.exe
checking whether the C++ compiler (cl.exe  ) works... yes
checking whether the C++ compiler (cl.exe  ) is a cross-compiler... no
checking whether we are using GNU C++... no
checking whether cl.exe accepts -g... no
checking for ranlib... ranlib
checking for ml... /cygdrive/i/VS2003/Vc7/bin/ml
checking for ar... ar
checking for ld... link
checking for strip... strip
checking for windres... windres
checking for gawk... gawk
checking for midl... midl
configure: error: This version of the MSVC compiler,  , is unsupported.

Having a look into the configure, i found the following lines of dirty code:

CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`

CXX_VERSION=`"${CXX}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`

_LD_FULL_VERSION=`"${LD}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`

_MIDL_FULL_VERSION=`"${MIDL}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`

My environment looks as follows:

  • CC_VERSION cl.exe Compilador de optimización versión 13.10.3077 para 80x86 de Microsoft (R) C/C++ de 32 bits (Spanish)
  • CXX_VERSION cl.exe Compilador de optimización versión 13.10.3077 para 80x86 de Microsoft (R) C/C++ de 32 bits (Spanish)
  • _LD_FULL_VERSION link.exe Microsoft (R) Incremental Linker Version 7.10.3077 (English)
  • _MIDL_FULL_VERSION Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0361 (English)
  • .NET Microsoft (R) Visual C# .NET-kompilator version 7.10.6001.4 (Swedish)

The binaries are:

$ which link
/cygdrive/i/VS2003/Vc7/bin/link
$ which cl
/cygdrive/i/VS2003/Vc7/bin/cl
$ which midl
/cygdrive/i/VS2003/Common7/Tools/Bin/midl
$ which csc
/cygdrive/i/MFNET/csc

The problem takes place in the way that autoconf in Mozilla finds the version, as it is expecting an ENGLISH version of the Visual Studio 2003. The fast-fix looks as follows:

CC_VERSION=`"${CC}" -v 2>&1 | grep versión | sed -e 's|.* versión ||' -e 's| .*||'`

More issues:

  • localize_sl.exe crashes under Win32 http://l10n.openoffice.org/servlets/BrowseList?list=dev&by=thread&from=1193032
  • #49856: Remove $PSDK_HOME/lib/libcp.lib