Confusing windows build instructions
Hi all,
Today while perusing the varied Windows build instructions I was struck by some contradictory, or at least, not fully fleshed out text.
For instance, it says here:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows
Warning: As our 32-bit development libraries (devlibs) currently do not offer GTK+ 3 (which is required by trunk) you have to follow the instructions for 64-bit builds or use MSYS2 if you want to compile the latest code (lp:inkscape)!
Is "lp:inkscape" the name on github too?
The Msys2 page says here:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_with_M...
nothing about devlibs. Presumably it doesn't need them anymore and msys2installdeps.sh takes care of it? Never having used Msys2 it isn't entirely clear what the "gtk3" install (for instance) is. If there is no devlib for gtk3, what is this? More like a cygwin library?
The 64 bit build page says here:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_64-bit
in several places to use "mingw32-make". No explanation why 32 and not 64. Somehow related to "win32 threading model and SEH exception handling"?
Finally the visual studio page says here:
http://wiki.inkscape.org/wiki/index.php/Using_Visual_Studio
"Follow all steps of guide Compiling Inkscape on Windows." At that point one has a fully compiled and working Inkscape. Why bother with Visual Studio? For the IDE? Is there a discussion in the wiki somewhere about other IDEs, like CODE::BLOCKS or Eclipse?
Do any of these give instructions for packing up the built Inkscape so that it can be given to somebody else, like in a zip file? As I recall there are a bunch of dll's that need to be copied into the Inkscape folder from other locations (devlibs/bin, mostly). That was for an Inkscape built with mingw and msys and devlibs. What about Msys2 and whatever it is using for libraries? Can you just copy over whatever it has for devlib equivalents or are there Msys2 core libraries which must come too (like when distributing a cygwin binary)?
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
Hi David,
the reason the Wiki had info on devlibs builds as well as MSYS2 is owed to the fact that I added all the information required for the latter but did not want to remove the information on the former prematurely as some people were still using it and I wanted some tangible test coverage on MSYS2 builds first.
However as master (formerly known as trunk) can not be built with devlibs anymore and the MSYS2-built release of Inkscape 0.92.2 was a success I took your message as a reason to pull the plug on devlibs which should be considered deprecated as of now (they still work for the 0.92.x branch but they're unmaintained and don't offer any advantages compared to MSYS2 so if anybody still wants to use them use at your own risk).
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows is redirected accordingly now and should be considered the "official" guideline.
Old instructions are still available for reference (I moved the old page to http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_32-bit).
As for Visual Studio: This page was outdated even for devlibs builds and should be disregarded (I marked it accordingly). There's no need to use an IDE for building Inkscape and from my own experience it causes more issues than the added convenience is typically worth.
*Regarding MSYS2 builds:*
MSYS2 is in fact based on the Cygwin emulation layer and (like its predecessor MSYS) provides a Linux-like development environment for use on Windows, including a full-fledged bash (which is what you'll be using to build Inkscape in).
However the actual compiler toolchain used is mingw-w64 (the name is misleading: It's the successor of MinGW and it can actually produce both 32-bit and 64-bit binaries). This means what we colloquially call an "MSYS2 build of Inkscape" is actually a mingw-w64 build of Inkscape and therefore a native Windows application that does *not* need the Cygwin emulation layer (so while we use a Cygwin-based build environment for convenience we actually build a native win32 application).
The added advantage of MSYS2 is that (besides the build environment and compiler toolchain) it also provides a large package database (very similar to common Linux distros) which includes *all* dependencies of Inkscape, therefore completely removing the need for any custom-built devlibs. As you noted running msys2installdeps.sh will download all required libraries automatically so nobody should ever have do manually fiddle with paths again (they will simply be derived from the environment of the shell).
If you have any additional questions not covered in the (now authoritative ;-) ) Wiki article let me know. In principle everything should be covered, but it's always possible I took something for granted when writing the article that is not that obvious after all, so there might be room for improvement.
Best Regards, Eduard
Am 25.10.2017 um 19:42 schrieb mathog:
Hi all,
Today while perusing the varied Windows build instructions I was struck by some contradictory, or at least, not fully fleshed out text.
For instance, it says here:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows
Warning: As our 32-bit development libraries (devlibs) currently do not offer GTK+ 3 (which is required by trunk) you have to follow the instructions for 64-bit builds or use MSYS2 if you want to compile the latest code (lp:inkscape)!
Is "lp:inkscape" the name on github too?
The Msys2 page says here:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_with_M...
nothing about devlibs. Presumably it doesn't need them anymore and msys2installdeps.sh takes care of it? Never having used Msys2 it isn't entirely clear what the "gtk3" install (for instance) is. If there is no devlib for gtk3, what is this? More like a cygwin library?
The 64 bit build page says here:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_64-bit
in several places to use "mingw32-make". No explanation why 32 and not 64. Somehow related to "win32 threading model and SEH exception handling"?
Finally the visual studio page says here:
http://wiki.inkscape.org/wiki/index.php/Using_Visual_Studio
"Follow all steps of guide Compiling Inkscape on Windows." At that point one has a fully compiled and working Inkscape. Why bother with Visual Studio? For the IDE? Is there a discussion in the wiki somewhere about other IDEs, like CODE::BLOCKS or Eclipse?
Do any of these give instructions for packing up the built Inkscape so that it can be given to somebody else, like in a zip file? As I recall there are a bunch of dll's that need to be copied into the Inkscape folder from other locations (devlibs/bin, mostly). That was for an Inkscape built with mingw and msys and devlibs. What about Msys2 and whatever it is using for libraries? Can you just copy over whatever it has for devlib equivalents or are there Msys2 core libraries which must come too (like when distributing a cygwin binary)?
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On 25-Oct-2017 13:28, Eduard Braun wrote:
However as master (formerly known as trunk) can not be built with devlibs anymore and the MSYS2-built release of Inkscape 0.92.2 was a success I took your message as a reason to pull the plug on devlibs which should be considered deprecated as of now (they still work for the 0.92.x branch but they're unmaintained and don't offer any advantages compared to MSYS2 so if anybody still wants to use them use at your own risk).
Seems like a good idea. Leaving it up is just leaving a tar pit for an unwary new developer to fall into.
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows is redirected accordingly now and should be considered the "official" guideline.
That page looks good to me. The packaging info at the bottom is good. With the old method the "extra" stuff was just the dlls and the MSVC c library. What else comes along for the ride with MSYS2?
There's no need to use an IDE for building Inkscape and from my own experience it causes more issues than the added convenience is typically worth.
That has always been my view too.
However the actual compiler toolchain used is mingw-w64 (the name is misleading: It's the successor of MinGW and it can actually produce both 32-bit and 64-bit binaries).
Yes, the name sucks. It should have been mingw2. (Best to avoid names like mingw-ng as the next major version after that has no obvious name.)
Thanks for cleaning up those pages and answering my questions.
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
Am 25.10.2017 um 23:14 schrieb mathog:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows is redirected accordingly now and should be considered the "official" guideline.
That page looks good to me. The packaging info at the bottom is good. With the old method the "extra" stuff was just the dlls and the MSVC c library. What else comes along for the ride with MSYS2?
I'm not sure wether I misunderstood your question but to avoid any confusion: The "build/inkscape" directory already contains all dependencies required to run Inkscape on any Windows machine (or for git master at least any Windows machine running Windows Vista or later as GTK+3 dropped XP support).
The packaging step only wraps that directory into an installer or creates a 7-Zip archive from the contents, but you could just as well copy that directory as is or use an archiver of your own choice.
As for what ends up in the distribution folder it's basically identical to devlibs64 builds (which also used mingw-w64), i.e.
* the mingw-w64 DLLs * the DLLs of all required libraries (plus any additional files required by those libraries) * Python * Only part that is really new in master due to GTK+3 is the Adwaita icon theme (GTK+3 does not have a built-in icon theme as GTK+2 had)
The MSVC runtime itself is *not* bundled as a compatible version should be available on all Windows machines (if that should ever *not* be the case make sure to file a bug).
Regards, Eduard
Hi Eduard, I take the opportunity to ask you about the 32 bit build of 0.92.x with MSYS2. Last time I tried (yesterday) the building was ok but when running the resulting inkscape.exe under Windows XP SP3 I get this error:
Cannot find procedure entry point wcscpy_s in msvcrt.dll.
(I get this message in Italian so I translated it like it should sound in English; I'm not sure its form is correct but the two names are). The building has been done under Windows 7 Professional 64 bit using the 32 bit MSYS2 console.
Any idea on what's wrong? Thanks.
Luca
-- Sent from: http://inkscape.13.x6.nabble.com/Inkscape-Dev-f2781808.html
Am 26.10.2017 um 12:32 schrieb LucaDC:
Hi Eduard, I take the opportunity to ask you about the 32 bit build of 0.92.x with MSYS2. Last time I tried (yesterday) the building was ok but when running the resulting inkscape.exe under Windows XP SP3 I get this error:
Cannot find procedure entry point wcscpy_s in msvcrt.dll.
(I get this message in Italian so I translated it like it should sound in English; I'm not sure its form is correct but the two names are). The building has been done under Windows 7 Professional 64 bit using the 32 bit MSYS2 console.
Any idea on what's wrong? Thanks.
Luca
Ah crap... that means that one of the libraries used by Inkscape added code again that does not run on Windows XP. Unfortunately more and more libraries are dropping support for XP these days and it will get harder and harder to support it, even for 0.92.x. Luckily the current stance in the MSYS2 project is to continue to support XP where possible, but someone needs to notice the breakage, and determine which package update caused it (or better yet provide a patch if possible) as MSYS2 is completely community driven. Personally I usually do not notice as I only test in an XP virtual machine sporadically (typically after somebody reported errors or before releases)
Do you build for XP regularly? Any idea when it broke?
It might be a good idea to set up some kind of CI for XP... then again XP really *is* EOL and any time spent dealing with it is basically time wasted to account for people with outdated setups. (I have an XP machine running myself but I'm honest enough to admit it's only lack of time/convenience/laziness I did not install a current OS yet - on all objective measures it's stupid to still use it)
Regards Eduard
I almost regularly build for Windows XP but I don't always synchronize the new builds with the working system I use unless I see that some bug I care about has been fixed. The version I'm using is Inkscape 0.92.2pre0 (f9bf460709, 2017-07-30) but it was not built with MSYS2: I had always built the 0.92.x with devlibs till yesterday, both 64 and 32 versions so I can't say when it got broken.
I tried the MSYS2 build for it because with devlibs I get this error:
C:\Inkscape\0.92.x\src\io\sys.cpp: In function 'int Inkscape::IO::mkdir_utf8name(const char*)': C:\Inkscape\0.92.x\src\io\sys.cpp:103:46: error: 'S_IRGRP' was not declared in this scope C:\Inkscape\0.92.x\src\io\sys.cpp:103:56: error: 'S_IXGRP' was not declared in this scope mingw32-make[2]: *** [src/CMakeFiles/inkscape_base.dir/io/sys.cpp.obj] Error 1 mingw32-make[1]: *** [src/CMakeFiles/inkscape_base.dir/all] Error 2 mingw32-make: *** [all] Error 2
And knowing that devlibs are not supported and updated anymore, I thought that it was time to change.
-- Sent from: http://inkscape.13.x6.nabble.com/Inkscape-Dev-f2781808.html
just confirming this error, just reported as https://bugs.launchpad.net/inkscape/+bug/1727729
-- Sent from: http://inkscape.13.x6.nabble.com/Inkscape-Dev-f2781808.html
On 26-Oct-2017 04:55, Eduard Braun wrote:
(I have an XP machine running myself but I'm honest enough to admit it's only lack of time/convenience/laziness I did not install a current OS yet - on all objective measures it's stupid to still use it)
Agreed except for one thing - XP is noticeably faster on the same hardware that than W7. I have two identical machines: dual core Athlon X2 with 2Gb memory, 1Tb disk, same graphics card. They have the same background programs installed (Symantec endpoint protection and Sassafras K2 Client [license controller]) and for some reason or other programs just start quicker and run faster on XP. Yes, I have already worked through several "make W7 faster" guides. There are not background jobs on the W7 box sucking up CPU time, it just drags for some reason. Both Windows variants are less responsive than Xubuntu, but that's really apples to oranges and not a fair comparison.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
Shame on me, I actually messed up the XP compatibility myself. I accidentally removed a patch that replaced wcscpy_s with something available on XP in my last pull request.
New pull request to revert that part: https://github.com/Alexpux/MINGW-packages/pull/2912
For the time being you can download the previous gtk2 built from http://repo.msys2.org/mingw/i686/mingw-w64-i686-gtk2-2.24.31-4-any.pkg.tar.x... (install with "pacman -U mingw-w64-i686-gtk2-2.24.31-4-any.pkg.tar.xz) on an MSYS2 shell)
Once my PR is merged and the repo is updated you can update "as usual" (I probably should add info on how to update to the Wiki ;-) ).
Regards; Eduard
Am 26.10.2017 um 13:55 schrieb Eduard Braun:
Am 26.10.2017 um 12:32 schrieb LucaDC:
Hi Eduard, I take the opportunity to ask you about the 32 bit build of 0.92.x with MSYS2. Last time I tried (yesterday) the building was ok but when running the resulting inkscape.exe under Windows XP SP3 I get this error:
Cannot find procedure entry point wcscpy_s in msvcrt.dll.
(I get this message in Italian so I translated it like it should sound in English; I'm not sure its form is correct but the two names are). The building has been done under Windows 7 Professional 64 bit using the 32 bit MSYS2 console.
Any idea on what's wrong? Thanks.
Luca
Ah crap... that means that one of the libraries used by Inkscape added code again that does not run on Windows XP. Unfortunately more and more libraries are dropping support for XP these days and it will get harder and harder to support it, even for 0.92.x. Luckily the current stance in the MSYS2 project is to continue to support XP where possible, but someone needs to notice the breakage, and determine which package update caused it (or better yet provide a patch if possible) as MSYS2 is completely community driven. Personally I usually do not notice as I only test in an XP virtual machine sporadically (typically after somebody reported errors or before releases)
Do you build for XP regularly? Any idea when it broke?
It might be a good idea to set up some kind of CI for XP... then again XP really *is* EOL and any time spent dealing with it is basically time wasted to account for people with outdated setups. (I have an XP machine running myself but I'm honest enough to admit it's only lack of time/convenience/laziness I did not install a current OS yet - on all objective measures it's stupid to still use it)
Regards Eduard
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (4)
-
alvinpenner
-
Eduard Braun
-
LucaDC
-
mathog