From 6dd7798f57dfb29cda4a6d164f4884071fdc7f35 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 17 Dec 2015 21:22:45 +0200 Subject: Drop the Windows information, nobody has done that for years Change-Id: Idaf5b50c3fcd1083d758055889dea7e117adef3b --- README.cross | 198 ++--------------------------------------------------------- 1 file changed, 4 insertions(+), 194 deletions(-) (limited to 'README.cross') diff --git a/README.cross b/README.cross index c1745d352433..e391e9f7d8de 100644 --- a/README.cross +++ b/README.cross @@ -2,7 +2,10 @@ Cross-compiling LibreOffice *************************** Cross-compilation works, to various degree, to the following -platforms: Windows, iOS, Android, and Raspbian. +platforms: iOS, Android, and Raspbian. + +Note that this document has not been updated very often, and not +everything here necessarily is true any more. General @@ -47,199 +50,6 @@ configure.in is just the top level; when we get down to the actual makefilery used to build the bits of LibreOffice, it gets much worse. -Windows -******* - -There was some support in LibreOffice already from OpenOffice.org days -for building it locally on Windows with the GNU tool-chain (MinGW). -Apparently, those doing that work never attempted cross-compilation. - -This OOo-originated MinGW support attempts to be for both running the -Cygwin gcc in its -mno-cygwin mode, and a Windows-native MinGW -compiler. The -mno-cygwin mechanism in the Cygwin gcc is rapidly being -obsoleted, if it isn't already, and we have not attempted to try to -keep it working; in fact we have actively cleaned out mechanisms -related to this. Ditto for native MinGW. If one compiles natively on -Windows, just use a version of Microsoft's compiler. OpenOffice.org -and LibreOffice have been built for Windows all the time using that. - -The only case where it makes sense to use MinGW is for -cross-compilation. There is just too much crack involved on Windows -anyway, and it is a semi-miracle that the MSVC build under Cygwin -works as nicely as it does. - -MinGW is available as cross-build toolchains pre-packaged in more or -less official packages for many Linux distros including Debian, Fedora -and openSUSE. For instance, the mingw32 packages in the Open Build -Service, running on openSUSE, can be found at: - -http://download.opensuse.org/repositories/windows:/mingw:/win32/ - -For example, you can install it like this: - -zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32//windows:mingw:win32.repo - -where is one of SLE_11, SLE_11_SP1, openSUSE_XX.Y, or -openSUSE_Factory. - -zypper in mingw32-cross-gcc mingw32-cross-gcc-c++ mingw32-python-devel \ - mingw32-python mingw32-libboost_date_time \ - mingw32-libexpat-devel mingw32-libexpat mingw32-boost-devel \ - mingw32-libhyphen-devel mingw32-libhyphen mingw32-hyphen-en \ - mingw32-liblpsolve mingw32-liblpsolve-devel \ - mingw32-libxml2-devel mingw32-libxslt-devel mingw32-libicu \ - mingw32-libicu-devel mingw32-libgraphite2 mingw32-libgraphite2-devel \ - mingw32-libcairo2 mingw32-cairo-devel mingw32-librsvg mingw32-librsvg-devel \ - mingw32-hunspell mingw32-hunspell-devel mingw32-libcurl \ - mingw32-libcurl-devel mingw32-libneon mingw32-libneon-devel \ - mingw32-libopenssl mingw32-libopenssl-devel mingw32-libexttextcat \ - mingw32-libexttextcat-devel mingw32-libdb mingw32-libdb-devel \ - mingw32-cross-pkg-config mingw32-pkg-config mingw32-libcppunit \ - mingw32-libcppunit-devel mingw32-libredland mingw32-libredland-devel \ - mingw32-libmythes mingw32-libmythes-devel mingw32-mozilla-nss \ - mingw32-mozilla-nss-devel mingw32-mozilla-nspr \ - mingw32-mozilla-nspr-devel mingw32-libpoppler mingw32-libpoppler-devel - -You also need wine, ideally: - -zypper ar http://download.opensuse.org/repositories/Emulators:/Wine//Emulators:Wine.repo - -zypper in wine wine-devel wine-devel-32bit - -And in order to be able to use 'winegcc -m32', also - -zypper in glibc-devel-32bit gcc-32bit - -There might be more that are missing, please read carefully what autogen.sh -tells you, and either remove one of the --with-system-*, or install the -missing dependency. - -It also looks like graphite2.pc needs tweaking in order to work right; but -that's likely to be fixed in the openSUSE project. - -It is somewhat unclear how well thought-out the conditionals and code -for MinGW inside the OOo-originated code in LibreOffice actually -are. It often seems a bit randomish, with copy-pasting having been -preferred to factoring out differences. - -Most of the configuration settings are maintained in the -distro-configs/LibreOfficeMinGW.conf file, so in your autogen.input, -you can use: - -CC=ccache i686-w64-mingw32-gcc -CXX=ccache i686-w64-mingw32-g++ -CC_FOR_BUILD=ccache gcc -CXX_FOR_BUILD=ccache g++ ---with-distro=LibreOfficeMinGW - -Alternatively, you can use something like the following; but the -preferred way is to keep the LibreOfficeMinGW.conf file up-to-date. - -CC=ccache i686-w64-mingw32-gcc -CXX=ccache i686-w64-mingw32-g++ -CC_FOR_BUILD=ccache gcc -CXX_FOR_BUILD=ccache g++ ---build=x86_64-unknown-linux-gnu ---host=i686-w64-mingw32 ---with-distro=LibreOfficeWin32 ---disable-activex ---disable-directx ---disable-ext-nlpsolver ---disable-report-builder ---disable-scripting-beanshell ---disable-scripting-javascript ---disable-ext-wiki-publisher ---disable-pdfimport ---enable-python=system ---with-system-altlinuxhyph ---with-system-boost ---with-system-cairo ---with-system-cppunit ---with-system-curl ---with-system-expat ---with-system-hunspell ---with-system-icu ---with-system-libpng ---with-system-libwpd ---with-system-libwpg ---with-system-libwps ---with-system-libxml ---with-system-lpsolve ---with-system-mythes ---with-system-neon ---with-system-openssl ---with-system-redland ---with-vendor=no ---without-help ---without-helppack-integration ---without-myspell-dicts - -Once you have compiled it, you may want to try to run it, for instance -using Wine: - -$ cd /tmp -$ tar xf /workdir/wntgcci.pro/installation/LibreOffice_Dev/archive/install/en-US/LibO-Dev_4.1.0.0.alpha0_Win_x86_archive.tar.gz -$ cd LibO-Dev_4.1.0.0.alpha0_Win_x86_archive/LOdev\ 4.1/program/ -$ wine soffice.exe - -NB. it is important to unpack somewhere low in the hierarchy structure (like -in /tmp as advised above), otherwise you'll get BerkeleyDB errors on startup. - -And if you are brave enough, you can even debug it. First you have to add the -URE dll's to the wine's PATH using 'wine regedit' - see -http://www.winehq.org/docs/wineusr-guide/environment-variables, and add -Z:\tmp\LibO-Dev_4.1.0.0.alpha0_Win_x86_archive/LOdev\ 4.1\URE\bin -to "Path" in My Computer->HKEY_CURRENT_USER->Environment. - -And start debugging: - -$ winedbg soffice.bin - -Would be great to be able to use winedbg --gdb, but it was crashing here :-( - -but maybe you'll be more lucky. - -Tricks of some use with winedbg: --------------------------------- - -To examine OUStrings, you might want to use the following trick (prints 50 -unicode characters of rLibName OUString - the +10 is where the buffer starts): - -Wine-dbg>x /50u rLibName->pData+10 -0x0909b6c8: vnd.sun.star.expand:$LO_LIB_DIR/abplo.dll - -TODO: - -- make the debugging more convenient on (native) Windows - - check possibilities like WinGDB - http://www.wingdb.com/ - - or find / write a MSVS / WinDBG extension that can read MinGW debugging - symbols natively; more info - http://windbg.info/forum/12-symbol-and-source-files-/21-debugging-mingwgcc-built-dll-in-visual-studio.html - -- installation - - so far the make_installer.pl calls makecab.exe, uuidgen.exe, and - others; would be best to avoid that if at all possible (using a free - cab implementation, part of Wine or something) - - MSI generation - -- runtime - - no idea if the entire thing works after the installation at all; I - suppose there will be runtime problems to look at too - -- cleanup - - enable & fix pieces that are currently disabled - - --without-myspell-dicts - - --disable-directx - - --disable-activex - - much of the stuff currently relies on --with-system-*, and - consequently on the mingw32-* openSUSE packages; might be good to be - able to build with as few dependencies as possible - but that is low - prio - -- profiling - - when all the above is sorted out, we should look at the speed of - this vs. the speed of the MSVC version - - iOS *** -- cgit