Win64 port

From Apache OpenOffice Wiki
Jump to: navigation, search

This documents progress being made in porting AOO to run on 64 bit Windows.

This has traditionally been a difficult platform to port to due to Windows uniquely being a LLP64 platform, whereas *nix is LP64; ie. sizeof(long) == 32 on Win64, but 64 on *nix. Every "long" everywhere in the codebase may have to potentially be replaced, and every conversion between long and pointer will definitely need replacement. A UNO bridge for LLP64 will also be necessary.

It's not all doom and gloom though. The *nix 64 bit port already must have eliminated conversions between int and pointer, making our life easier. Java, Python, StarBasic and other languages with types of known size should be ok.

So starting with Windows 7 64 bit, Cygwin64, 64 bit Java 9, Ant 1.10.2, let's push on and see how far we get.


At least 83 out of our 189 modules build successfully.

Currently main/bridges needs a Win64 bridge developed. The bridge needs to work with the Win64 C++ ABI in assembly language, a major challenge.


Use the latest SVN trunk and 64 bit Cygwin.

Make sure you pass --enable-win64 to ./configure like below (without it, 32 bit binaries get built):

./configure \
    --enable-win64 \
    --with-dmake-url= \
    --with-epm-url= \
    --disable-directx --with-ant-home=/cygdrive/c/apache-ant-1.10.2 \
    --without-junit \
cd instsetoo_native
build --all

Outstanding issues

uwinapi in main/sal proxies/emulates over 50 Windows API functions that are not available on older Windows versions, but uses 32 bit assembly languages. Only a few were ported to AMD64 (via porting them to C instead of assembly). Most should be unnecessary though, and are there mostly for Win9x.

Python was a major mission to patch and might not work.

Issues (old)

Date Issue Resolution Fixed in SVN revision
2018/03/03 Java 9 is not detected by oowintool. Patched oowintool to detect it. 1825763
2018/03/04 dmake's old config.guess can't detect Cygwin64. Patched main/bootstrap.1 to overwrite its config.guess with our own newer one. 1825798


2018/03/04 dmake uses Cygwin API functions that were deprecated on Cygwin32 and have been removed in Cygwin64. Added a patch in main/solenv/src to change dmake to use the replacement Cygwin APIs, and patched main/bootstrap.1 to apply the patch during ./bootstrap. 1825798


2018/03/04 Binaries built are 32 bit. Changes to,, various dmake and gbuild files are necessary to set up the 64 bit cl.exe. WORK ONGOING. 1825935
2018/03/05 ext_libraries/apr builds 32 bit and fails to link. Build was hardcoded to 32 bit, and needed 64 bit detection improved and resulting build files copied from the right location. 1825848
2018/03/05 main/lucene won't build with Java 1.9, needs -source and -target to be at least 1.6. Patched it to use those. As discussed on the mailing list before, we should use minimum Java version of 1.7, but OS/2 only has 1.6, so this change which used 1.6 shouldn't break any platform. 1825849
2018/03/05 main/curl only builds 32 bit and fails to link. Patched it to build 64 bit on Win64. 1825850
2018/03/05 main/sal doesn't build. Missing endianness, wrong types, 32-bit assembly language in macros, lots wrong... Builds now and unit tests pass, but unsure whether there are any remaining type conversion bugs. 1825923


2018/03/06 Win64 has the wrong CPPU_ENV of "msci". Changed it to "mscx". 1825956 but reverted and placed into win64.patch
2018/03/07 main/icu doesn't build, hardcoded to Win32. Patched to use 64 bit compiler as necessary. 1826062
2018/03/07 main/salhelper won't link, needs linker symbol map. Added new symbol map for Win64. 1826066
2018/03/07 main/icc won't compile, needs strcasecmp. If Win32 is not detected, stricmp is defined as strcasebmp. Patched to detect AMD64 as well. 1826069
2018/03/07 ridljar won't build, javadep from soltools doesn't support Java 9's new class file changes. Patched javadep. 1826078
Personal tools