Repository navigation
Building Gpredict 2.x for Windows #110
Description
Activity
I used the instruction on the Gtk+ website to setup MSYS2/MinGW. This has setup a more or less complete Unix environment and I could use the autotools method with a slightly modified configure.ac to build a binary.
The installation should also work using the updated Makefile as well as be able to build 32 bit binaries. I am going to try this next.
I continued with MSYS2/MinGW on windows and could install the 32 bit SDK along side the 64 bit SDK. I then copied the SDKs over to my Debian machine and could cross compile gpredict using the mingw-w64 cross compiler package.
So, using a standard MSYS2/MinGW installation we can build both 32 and 64 bit binaries on both windows and linux and using the latest Gtk+/Glib libraries.
I will now look into updating the runtime paths, icons, etc.
Latest build, now using the new application icon (files no long available):
- gpredict-win32-2.1.152.zip
- gpredict-win64-2.1.152.zip
Looks like MSYS2 is the way to go for up to date libraries, glad that sorted out the stability issue :)
Removing the experimental binary...
I spent a little while looking at how MSYS2 obtains it's libraries, with a view to avoiding the Windows installation + copy to Linux for a cross-build. It uses the Arch package manager pacman, with all the appropriate packages pulled from repo.msys2.org. This looks like it could work on an alien system such as Debian, sadly there is no port of pacman outside Arch or MSYS2 available for Debian-based distros. I will continue with building pacman from source to complete the experiment however.
Experiment complete, it is possible to build pacman from source on Debian and use it to pull the appropriate MSYS2 i686/x86_64 dependencies for gpredict into local folders. I needed to re-compile the glib schemas (I suspect a native MSYS2 runs a post-fetch script for this):
cd /mingw32/share/glib-2.0/schemas/ /usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas .I also note that this approach appears to include a number of unnecessary libraries (eg: libpython2.7.so) that bloats the deployable ZIP by ~10M.
- added 3 commits that reference this issue
on Jan 2, 2018 I think I have now fixed all remaining issues with the windows binary. As far as I can tell everything is working now.
I think this is sufficient for the 2.2 release and we can improve the readme and the makefile as we go.
- added a commit that references this issue
on Jan 3, 2018 - changed the title
[-]Gpredict 2.x for Windows[/-][+]Building Gpredict 2.x for Windows[/+]on Jan 12, 2018 I've just tried building git master for windows on msys2 using both mingw32 and mingw64 (x86_64) toolchains.
In order to get it to build & run on both, I needed to make a few changed to the Makefiles which are attached.
Main changes are:
- including the png and jpeg loaders (jpeg seems to be needed for png to work - not sure why)
- including the icons/Adwaita/scalable directory in the distribution
- it no longer seems necessary to manually adjust pkg-config paths
- update compiler flags to support both 32-bit and 64-bit builds
I've been trying to build the latest master on an MSYS2 install for my windows machine. I've configured the config.mk file to properly point to my /mingw64 folder, and it seems to be finding all the dependencies properly, but the build is still failing.
The last few lines I get when running the makefile are:
/opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x26e): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x2f5): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x324): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x393): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x402): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x458): more undefined references to `g_ascii_strtod' follow collect2: error: ld returned 1 exit status make: *** [Makefile:227: libsgpsdp.dll] Error 1Since I'm no pro C developer I can't just start digging into the files to figure out what's wrong. I'm guessing it's something simple in the toolchain that's just not configured right. However I followed all the instructions on the GTK windows setup page, and additionally had to keep installing various versions of the mingw gcc packages until I found the one that contained the correct
i686-w64-mingw32-gcccommand.I've been trying to build the latest master on an MSYS2 install for my windows machine. I've configured the config.mk file to properly point to my /mingw64 folder, and it seems to be finding all the dependencies properly, but the build is still failing.
The last few lines I get when running the makefile are:
/opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x26e): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x2f5): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x324): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x393): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x402): undefined reference to `g_ascii_strtod' /opt/lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld: sgp_in.o:sgp_in.c:(.text+0x458): more undefined references to `g_ascii_strtod' follow collect2: error: ld returned 1 exit status make: *** [Makefile:227: libsgpsdp.dll] Error 1Since I'm no pro C developer I can't just start digging into the files to figure out what's wrong. I'm guessing it's something simple in the toolchain that's just not configured right. However I followed all the instructions on the GTK windows setup page, and additionally had to keep installing various versions of the mingw gcc packages until I found the one that contained the correct
i686-w64-mingw32-gcccommand.Same issue here, do you happen to remember which package it was?
Anyone got a working windows build that’s somewhat up to date with the Linux version?
I tried also with Gpredict 2.4 - but did not succeed. The dependency versions called for in the config.mk are also not available anymore. Did someone else have luck with the new version released today?
# pkgconfig path, assumes goocanvas-3.0.0 and gtk+-3.10.4 win32 packages # unpacked and paths adjusted (pkg-config files) at the same folder level # as gpredict. Downloads used: # # http://ftp.gnome.org/pub/GNOME/binaries/win32/goocanvas/3.0/ # download both: goocanvas-3.0.0-win32.zip, goocanvas-dev-3.0.0-win32.zip # # http://win32builder.gnome.org/gtk+-bundle_3.10.4-20131202_win32.zip # NB: I had to create new .pc files for both gtk+-3.0.pc and gdk.pc # (thanks GNOME for missing crucial bits out of builds). My versions # are in this folder, and will need unpack paths inserting.
I am starting this new thread to track status and progress of windows builds, since the original pull request is now merged and closed.
Status as of writing: