Windows Build

Geert Janssens geert.gnucash at kobaltwit.be
Sun Mar 4 15:40:22 EST 2018


Op zondag 4 maart 2018 20:57:54 CET schreef Geert Janssens:
> Op zondag 4 maart 2018 17:40:08 CET schreef Geert Janssens:
> > Op zondag 4 maart 2018 16:19:46 CET schreef Robert Fewell:
> > > Hi all,
> > > 
> > > Just tried to build the latest unstable for Windows but it fails with
> > > this
> > > ...
> > > 
> > > [ 76%] Generating gnucash.appdata.xml
> > > C:/gcdev64/msys2/mingw32/bin/msgfmt.exe: cannot locate ITS rules for
> > > C:/gcdev64/gnucash/unstable/src/gnucash-git/gnucash/gnome/
> > > gnucash.appdata.xml.in
> > > make[2]: ***
> > > [gnucash/gnome/CMakeFiles/gnucash-appdata.dir/build.make:61:
> > > gnucash/gnome/gnucash.appdata.xml] Error 1
> > > make[1]: *** [CMakeFiles/Makefile2:7919:
> > > gnucash/gnome/CMakeFiles/gnucash-appdata.dir/all] Error 2
> > > make: *** [Makefile:163: all] Error 2
> > > *** Error during phase build of gnucash-git: ########## Error running
> > > make
> > > -j 1  *** [15/17]
> > > 
> > > Poked around but could not get it to work so thought I would see what
> > > the
> > > build server logs yield but that has not worked since 25/02/2018 so no
> > > help
> > > there.
> > 
> > This probably means msgfmt is not finding gettext's its rules. On linux
> > they are in /usr/share/gettext/its and/or /usr/share/gettext-0.19.8/its.
> > 
> > I had to search a bit on the windows build server. Apparently there they
> > are stored under /mingw32/share/gettext/its which for some reason is not
> > where msgfmt is expecting them. We can fix this by setting environment
> > variable GETTEXTDATADIR to /mingw32/share/gettext somewhere that it's in
> > the environment when gnucash is being built. I don't know offhand how to
> > do that exactly in jhbuild.
> > 
> > > So I downloaded that build but it fails with a missing
> > > libboost_date_time-mt.dll so if the above is fixed it still might not
> > > work.
> > 
> > Interesting. The build server's build failure is a gettext issue as well.
> > It fails to compare GETTEXT_VERSION_STRING to 0.19. Or more precisely it
> > seems like GETTEXT_VERSION_STRING is not being set.

I'm surprised you even got past the gnucash configuration step in your build. 
I have just gotten there and it appears there's a bug in cmake's FindGettext 
module. It parses the output of msgfmt --version command to extract the 
gettext version.
However the regex it uses to parse this is not correct on Windows/MSys2.
The output on linux is:
msgfmt (GNU gettext-tools) 0.19.8.1
while on Windows it becomes:
msgfmt.exe (GNU gettext-tools) 0.19.8.1

The regex doesn't take the optional/additional '.exe' into account and as a 
result will fail to set GETTEXT_VERSION_STRING

I have manually added .exe in msys2\mingw32\share\cmake-3.9\Modules
\FindGettext.cmake
Just to try and continue the build. That works but now it fails on compiling 
gettext.scm. Unfortunately I'm out of time for now.

So next steps would be:
1. figuring out who to contact to report the bug in FindGettext
2. make a temporary workaround for it while we wait for an official fix
3. figure out why gettext.scm fails to build.

Geert




More information about the gnucash-devel mailing list