Enable experimental GTK+ 3 test builds in Windows

Bug #1088612 reported by Alex Valavanis
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Patrick Storz
Inkscape Devlibs
Triaged
Medium
Unassigned
Inkscape Devlibs for Windows 64-bit
Fix Committed
Undecided
Patrick Storz

Bug Description

Is there a way to provide a test build in win32 for GTK+ 3? We should consider doing this after Inkscape 0.49 is released to allow GTK+ 3 testing to begin on non-linux platforms.

I know next to nothing about building on Windows, but as I see it there are two issues:

1. Providing the required libraries in devlibs
2. Providing suitable config file(s) in Inkscape

I guess we could provide a separate "testing" branch for windows, but it'll be a pain to keep rebasing it when the only difference is in the build files. If there's a way to allow alternative builds in trunk (similar to the "--enable-gtk3-experimental configure" flag in linux) then that seems like a neater option to me.

Tags: gtk3 win32
Revision history for this message
jazzynico (jazzynico) wrote :

> 1. Providing the required libraries in devlibs

Theoretically, we just need to add the required gtk3 and gtkmm3 libs, and share the other libs between gtk2 and gtk3 builds..
Unfortunately, gtk3 requires that we also update lots of our dependencies, starting with glib (the last time I checked, there were issues when compiling it on win32 with mingw).

Another option would be to use cross-compiled libs from OpenSuse (http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/). I did some tests last July. Inkscape compiled correctly but failed to run (see http://old.nabble.com/GTK%2B-3-build-complete-to33993847.html#a34230927). Very likely a compiler issue.

2. Providing suitable config file(s) in Inkscape

Almost all the changes need to be done in the build.xml file. Note that there are some deprecations in the win32 specific code (filedialogimpl-win32) and that gdl needs to be tweaked a bit.

> I guess we could provide a separate "testing" branch for windows

I'd rather provide a testing branch for the devlibs only, and provide a patch for the changes that need to be applied to Inkscape-trunk.

Changed in inkscape-devlibs:
status: New → Triaged
tags: added: gtk3 win32
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Some precisions:
* During my attempt, I didn't update everything in the devlibs, and the fact that our current libs were compiled with an old gcc version (opensuse ones are compiled with gcc-4.7) is probably the cause of the failure. I'll try again with a blank new devlib folder, with 4.7 libs only.
* The gdl fix is not a good idea. We should use external gdl libs instead...

Changed in inkscape:
status: New → Triaged
importance: Undecided → Medium
Changed in inkscape-devlibs:
importance: Undecided → Medium
jazzynico (jazzynico)
Changed in inkscape-devlibs:
assignee: nobody → JazzyNico (jazzynico)
status: Triaged → In Progress
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

@Nico - As far as I can tell, GTK+ 2 should work with most of the GTK+ 3 dependency versions (Glib 2.32 etc) so is there much point in having a separate branch?

Perhaps the most productive plan would be to first try bumping Glib, ATK etc to versions that are compatible with GTK+ 3. If the GTK+ 2 build still works OK, then we can move on to add GTK+ 3 and Gtkmm3 to devlibs without needing a separate branch.

Revision history for this message
jazzynico (jazzynico) wrote :

Alex> GTK+ 2 should work with most of the GTK+ 3 dependency versions

Yes, but in the current devlibs, our dependencies are too old compared to the versions required by GTK+3. And some dependencies (particularly Glib 2.32) are somewhat difficult to compile on Windows with mingw. That's the reason why I'm currently trying to work with the OpenSuse cross-compiled libs.
If everything works fine with it, yes, we could just add GTK+2 and officially decide to switch to gcc-4.7 (we're currently stuck with 4.6, due to recent changes in the GCC ABI).

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Ah OK... makes sense. :)

Revision history for this message
jazzynico (jazzynico) wrote :

Just spent the day working on it and... it now runs!

Well, I've had to disable some features, such as aspell and imagemagick, compile libiconv (not cross-compiled at OpenSuse) and fix some extra gcc-4.7 related things in the code. But at least we can test it and it's a good start.

I still have to do some clean-up, update the documentation, fix things that are disabled, and create a new devlibs-gtk3 branch...

Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
ScislaC (scislac) wrote :

JazzyNico: You might just be super awesome! Thanks for your work on this!

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Great news :) Thanks for your hard work and expertise!

Revision history for this message
Johan Engelen (johanengelen) wrote :

Jazz, can you commit your modified build.xml as "build-gtk3.xml" to trunk? Thanks!

Revision history for this message
jazzynico (jazzynico) wrote :

@Johan - A diff file (inkscape-win32-gtk3.diff) is available in the devlibs-gtk3 branch (there are other things to change apart from the build.xml file).
I've also added some documentation (win32-gtk3.txt) on how to compile Inkscape and how to update the devlibs.

Note that it's still experimental, and that some features (ImageMagick and Aspell) don't work due to compilation issues, and other things (hicolor icons) need to be fixed.

Revision history for this message
jazzynico (jazzynico) wrote :

Deprecations specific to the Win32 version are now fixed. The remaining diff file deals with GTK/GTKMM synchronization issue in the Opensuse repo.
There are still issues with ImageMagick (something wrong with the devlib package) and Aspell (not available in the repo, and difficult to compile on Windows XP), and some other bugs that I'm going to report separately.

Test version available: ftp://download.tuxfamily.org/inkscape/

Note that the experimental devlibs (https://code.launchpad.net/~jazzynico/inkscape-devlibs/devlibs-gtk3) also work with GTK2 (build.xml.gtk2).
I'm currently working on a 64 bits version of the experimental devlibs (no link yet), also based on the Opensuse cross-compiled files. But since I have no 64 bits Windows OS, I'll need some help from other devs to compile missing libs and test.

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
status: Triaged → In Progress
Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

I could help test x64 builds once they are made. I'm running Windows 7 x64 here.

Revision history for this message
jazzynico (jazzynico) wrote :

@rickmastfan67 - I'm currently working on a win64 version of the devlibs. I'll post here when it's ready to test.

Revision history for this message
Johan Engelen (johanengelen) wrote :

Great Jazz! Look forward to testing inkscape-devlibs64 !

Revision history for this message
jazzynico (jazzynico) wrote :

Win32/gtk3 branch updated to use the new Opensuse 12.3 files (gtk-3.8, glib-2.36 and lots of other updates).

Now that gtk and gtkmm use the same version number, we no longer need to patch the Inkscape code before compiling.

Due to lack of time, no progress on the Win64 branch...

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Nico, just wondering where we're up to with this? We now have Gtk+ 3 builds available for linux and the PPA, so it would be good to go ahead with devlibs whenever possible.

Revision history for this message
jazzynico (jazzynico) wrote :

Hi Alex,
Unfortunately the Opensuse libs didn't change since my last update (at least the Cairo, Gtk and ImageMagick ones) and thus none of the known issues are fixed.
Apart from the libs update, I've noticed Opensuse now provide a cross-compiled version of Inkscape 0.48.4. I haven't tested it yet, but it would be interesting to see if it shows the same issues or not.

Revision history for this message
jazzynico (jazzynico) wrote :

Devlibs-gtk3 updated with GCC-4.8.1 compiled libraries (r28). Tested with Inkscape trunk 12823, TDM-GCC-4.8.1.

ImageMagick still crashes (see bug #1252719 [devlibs-gtk3] Inkscape crashes with ImageMagick related commands ), and I have difficulties building aspell (see bug #1252711 [devlibs-gtk3] Compile Aspell with GCC-4.8.1).

But at least we (Johan helped me a lot!) managed to get rid of the GCC-4.8 related errors on Windows.

A test archive is available: ftp://download.tuxfamily.org/inkscape/inkscape-12823-gtk3-experimental.7z

Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

Downloaded and it started in Windows 7 x64 SP1.

It did take forever (30+ seconds) to start up the first time when it was creating a new profile (didn't want my "tested" profile to be damaged).

Found a bug right away with the GUI (not present in the x86 trunk versions). How should I report it? Here in this bug, or as a separate bug and link you to it?

Revision history for this message
jazzynico (jazzynico) wrote :

@rickmastfan67 - Thanks for your test!
You can create a new report in the devlibs project, tagged with gtk3, and add a link here.

Revision history for this message
rickmastfan67 (rickmastfan67) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Devlibs-gtk3 revision 31 now works with Aspell.

The ImageMagick crash is now the only (known...) blocker.

jazzynico (jazzynico)
Changed in inkscape:
assignee: jazzynico (jazzynico) → nobody
Changed in inkscape-devlibs:
assignee: jazzynico (jazzynico) → nobody
Changed in inkscape:
status: In Progress → Triaged
Changed in inkscape-devlibs:
status: In Progress → Triaged
Revision history for this message
Mingye Wang (artoria2e5) wrote :

Any new test binaries for the current devel branch or release version (0.91)?

I am hoping to get the new HiDPI support in libgdk 3.

Planning to try makepkg'ing https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-inkscape/PKGBUILD later.

Patrick Storz (ede123)
Changed in inkscape-devlibs64:
assignee: nobody → Eduard Braun (eduard-braun2)
status: New → In Progress
Revision history for this message
Patrick Storz (ede123) wrote :

GTK3 builds are now possible with devlibs64 (starting with r29).
The necessary build file for btool (build-x64-gtk3.xml) was committed to Inkscape trunk in r14673.

Inkscape builds created this way [1] are far from being usable in production but at least there are no immediate crashes...

[1] a test build is available at https://drive.google.com/folderview?id=0B3IZiqBj23X1eG5JeVBaSFFTanM&tid=0B3IZiqBj23X1My1CaUE2NjlpVms#list

Revision history for this message
Patrick Storz (ede123) wrote :

You should now be able to create trunk builds with CMake, too.
First test build is at [1].

http://download.tuxfamily.org/inkscape/win64/inkscape_trunk_r15113_win64.7z

Changed in inkscape-devlibs64:
status: In Progress → Fix Committed
Revision history for this message
Patrick Storz (ede123) wrote :

MSYS2 builds [1] allow for building with GTK+ 3 for both win32 and win64, so I probably can close this eventually...

[1] http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_with_MSYS2

Revision history for this message
jazzynico (jazzynico) wrote :

Yes, and there are probably lots of other bugs we could close thanks to MSYS2.
We could even close the whole devlibs branches.

Revision history for this message
Patrick Storz (ede123) wrote :

True, but there are some things, we have to sort through first, notably
1. Make building with MSYS2 official for trunk (I think were pretty much there, though)
2. Decide if we want to switch to MSYS2 for 0.92.x branch, too.

For both I'd still like some more people getting involved in testing / giving feedback...

Switching in 0.92.x would obviously have advantages, but it would require some effort (also with respect to packaging), so we should not rush things.
On the other hand, if we decide to switch eventually, we should not wait for too long, to get extensive testing going as soon as possible.

If I get around to it I'll update 0.92.x branch to support building with MSYS2, push some testing builds and create a bug to track progress this weekend.

Revision history for this message
jazzynico (jazzynico) wrote :

> 2. Decide if we want to switch to MSYS2 for 0.92.x branch, too.

Just had the opportunity to test today, and unfortunately, the MSYS2 package for 32-bit system doesn't seem to run on Windows XP (dwmapi.dll missing). The package was created on Windows 7 (64-bit), with mingw32. Unless I missed something important when building, we're stuck with the old devlibs for 0.92.x.

And I can also confirm that MSYS2 doesn't run on XP (the website claims it doesn't install, but I wanted to be sure it wasn't just an installer compatibility issue).

Revision history for this message
Patrick Storz (ede123) wrote :

@jazzynico: You're talking about a gtk2 build of 0.92.x, right? (just to be sure as this bug is about GTK+ 3 in principle)

In fact my (32-bit) MSYS2 builds of 0.92.x (compiled on Windows 10 x64) seem to work just fine on a Windows XP x86 machine, see for example [1] which I just built.
Can you check if this version runs on your XP machine? Maybe we're lacking CMake build flags unless there's not another problem I'm not aware of...

> And I can also confirm that MSYS2 doesn't run on XP (the website claims it doesn't install, but I wanted to be sure it wasn't just an installer compatibility issue).

Can you clarify? Does it not work at all? As far as I know an NTFS volume is required for running MSYS, but from what I read it should also work on XP in principle.

[1] https://download.tuxfamily.org/inkscape/win32/inkscape-0.92.x-15414-win32_MSYS2.7z

Revision history for this message
jazzynico (jazzynico) wrote :

> In fact my (32-bit) MSYS2 builds of 0.92.x (compiled on Windows 10 x64) seem to work just fine on a Windows XP x86 machine, see for example [1] which I just built.

Sorry I didn't test with the right files, but with a trunk version...
So I can confirm the linked archive runs correctly on Windows XP. And I'm really released it does.

As for MSYS2, the project's homepage says it doesn't install on XP. So I installed it (win32 version) on Windows 7, and then moved the folder to XP. The issue was reported in the MSYS2 bug tracker, and closed, unfortunately (see https://github.com/Alexpux/MSYS2-packages/issues/687).

Revision history for this message
Patrick Storz (ede123) wrote :

Great, good to know 0.92.x binaries are executable on XP!

Thanks for the link regarding XP support of MSYS2. So it seems there's currently no real option to also compile on XP. (I only stumbled over the installer issues before, but if Cygwin dropped XP support, there's obviously not much that can be done...)

Revision history for this message
Mingye Wang (artoria2e5) wrote :

> eduard-braun2:
> So it seems there's currently no real option to also compile on XP.

As jazzynico mentioned before, MSYS2's programs themselves seem to work on Windows XP, and you can actually try moving the files to an XP computer. If MSYS2's pacman also works on XP, you should be able to live and build with it for a while before some core MSYS2 dll updates (a new installer run) becomes necessary.

I am somehow thinking about running it "the wine way", i.e. creating a fake kernel32.dll with a stub for CancelSynchronousIo to make Windows XP happy with the installer. That seems to require some injection magic and consequently an "installer launcher". Um, no.

Revision history for this message
Patrick Storz (ede123) wrote :

With the MSYS2 build of 0.92.2 playing out nicely I think we can mark this resolved for Inkscape. Nightly builds with gtk3 work fine, see [1] for instructions.

devlibs/devlibs64 should be considered unmaintained/deprecated at this point.

[1] http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_with_MSYS2

Changed in inkscape:
status: Triaged → Fix Released
assignee: nobody → Eduard Braun (eduard-braun2)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.