Hi again, After a long battle I managed to reach the final step (the cross building of subsurface project) but somehow the linker fails. I receive a SEGV when it tries to free some memory. I don't know if it is helpful but you can find a dump here[1].
During the cross-compiling process I reached some issues and I will write them here in hope that maybe they will we useful for other people in the future: - one of the issue is in libgit project (file tests/checkout/icase.c) because they use an include directive for Windows header and on mingw the header is with lower case. I made a pull request to fix that but they have a problem with the CI environment so I don't know how much it will take to accept the request[2]. - on OpenSuse there is a problem with the mingw64-libzip-devel package(the zipconf header is not installed in the right place) and you have to create manually a symbolic link in the /usr/x86_64-w64-mingw32/sys-root/mingw/include/ directory. I also made a list with all the mingw64 packages needed and updated the INSTALL file. I believe that this will reduce the time of the developers which tries for the first time to do a Linux to Windows cross-compilation. You can find a patch attached to this e-mail. If you have any idea on how I can fix the linking problem, please let me know. As I said it before I have a OpenSuse 13.2-KDE-x86_64 platform. The linker version is GNU ld (GNU Binutils) 2.24.51.20140703. and the version of mingw64-make is GNU Make 4.0. For the moment I will skip the cross-building process and I will try to finish my proposal and to discover other ways to contribute. Best regards, Claudiu [1] - http://pastebin.com/MpqHVpJN [2] - https://github.com/libgit2/libgit2/pull/2985 On Mon, Mar 16, 2015 at 9:01 AM, Claudiu Olteanu < [email protected]> wrote: > Thanks for your responses. > > Currently I use a OpenSuse distribution (13.2 - KDE - x86_64). > > I will try to do the cross build when I will get back home and > I will let you know if it works. If not I can certainly look > over the scripts and try to make them work. In this way I will > expand my contribution to other areas. > > If the things become pretty ugly I will raise a hand on the > IRC channel and call for help :-). > > Cheers, > Claudiu >
From 99a6e65da8fc0bf61561bfc27be83b9cbbe21bd4 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu <[email protected]> Date: Tue, 17 Mar 2015 21:26:23 +0200 Subject: [PATCH] Update the documentation with dependencies for cross-building on Linux to Windows Update the documentation with dependencies for cross-building on Linux to Windows for OpenSuse platform and correct some building instructions. Moreover fix the windows building script to use the architectural specific binary. Signed-off-by: Claudiu Olteanu <[email protected]> --- INSTALL | 36 ++++++++++++++++++++++++++++++------ packaging/windows/mingw-make.sh | 4 +++- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/INSTALL b/INSTALL index 3cc8f73..68aa41c 100644 --- a/INSTALL +++ b/INSTALL @@ -215,6 +215,28 @@ cross builds under Linux (currently on Fedora 20). A shell script to do that (plus the .nsi file to create the installer with makensis) are included in the packaging/windows directory. +On OpenSUSE, for mingw64 packages you should add the specific +repository from their site. After that you can run the following +command: +sudo zypper install mingw64-cross-libqt5-qttools mingw64-mpc-devel \ + mingw64-filesystem mingw64-pkg-config mingw64-cross-gcc \ + mingw64-gcc-c++ mingw64-libusb-1_0-devel \ + mingw64-cross-libqt5-qttools mingw64-libqt5-qtwebkit \ + mingw64-libqt5-qtwebkit-devel mingw64-cross-libqt5-qmake \ + mingw64-libqt5-qtscript mingw64-libqt5-qtscript-devel \ + mingw64-libqt5-qtsvg mingw64-libqt5-qtsvg-devel \ + mingw64-libqt5-qtdeclarative mingw64-libqt5-qtdeclarative-devel \ + mingw64-libssh2-devel mingw64-libzip-devel \ + mingw64-sqlite-devel mingw64-win_iconv-devel \ + mingw64-libxslt-devel mingw64-libqt5-qttools + +[Observation] - Sometimes on OpenSUSE platform there is a problem with +the mingw64-libzip-devel package(the zipconf header is not installed in +the right place) and you have to create a symbolic link using the following +command: + sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libzip/include/zipconf.h \ + /usr/x86_64-w64-mingw32/sys-root/mingw/include/zipconf.h + Everywhere below the mingw64- prefix is used for the cross tools. If you really need a 32bit binary you need to use mingw32- as prefix and you may also run into issues creating an installable binary with Qt5 (i.e., you @@ -258,9 +280,11 @@ $ sudo mingw64-make install To compile libgit2, use: -$ mkdir -p ~/src/libgit2/build $ git clone git://github.com/libgit2/libgit2 ~/src/libgit2 -$ cd ~/src/libgit2/build +$ mkdir ~/src/libgit2/build +$ cd ~/src/libgit2 +$ git checkout v0.21.5 +$ cd build $ mingw64-cmake .. $ mingw64-make $ sudo mingw64-make install @@ -270,10 +294,10 @@ To compile Subsurface, use: $ cd ~/src $ git clone git://subsurface-divelog.org/subsurface.git $ cd subsurface -$ cd git checkout v4.4 # this get's you the last release - # skip this step to build the latest development - # version -$ packagin/windows/mingw-make.sh Qt5 SPECIAL_MARBLE_PREFIX=1 +$ git checkout v4.4-branch # this get's you the last release + # skip this step to build the latest development + # version +$ packaging/windows/mingw-make.sh Qt5-64 $ packaging/windows/mingw-make.sh install $ packaging/windows/mingw-make.sh installer diff --git a/packaging/windows/mingw-make.sh b/packaging/windows/mingw-make.sh index 578847c..f242a7e 100755 --- a/packaging/windows/mingw-make.sh +++ b/packaging/windows/mingw-make.sh @@ -16,8 +16,10 @@ rm $BASEDIR/../../ssrf-version.h > /dev/null 2>&1 if [[ $1 == "Qt5-64" ]] ; then export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH + MINGW_MAKE="mingw64-make" else export PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH + MINGW_MAKE="mingw32-make" fi export objdump=mingw-objdump @@ -74,4 +76,4 @@ else $BASEDIR/../../subsurface.pro fi -mingw32-make $@ +$MINGW_MAKE $@ -- 2.1.4
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
