Difference between revisions of "Windows"

From GnuCash
Jump to: navigation, search
(gnome: needs extra libglade)
(Problems, issues, comments: Windows 11 fails to launch installer.)
 
(590 intermediate revisions by 67 users not shown)
Line 1: Line 1:
== [[GnuCash]] on Microsoft Windows ==
+
= [[GnuCash]] on Microsoft Windows =
  
This page collects various notes about potentially compiling [[GnuCash]] on Microsoft Windows.
+
This page collects various notes about running [[GnuCash]] on Microsoft Windows.
  
FAQ: Is it possible to compile GnuCash on Windows? A: Well, compiling is possible, but it doesn't run so far.
+
=== Q: Which Windows versions are supported? ===
 +
;Answer: The [{{URL:www}}/download.phtml download page] shows, which Windows version is officially supported by which GnuCash version.
 +
:;Note: ''Windows 3/95/98/Me'' and ''Windows NT3.5/4.0'' have never been supported.
  
With the 2.x series now being released, gnucash is fully based on gtk2. This means it will probably be rather easy to finish a full windows port. "The other big application" Gnumeric already showed how to do it. Their UI code relies solely on gtk-2.x, i.e. they replaced every dependency on libgnomeui by its gtk equivalent. And gtk-2.x is fully available on windows. Obviously they managed to do this somehow, so I suspect it shouldn't be too difficult to do the same with gnucash. Also, one of our smaller competitors, Grisbi http://sourceforge.net/projects/grisbi , is offering a windows port by this very same strategy.
+
=== Q: Where is the binary installer? ===
 +
'''A:''' The latest versions can be downloaded from the [{{{{URL:www}}}}/download.phtml download] page on the GnuCash website. Anyone who cares about their data should use the '''released version''' found there.
 +
:People looking to test new features - at the risk of running into extra bugs - could try a '''test version''':
 +
:* As it is not so easy to build GnuCash under Windows, a daily build of the [{{URL:Build:Win}} stable branch] is made available as well to '''test''' bugfixes.
 +
:* To closely follow development on the ''future branch'', which contains new features - and bugs - there are the [[#Q:_Are_there_nightly_builds.3F|nightly builds]]. Expect data loss if you try these though!
  
Some old gnucash-devel discussion:
+
=== Q: Is it possible to compile GnuCash on Windows? ===
* https://lists.gnucash.org/pipermail/gnucash-devel/2006-March/016916.html
+
'''A:''' Yes. It's cumbersome, but possible. See the instructions in [[Building_on_Windows| Building on Windows]].
  
Status: It is possible to compile, but it doesn't run so far. --[[User:Cstim|Cstim]] 07:55, 3 March 2006 (EST)
+
=== Q: Are there nightly builds? ===
 +
'''A:''' We run nightly builds for the '''stable''' (former <q>maint</q>) and after implmenting its first feature the '''future''' (former <q>master</q>) branch, but it's configured so that it runs only if changes have been pushed since the last build and only if the build is successful; they do fail from time to time. You can find the last 6-12 month's worth of builds at
 +
{{BuildURL}}/builds/win32/
 +
or, more specifically, for [{{URL:Build:Win}}?C=M;O=D stable], on demand for [{{URL:Build:Win|future}}?C=M;O=D future], and [{{URL:Build:Win|build-logs}}?C=M;O=D logs for all builds].
  
== Prerequisites when using MinGW32 ==
+
The product of the nightly builds is a Windows installer that will ''replace your existing GnuCash installation''. The future branch ''really is unstable'': Be sure to have suitable backups and don't use it for your "production" books.
  
=== Mingw32 ===
+
=== Q: Anything else? ===
See http://www.mingw.org . All available as pre-compiled binaries.
+
To avoid making the installer file even bigger, some functionality is not available without further downloads and installations of software.
  
Many other pre-compiled binaries are also available from http://gnuwin32.sf.net/ . (All gtk-related packages like pkgconfig and libxml2, however, are already included in the large glade package, see below.)
+
==== Preferences in GnuCash 2.6 and more recent ====
 +
gconf has been replaced with another preferences system. On Windows you
 +
will find the preferences directly in the Windows Registry under the
 +
registry key
 +
  HKEY_CURRENT_USER/software/GSettings/org/gnucash/
  
=== SVN ===
+
==== Pdf name for invoices ====
There are multiple [[Subversion|SVN]] clients for windows.  The command-line program is in the http://subversion.tigris.org package. A GUI client that installs as a plugin to the Windows Explorer is on http://tortoisesvn.tigris.org but it is rather slow and clumsy.
 
  
=== guile ===
+
This name is controlled by two hidden preferences:
In guile-1.6.7 several tweaks were necessary to get it to compile. (We strongly discourage using guile-1.6.0 that is shipped with mingw - you should probably better remove it manually to make sure this very old version doesn't interfere with a more up to date version.)
+
* pdf-export/filename-format
* File libguile/fports.c line 479: replace "#elif defined(FIONREAD)" by "#elif 0"
+
* pdf-export/filename-date-format
* File libguile-ltdl/raw-ltdl.c lines 220, 222, 224: remove the LT_GLOBAL_DATA macro on each line. You might need to touch libguile-ltdl/upstream/ltdl.c.diff afterwards
 
* Files srfi/Makefile, libguile-ltdl/Makefile, libguile/Makefile: Add "-no-undefined" argument to libxyz_LDFLAGS variables, see also [http://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15972]
 
* Remove every occurence of fileblocks.* in config.status and run config.status.
 
* Remove the line containing SIGBUS in ice-9/boot-9.scm
 
* Set the env variable GUILE_LOAD_PATH to the actual load path, which is different from the one that was stored during compile due to mingw's path translation. Make e.g. <tt>export GUILE_LOAD_PATH='\msys\1.0\local\share\guile\1.6'</tt>
 
* For some srfi's, shared libraries are installed in $prefix/bin, e. g. libguile-srfi-srfi-13-14-v-1-1.dll. You need to copy these DLLs at the same location to a filename that does not have the ''last trailing "-1"'', which in this case is libguile-srfi-srfi-13-14-v-1.dll. On Linux, this would have been done by symlinks. On windows, it depends on the tools in use whether you can create symlinks (see below for more about symlinks). If you cannot use symlinks, you have to copy this manually.
 
  
One possible set of configure arguments looked like this:
+
Both of them will reside in the registry under
 +
HKEY_CURRENT_USER/software/GSettings/org/gnucash/dialogs/general/report
  
./configure --disable-elisp --disable-networking --disable-dependency-tracking --disable-libtool-lock --disable-linuxthreads -C --prefix=/usr/local LDFLAGS="-L/lib -L/mingw/lib -L/C/WINNT/system32 -lwsock32 -lregex"
+
These won't be there by default (only values that deviate from the default
 +
value will be effectively in the registry). To change it you will first
 +
have to create a sub key named '''pdf-export''.
  
For testing, try to make sure "guile -v" will run and give you the version number. Then try a simple expression, like "guile  -c '(display %load-path)'". With the change in ice-9/boot-9.scm, the guile command line interface should also work.
+
Under this key you can create two string type keys named '''filename-format'''
 +
and '''filename-date-format'''.
  
With the above DLL copying of srfi-13-14, code generation in g-wrap will actually work. It will will always show the error message "command 'indent' not found", though, but this can simply be ignored.
+
This is the definition of these two string keys:
 +
;filename-format
 +
:This setting chooses the file name for PDF export. This is a sprintf(3) string with three arguments: "%1$s" is the report name such as "Invoice". "%2$s" is the number of the report, which for an invoice report is the invoice number. "%3$s" is the date of the report, formatted according to the filename-date-format setting. (Note: Any characters that are not allowed in filenames, such as '/', will be replaced with underscores '_' in the resulting file name.)<br/>The default value is %1$s-%2$s-%3$s
  
=== g-wrap ===
+
;filename-date-format
See http://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15972 and the LDFLAGS=-no-undefined has to be added also to guile/g-wrap/gw/Makefile.
+
:This setting chooses the way dates are used in the filename of PDF export. Possible values for this setting are "locale" to use the system locale setting, "ce" for Continental Europe style dates, "iso" for ISO 8601 standard dates , "uk" for United Kingdom style dates, and "us" for United States style dates.
  
Note: You need to have glib (2.x) installed first before you compile g-wrap so that g-wrap will generate and install wrappers for glib2 as well. The resulting wrapper shared libraries are named *gw-glib*.
+
==== Finance::Quote ====
 +
For the retrieval of [[Online Quotes]], you will need to install [{{URL:wp}}Perl Perl] and Finance::Quote (F::Q). See [[Online_Quotes#Installing_Perl_on_Windows|Installing Perl on Windows]].
  
Status: Compile is possible.
+
= Notes =
 +
== Error messages, Trace file ==
 +
In the GnuCash application, all error messages are redirected to a ''trace file''. There will be one trace file for each time GnuCash is run. For a user named "myname" these files are located in the folder
 +
* <tt>c:\Documents and Settings\myname\Local Settings\Temp</tt> (Windows XP) or
 +
* <tt>C:\Users\myname\AppData\Local\Temp</tt> (Windows Vista/7).
 +
They are named
 +
* <tt>gnucash.trace.ABCDEF</tt> (GnuCash 2.2.9 and older) or
 +
* <tt>gnucash.trace.ABCDEF.log</tt> (GnuCash 2.4.0 and newer)
 +
where the ABCDEF part is changed randomly on each start of gnucash. See also [[Tracefile]].
  
After installation, you should change the file guile/site/g-wrap/guile.scm (g-wrap 1.9.6; in older g-wrap this is in the file site/g-wrap.scm) and add the trailing "-0" to the place where a DLL should be loaded. Search for the string "dynamic-link" in that file and change the existing line
+
If you experience crashes or unexpected behavior, check the latest of these files (or the one created when the problem started) and add all interesting-looking lines of that file to your error reports, at least the lines with the keywords <tt>WARN</tt>ing and <tt>CRIT</tt>ical warning.
" (dynamic-link \"lib" wrapset-name "\"))))\n"))))))
 
into
 
" (dynamic-link \"lib" wrapset-name "-0\"))))\n"))))))
 
  
Frequent error: If you get the following linker error:
+
See also [[Windows Debugging]].
C:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.4/libgcc.a(w32-shared-ptr.o)::
 
undefined reference to `_imp__GetAtomNameA@12'
 
undefined reference to `_imp__FindAtomA@4'
 
undefined reference to `_imp__AddAtomA@4'
 
undefined reference to `_imp__FindAtomA@4'
 
then it means that your windows DLL directory showed up first before your mingw DLL directory, i. e. the gcc linker command has -Lc:\WINNT\system32 before -L/mingw/lib. This wrong order might be caused from other, linked-in libraries, like from the libguile.la file in guile's library installation. To fix this: Edit the libguile.la file, remove -Lc:\WINNT\system32 so that you can correctly enfore that /mingw/lib comes first in the library search path.
 
  
Later, if you encounter the error ''ERROR: file: "libgw-guile-standard", message: "can't open the module"'' then you need to do one of the following:
+
== Determining the locale ==
* After some more thinking, we propose you should change the scheme command that looks for this DLL to look to the DLL with the trailing -0 instead. So you need to change the file $prefix/share/guile/site/g-wrap/guile/standard.scm line 8 to read
+
When asked for the locale, take a look at the Regional Settings in your Control Panel and report the values found for "Standard and Formats", "Location" and "Language for non-Unicode programs".
    (dynamic-link "libgw-guile-standard-0"))
 
  
=== glade ===
+
Also, use [{{BugURL}}/show_bug.cgi?id=450353 this  bug's] [{{BugURL}}/attachment.cgi?id=90557 attachment] to determine the locale as used internally by gettext.
http://gladewin32.sourceforge.net
 
This project offers a large (10MB) Installer which also includes all the rest of the gtk/glib platform, including pkgconfig, libxml2 and various other tools.
 
  
Note: After installation, the pkgconfig files have to be adapted to your installation path. See below in the gnome section for instructions.
+
= Problems, issues, comments =
 +
For any problem that occurs now, you should add a new section below.
  
=== glib ===
+
== Issues with older versions of GnuCash ==
http://www.gtk.org/download/ has binary windows packages, but the binary is already included in the glade installer above, so no separate download is necessary.
 
  
=== gnome ===
+
In an effort to keep the information somewhat manageable this page will only gather issues with the current stable version of GnuCash. For historical reference, the older issues will be moved to [[Windows/Old Issues|a separate page]].
A lot of windows binaries for gnome packages missing in the glade package can be found at ftp://ftp.gnome.org.
 
  
GConf, Orbit2, gail, gnome-{common, mime-data, vfs}, intltool, libIDL, libart_lgpl, libbonobo{,ui}, libgnome{,canvas,ui} and pango can be found at:
+
If you experience issues with an older version of GnuCash, the first advice is normally to try again with the current stable version. There may however be situations where you need to revive an older version and in that case the information kept on the [[Windows/Old Issues|older issues page]] may be useful.
  
* Pick the latest available version under ftp://ftp.gnome.org/pub/gnome/platform which has a win32 subdirectory (the uneven numbers don't have that).
+
In addition, if you experience any of the older issues in the current stable release of GnuCash, please [[Bugzilla|file a bug report]] or ask about it on the [[Mailing Lists|user mailing list]].
  
Libgnomeprint, libgnomeprintui and libgtkhtml can be found at:
+
== Known issues ==
 +
Here is a list of the most often mentioned Windows issues. If you experience this problem, please check the respective bugzilla reports for potential workarounds.
 +
* {{BugURL}}/show_bug.cgi?id=466512 Win32: Wrong permissions for .gnucash directory (was: Win32 GnuCash 2.2.1 Fails to Start/Install)
 +
* {{BugURL}}/show_bug.cgi?id=645273#c40 Reports features do not work
  
* Pick the latest available version under ftp://ftp.gnome.org/pub/gnome/desktop which has a win32 subdirectory, preferrably the same version as the gnome/platform.
+
== Windows 7 64-bit - GnuCash fails to run ==
  
Or alternatively use this link ftp://ftp.gnome.org/pub/gnome/binaries/win32/ directly.
+
This is with GnuCash 2.4.3:
  
libgsf can be found here: http://www.gimp.org/~tml/gimp/win32/downloads.html (however it is unclear whether a combination of these different binary sources is very useful).
+
Starting GnuCash shows the splash screen and the tip of the day for a brief instant and then it disappears. To fix the problem, I did:
  
libglade-2.6.0 needs to be installed as well because the libglade of the glade installer (above) doesn't accept to load the "gnome" widgets which are installed by libgnomeui into $prefix/lib/libglade/2.0. Get libglade from here ftp://ftp.gnome.org/pub/gnome/binaries/win32/
+
# Right-click on the GnuCash icon and select 'Run as Administrator'
 +
# GnuCash starts up as expected
 +
# Close GnuCash
  
====GConf====
+
After doing the above once, I can start GnuCash normally and it starts up properly.
After installation of gconf, check whether you can run the "gconftool-2.exe" program. If it doesn't show its usage message but instead fails with an error like "cannot find symbol freeaddrinfo in WS2_32.DLL", then your DLL of ORBit cannot be used on your system. In my case this error went away after upgrading ORBit to 2.13.3.
 
  
====Paths in pkgconfig files====
+
Hopefully this helps someone. --[[User:Sketch|Sketch]] 05:05, 7 March 2011 (UTC)
Previously we've proposed to hand-edit all pkgconfig files in your $prefix/lib/pkgconfig directory to fix their <tt>prefix=</tt> line, because it contains the path at build time instead of your installed path at installation time. However, it turns out <tt>pkg-config</tt> already overrides this prefix-variable automatically, see the section Windows Specialities in its man page. So you don't need to do <tt>perl -pi.bak -e's!^prefix=.*$!prefix=C:/GTK2-8-18!' *.pc</tt> anymore.
 
  
Previously in some gnome versions, two additional files had paths from build-time, namely pangocairo.pc and pangoft2.pc, where the line with <tt>Cflags:</tt> has an include directive pointing to a build-time directory. Replace the <tt>/home/ivan/cross/build/include</tt> by <tt>${includedir}</tt> and everything should be fine. Currently these errors seem to have been fixed.
+
== Font problems ==
  
Finally, in <tt>pangoft2.pc</tt> the <tt>CFlags</tt> line is missing one <tt>-I${includedir}/freetype2</tt>; simply add this here, or otherwise you will run into "include file not found" errors when building goffice and/or any of gnucash's gnome directories.
+
After upgrading to 2.2.1, people have reported font-related issues:
  
===goffice===
+
* The tick/check mark in the Reconcile window may look like a "nondescript squiggle"
Gnucash comes with a copy of goffice-0.0.4 which is used if no newer version of goffice is found during configure.  
+
* Register windows may open with all transactions scrolled out of sight (upwards)
 +
* Languages other than English show characters as a box of four zeros "0 0 0 0".
  
It might be worth a try to compile goffice from source in a newer version, available here:
+
The reason appears to be that GnuCash is now referring to Windows to determine what fonts to use,
ftp://ftp.gnome.org/pub/gnome/sources/goffice/0.3
+
and in both these cases is using the one specified for "Message Box", which defaults to Tahoma 8.
If you try to compile this, make sure you installed <tt>libgsf</tt> beforehand (see above). The source code of goffice-0.3.0 compiles (almost) unchanged on mingw32 except for one patch, see http://mail.gnome.org/archives/gnumeric-list/2006-August/msg00030.html but we expect this to be fixed quite soon in the official goffice distribution.
 
  
Avoiding the separate compilation of goffice in gnucash will save quite a lot of time at each recompilation of gnucash.
+
Changing to Tahoma 10 fixed both of these for me.
  
== Prerequisites when using Cygwin ==
+
The procedure on WinXP is:
 +
# Start -> Control panel or My Computer -> Control panel
 +
# Appearance and Themes -> Display (or, if using the "Classic View", Display)
 +
# Appearance
 +
# Advanced
 +
# Select "Message Box" from the drop-down
 +
# Change as required (e.g. set to Tacoma 10 point)
 +
# OK
 +
# Apply
  
=== Cygwin ===
+
[[User:Fred|Fred]] 10:30, 22 August 2007 (EDT)
Install the latest cygwin setup.exe from http://cygwin.com/. Let it install its minimum package selection. Then, start the cygwin setup.exe again and select the following development packages to be installed (and of course its corresponding runtime packages, in case they don't get selected automatically):
+
:Is this still necessary when using GnuCash 2.2.2? [[User:Andi5|andi5]]
  
GConf2-devel
+
I ([[User:piyo|piyo]]) confirmed that the above procedure is necessary for viewing Japanese on Windows XP with GnuCash 2.2.3 (2008-01-08):
ORBit2-devel
+
* Confirmed that working fonts are '''Arial UI Unicode''', '''FixSys''', '''System''', '''Tahoma''' (including 8!), '''Terminal'''. Also for Japanese, '''MS P Gothic''', '''MS P Mincho''', '''MS UI Gothic''', '''MS Gothic''', '''MS Mincho fonts''' are working.
atk-devel
+
* Confirmed that non-working fonts are '''Lucida Sans Unicode''' and '''Microsoft Sans Serif'''.
autoconf
+
--[[User:Piyo|Piyo]] 23:23, 5 February 2008 (EST)
automake
 
gettext-devel
 
glib2-devel
 
gnome-vfs2-devel
 
gtk2-x11-devel
 
guile-devel
 
intltool
 
libbonobo2-devel
 
libfontconfig-devel
 
libfreetype2-devel
 
libgdbm-devel
 
libgnome2-devel
 
libgnomecanvas2-devel
 
libgnomeui2-devel
 
libncurses-devel
 
libxml2-devel
 
pango-devel
 
pkgconfig
 
  
However, cygwin stopped building somewhere in src/engine due to unresolved lt_dlopen() symbols, regardless of which CFLAGS I used above in ./configure. That, and the additional slowing down of the build, turned me away from cygwin so I didn't continue building there. If you want to run a complete build under cygwin, good luck, but so far I haven't completed it. --[[User:Cstim|Cstim]] 04:39, 16 August 2006 (EDT)
+
== Program hangs constantly ==
  
=== gtkhtml-3.x ===
+
(GnuCash 2.4)
All necessary Gnome packages are available as standard cygwin packages through the cygwin installer. The only notable exception is gtkhtml-3.x (standard cygwin only has libgtkhtml-2.x). That package can be retrieved as explained here http://cygwinports.dotsrc.org/ by adding the following URL to the server list: ftp://sunsite.dk/projects/cygwinports Then a gtkhtml-3.x version is available to be downloaded.
 
  
=== g-wrap ===
+
According to [{{BugURL}}/show_bug.cgi?id=677829 this bug report] GnuCash can become unstable with some themes. The original reporter didn't remember which themes caused issues, but had no problems when using the "Unity" theme.
See section above. Actually for cygwin no modifications are necessary in the source, in contrast to the mingw32 explanations above.
 
  
== Gnucash ==
+
--[[User:GJanssens|GJanssens]] 18 October 2013
Initial notes about how to tweak ./configure so that it doesn't complain about the missing gnome packages were here [https://lists.gnucash.org/pipermail/gnucash-devel/2006-March/016883.html] and older, but now the current information is written down below.
 
  
=== Build Instructions / hints ===
+
== Gnucash fails to start with Failed to contact configuration server ==
This is for a system where all the GTK and GNOME libs are installed in <tt>c:\GTK-2-8-18\</tt>.
 
  
====./configure when using mingw32====
+
(GnuCash 2.4)
In order to get ./configure to run successfully, the following one change was necessary compared to SVN configure.in. Apply that by hand, then run ./autogen.sh.
 
  
--- configure.in        (Revision 14371)
+
Copied from [{{BugURL}}/show_bug.cgi?id=708989 this bug report]:
+++ configure.in        (Arbeitskopie)
 
@@ -39,7 +39,7 @@
 
  # order, doesn't it? Whatever.)
 
  AC_PROG_CC
 
  AC_GNU_SOURCE
 
-AC_PROG_INTLTOOL
 
+AC_PROG_INTLTOOL([],[no-xml])
 
  AM_GCONF_SOURCE_2
 
  
:(You can skip this patch if you install [http://www.activestate.com/Products/ActivePerl/ ActivePerl] and <tt>export INTLTOOL_PERL=${PathToPerlBin}</tt>. This package includes <tt>XML::Parser</tt>.)
+
I installed GnuCash on Windows 7 and at one point I received the following error message
  
Then run ./configure. The ./configure line used was
+
  Failed to contact configuration server; some possible causes are that you need
  ./configure --disable-error-on-warning --with-zlib=/c/GTK2-8-18 \
+
  to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a
  LDFLAGS="-no-undefined -mms-bitfields -L/lib -L/mingw/lib -L/C/WINNT/system32 -lwsock32 -lregex" \
+
  system crash. See https://projects-old.gnome.org/gconf/ for information.
  CFLAGS="-I/usr/include -I/usr/local/include -D_WIN32 -DLIBLTDL_DLL_IMPORT -mms-bitfields" \
+
  (Details - 1: IOR file
  PKG_CONFIG=/c/GTK2-8-18/bin/pkg-config \
+
  'C:\Users\Username\AppData\Local\Temp\gconfd-Username/lock/ior' not opened
  LD_LIBRARY_PATH=/c/GTK2-8-18/lib PATH="/c/GTK2-8-18/bin:$PATH"
+
  successfully, no gconfd located: No such file or directory 2: IOR file
 +
  'C:\Users\Username\AppData\Local\Temp\gconfd-Username/lock/ior' not opened
 +
  successfully, no gconfd located: No such file or directory)
  
If ./configure fails with error messages about "Cannot find the (g-wrap) guile module" or "Cannot find SLIB", you should check manually whether the error is really wrong. Do this by running <tt>guile -c "(use-modules (g-wrap))"</tt> or <tt>guile -c "(use-modules (ice-9 slib)) (require 'printf)"</tt>. In my case this worked fine, so somehow the environment during ./configure was messed up. I then disabled the check by editing the file ./configure directly, searching for lines containing <tt>use-modules</tt> and prepending that line by the <tt>echo</tt> command. This effectively ignores this test altogether.
+
I do not know what caused this error message.
  
If ./configure fails with error messages about unfulfilled dependencies of some gtk-related package, then the direct gnucash dependencies (e.g. "cairo") are probably fulfilled, but the indirect dependencies of the required package are probably not fulfilled. You can check this by opening the file cairo.pc and look for the lines <tt>Requires</tt>. If you simply want to ignore this test, you have to remove the unfulfilled package name from that line.  
+
Uninstalling GnuCash, removing an empty gnucash folder in C:\Program Files
 +
(x86)\, and reinstalling Gnucash does not restore GnuCash. I.e., same error
 +
message was produced.  
  
Now you need to do some changes in the file config.status. Change the line defining G_WRAP_MODULE_DIR, replace all forward slashes by properly quoted backslashes, e. g.
+
Cleaning up the windows registry did not help either.
  
s,@G_WRAP_MODULE_DIR@,c:\\\\GTK2-8-18\\\\share\\\\guile\\\\site,;t t
+
What did work was to remove the folder
 +
C:\Users\Username\AppData\Local\Temp\gconfd-Username/   
 +
which did not contain the subdirectory + file lock/ior that is mentioned in the
 +
error message.
  
so that guile at runtime will use the windows-style backslash path to find the g-wrap module directory. Otherwise the commands for building the g-wrap wrapsets will fail with "no such module" errors.
+
The folder AppData is hidden (for Windows 7) and needs to be explicitly typed
 +
in the folder browser.
  
Then run ./config.status again.
+
And also note that 'Username' should be replaced with your real username in the path (it's in there two times).
  
:(Note that the g-wrap wrapper generator didn't start up successfully when the current working directory was on the SMB share. The g-wrap wrapper generator only works when I'm on the local disc of the computer.)
+
--[[User:GJanssens|GJanssens]] 18 October 2013
 
+
== Windows 11: GnuCash installer quits without doing anything ==
====./configure when using cygwin====
+
When launching <code>gnucash-setup.exe</code> Windows 10 and Windows 11 usually complain that GnuCash is from an unknown developer and will put up a scary dialog but if you accept the risk it will run the installer after the usual User Authorization Escalation dialog. We've had a [https://bugs.gnucash.org/show_bug.cgi?id=799299 report] that Windows 11 might silently fail to do anything. If that happens to you right-click on <code>gnucash-setup.exe</code> and select Properties from the context menu, then click Unblock and Save. You should be able to launch the installer normally.
The configure line when using cygwin is much simpler than above:
 
./configure --disable-error-on-warning LDFLAGS="-no-undefined -mms-bitfields" \
 
  CFLAGS="-D_WIN32 -DLIBLTDL_DLL_IMPORT"
 
 
 
However, cygwin stopped building somewhere in src/engine due to unresolved lt_dlopen() symbols, regardless of which CFLAGS I used above in ./configure. That, and the additional slowing down of the build, turned me away from cygwin so I didn't continue building there. If you want to run a complete build under cygwin, good luck, but so far I haven't completed it. --[[User:Cstim|Cstim]] 04:38, 16 August 2006 (EDT)
 
 
 
====Symlinks====
 
During the build, various header files are expected to be located in subdirectories, which is simulated during normal Unix building by setting symlinks to the current working directory. On windows, a basic mingw32 environment doesn't have symlinks, so this needs more work.
 
 
 
As far as I currently now, ''you have to do some manual copying''! The current gnucash build system has no way around it, because it assumes you can symlink to the current working directory. As mingw will silently replace "ln -s" by "cp -R", this will fail badly because it recursively tries to copy the current working directory into itself. Eventually it fails with "path name too long". That's why "ln -s" needs to be replaced by "touch", so that no recursive copying of directories is done.
 
 
 
First this will concern some header files for goffice and gsf. You will notice at some point that the build fails with "goffice-config.h: file not found". In that case in the top-level directory, make this: "rm goffice; mkdir goffice; cp goffice-features.h goffice-config.h goffice". Same thing for gsf.
 
 
 
In some cases, some .scm scheme files are expected in a subdirectory gnucash/ or g-wrapped/, and again by default gnucash on mingw would try to recursively copy the current working directory into itself. Instead, if you have replaced LN_S by "touch", you can wait until the build fails with some message about a scheme module not found, "(gnucash engine): module not found" or similar. Then, in the src/engine directory, do this: "rm gnucash; mkdir gnucash; cp engine.scm gnucash". Similar for modules like "(g-wrapped gw-engine)", except these are expected in the subdirectory g-wrapped.
 
 
 
Some older discussion on this topic:
 
 
 
:Someone has used a free utility from the excellent people at SysInternals to create windows "Junctions".  It's command line based, so it should be easy to use from a make file.  Source is available too.  More information is at their site: [http://www.sysinternals.com/Utilities/Junction.html]
 
 
 
:Since Windows 2000, XP, 2003, etc support symbolic links, why not just modify the make file so that on those platforms junctions are used?  Thus any copy of Windows that does not support junctions would continue to be without a port of GnuCash but the vast majority would work.  Any reason this has not been attempted?
 
 
 
::I have not tested it, but you might try to download the "Windows Server 2003 Resource Kit Tools", they contain linkd.exe which should be able to create these junctions.
 
 
 
(Cygwin does support symlinks already in its default configuration. So that's not an issue there.)
 
 
 
====goffice====
 
The internal goffice subdirectory of gnucash doesn't immediately compile. A few changes are necessary:
 
* The headers <urlmon.h> and <htmlhelp.h> as well as the libraries urlmon and htmlhelp are unknown, at least on my windows system. Therefore the header goffice/utils/win32-stub.h needs to be edited to get rid of these headers, and goffice/utils/win32-stub.c as well. I simply removed the includes, and replaced the function calls in the c file by "return 0;".
 
* The HtmlHelp seems to be unavailable but is expected in goffice/gtk/goffice-gtk.c; I replaced in line 746 the "#elif defined(G_OS_WIN32)" by "#elif 0".
 
All changes are included in the diff available at https://lists.gnucash.org/pipermail/gnucash-devel/2006-March/016883.html
 
 
 
=== Checks ===
 
If everything is compiled, you should try to get the tests running, i.e. "make check" to pass.
 
 
 
==== Test environment ====
 
When running "make check", a lot of environment variables are set before the actual test programs are called. These env variables should set the appropriate search paths to the locations in the build directory. However, these paths are in unix-notation with '/' as a directory separator, whereas for the windows programs they need to be in windows-notation with '\' as directory separator. Fortunately, the directory paths are passed through a script inside the gnucash source tree, which offers the necessary path name conversions. Simply edit the file <tt>src/gnc-test-env</tt> and change line 17 so that it reads
 
(define is-windows? #t)
 
 
 
If you didn't change the paths properly into Windows conventions, you will keep getting error messages in src/gnc-module/test/ as follows:
 
** (test-load-c.exe:752): WARNING **: Failed to open module gnucash/foo
 
** (test-load-c.exe:752): WARNING **: : could not locate gnucash/foo interface v.0
 
 
 
==== First g-wrap DLLs ====
 
When the environment is properly set in the Makefiles, you should run "make check" in src/gnc-module/check.
 
 
 
At the first test (test-load-c) I encountered an error dialog box (!) saying "c:\gtk2-8-18\lib\libgw-guile-standard.a is not a valid DLL"; however, after clicking Ok the test nevertheless succeeds(!). So this error can be ignored, but if it bothers you, you should move this libgw-guile-standard.a to a different filename in order to disable it. This workaround applies for all further error messages about "libxy.a", and in each case I'd propose to move it to a different filename, e.g. "libxy.a-disabled".
 
 
 
==== Code for scheme modules ====
 
At the next test (test-load-scm), I encountered the error message
 
ERROR: no code for module (gnucash gnc-module)
 
This one means that ''guile'' looks for a file <tt>gnc-module.scm</tt> but in a subdirectory <tt>gnucash/</tt>. This subdirectory is normally accessible by the symlink <tt>gnucash</tt> in src/gnc-module; however, I had disabled this symlink creation because my mingw32 version doesn't have Windows symlinks/junctions. As a workaround for this particular file, I created the subdirectory <tt>gnucash</tt> manually and copied the file <tt>gnc-module.scm</tt> into that subdirectory.
 
 
 
Same for the next error:
 
ERROR: no code for module (g-wrapped gw-gnc-module)
 
Guessed it? I needed to create the subdirectory <tt>g-wrapped</tt> and copy the file <tt>gw-gnc-module.scm</tt> to that directory.
 
 
 
And that's it! After these changes I was able to run "make check" in gnc-module.
 
 
 
==== xmlparse.dll ====
 
 
 
When running make check in the src/engine directory, I got the error message
 
 
 
Procedure entry point XML_SetDoctypeDeclHandler not found in xmlparse.dll
 
 
 
This is solved by locating a second copy of xmlparse.dll that exists in the c:\WINNT\system32 directory, which conflicts with gtk's original one in C:\GTK2-1-18\bin. Renaming xmlparse.dll and xmltok.dll into something else solved this. Proposed from here [http://www.heise.de/newsticker/foren/go.shtml?read=1&msg_id=5361649&forum_id=54559].
 
 
 
=== Installation ===
 
Yes, it '''is''' possible to run "make install" eventually. I've done it. Really.
 
 
 
==== gconftool ====
 
One issue that occurs on "make install" is that gconftool-2.exe refuses to execute the normal steps that are done when installing the apps_gnucash_xy.schemas files. Instead it shows the error message
 
mkdir -p c:/entwicklung/gnucash/etc/gconf/gconf.xml.defaults
 
GCONF_CONFIG_SOURCE=xml::c:/entwicklung/gnucash/etc/gconf/gconf.xml.defaults \
 
  /c/entwicklung/gnome/bin/gconftool-2 --makefile-install-rule ./apps_gnucash_history.schemas
 
DefaultConfigFile:
 
Failed to load source "xml": Couldn't resolve address for configuration source: Bad address `xml'
 
Failed to load source "c": Couldn't resolve address for configuration source: Bad address `c'
 
Failed to load source "C:\msys\1.0\entwicklung\gnucash\etc\gconf\gconf.xml.defaults": \
 
  Couldn't resolve address for configuration source: Bad address \
 
  `C:\msys\1.0\entwicklung\gnucash\etc\gconf\gconf.xml.defaults': `\' is an \
 
  invalid character in a configuration storage address
 
 
 
and then a dialog box (!) with a failed assertion in gconftool-2.exe pops up and the whole installation run is terminated.
 
 
 
One workaround was to define the GCONFTOOL variable as a no-operation during "make install", e.g.
 
make GCONFTOOL=echo install
 
Another workaround is to disable the installation of the schemas by the corresponding gconf configure option, i.e. when configuring gnucash, use
 
./configure --enable-schemas-install=no ...
 
 
 
=== Status ===
 
 
 
The windows port successfully compiled all C files in the standard configuration, which were 586 C files in r13657. All gnucash modules can be linked successfully. All test executables can be compiled and linked as well. It is possible to run "make install" successfully until end.
 
 
 
The majority of checks can be run successfully as well (in src/gnc-module, 1 out of 20 fails; in src/engine, only 3 out of 22 fail). However there are problems with the installation of the gnucash scheme modules, which might probably need some tweaking with the guile path variables (backward vs. forward slashes and the like).
 
 
 
==== Screenshots ====
 
The good news is: Even starting the gnucash executable is possible. At first it failed quite soon because it cannot load some of the loadable modules. Here's what I saw:
 
* [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot1.png] (which can be ignored)
 
* and [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot2.png] (which is solved by copying $prefix/share/gnucash to /C/GTK2-8-18/share/gnucash) and
 
* [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot3.png] (which is unsolved so far).
 
After some more combined effort of Andi, Derek, and myself, we saw these:
 
* [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot4.png]
 
* [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot5.png]
 
* [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot6.png]
 
* [http://www.tu-harburg.de/~et2cs/gnc/gnc-screenshot7.png] (but will crash when clicking "ok" here)
 
 
 
Note: Due to the file system wrapper layers in mingw32, compiling and especially linking is ''extremely'' slow. A full build of the gnucash tree might take well over 6 hours on a normal PC.
 
 
 
Also see http://svn.gnucash.org/trac/browser/gnucash/trunk/packaging/win32
 
 
 
== Old notes ==
 
* There was a weird linker problem in the early porting effort. The src/gnc-module/libgncmodule.la DLL doesn't export its symbols. This DLL simply won't have any exported symbols,  in stark contrast to e.g. src/core-utils/libcore-utils.la, which has all symbols exported just fine. My checking for exported symbols was <tt>nm .libs/libgncmodule.dll.a | grep ' T '</tt>. Turns out the libtool header <ltdl.h> ''must'' have the macros _WIN32 and in particular LIBLTDL_DLL_IMPORT defined or otherwise the linking will fail on windows. Once I do this, these variables marked with "C" disappear in the object file, and all expected symbols correctly appear. That's why these macros are included in the above configure command now. Of course this is nowhere documented, thank you libtool.
 
* In goffice, one include directory was missing and needs to be added to CFLAGS, either in config.status or manually in the Makefiles: -I/c/GTK2-8-18/include/freetype2 ; either this is fixed in gnucash, or you fix the pkgconfig file <tt>pangoft2.pc</tt> as described in the gnome section above.
 
* I got DLL problems when running tests and/or starting gnucash-bin.exe. The error message is something like "cannot find symbol freeaddrinfo in WS2_32.DLL". This was fixed by upgrading ORBit to 2.13.3.
 
 
 
==Latest (very new) notes==
 
In SVN we now have a script to build the build environment: http://svn.gnucash.org/trac/browser/gnucash/trunk/packaging/win32
 
 
 
For guile-1.6.8, a binary package including slib plus the devel package is provided here: http://www.tu-harburg.de/~et2cs/gnc/ --[[User:Cstim|Cstim]] 17:11, 25 August 2006 (EDT)
 

Latest revision as of 21:51, 3 May 2024

GnuCash on Microsoft Windows

This page collects various notes about running GnuCash on Microsoft Windows.

Q: Which Windows versions are supported?

Answer
The download page shows, which Windows version is officially supported by which GnuCash version.
Note
Windows 3/95/98/Me and Windows NT3.5/4.0 have never been supported.

Q: Where is the binary installer?

A: The latest versions can be downloaded from the [{{{{URL:www}}}}/download.phtml download] page on the GnuCash website. Anyone who cares about their data should use the released version found there.

People looking to test new features - at the risk of running into extra bugs - could try a test version:
  • As it is not so easy to build GnuCash under Windows, a daily build of the stable branch is made available as well to test bugfixes.
  • To closely follow development on the future branch, which contains new features - and bugs - there are the nightly builds. Expect data loss if you try these though!

Q: Is it possible to compile GnuCash on Windows?

A: Yes. It's cumbersome, but possible. See the instructions in Building on Windows.

Q: Are there nightly builds?

A: We run nightly builds for the stable (former maint) and after implmenting its first feature the future (former master) branch, but it's configured so that it runs only if changes have been pushed since the last build and only if the build is successful; they do fail from time to time. You can find the last 6-12 month's worth of builds at

https://code.gnucash.org/builds/win32/

or, more specifically, for stable, on demand for future, and logs for all builds.

The product of the nightly builds is a Windows installer that will replace your existing GnuCash installation. The future branch really is unstable: Be sure to have suitable backups and don't use it for your "production" books.

Q: Anything else?

To avoid making the installer file even bigger, some functionality is not available without further downloads and installations of software.

Preferences in GnuCash 2.6 and more recent

gconf has been replaced with another preferences system. On Windows you will find the preferences directly in the Windows Registry under the registry key

 HKEY_CURRENT_USER/software/GSettings/org/gnucash/

Pdf name for invoices

This name is controlled by two hidden preferences:

  • pdf-export/filename-format
  • pdf-export/filename-date-format

Both of them will reside in the registry under HKEY_CURRENT_USER/software/GSettings/org/gnucash/dialogs/general/report

These won't be there by default (only values that deviate from the default value will be effectively in the registry). To change it you will first have to create a sub key named 'pdf-export.

Under this key you can create two string type keys named filename-format and filename-date-format.

This is the definition of these two string keys:

filename-format
This setting chooses the file name for PDF export. This is a sprintf(3) string with three arguments: "%1$s" is the report name such as "Invoice". "%2$s" is the number of the report, which for an invoice report is the invoice number. "%3$s" is the date of the report, formatted according to the filename-date-format setting. (Note: Any characters that are not allowed in filenames, such as '/', will be replaced with underscores '_' in the resulting file name.)
The default value is %1$s-%2$s-%3$s
filename-date-format
This setting chooses the way dates are used in the filename of PDF export. Possible values for this setting are "locale" to use the system locale setting, "ce" for Continental Europe style dates, "iso" for ISO 8601 standard dates , "uk" for United Kingdom style dates, and "us" for United States style dates.

Finance::Quote

For the retrieval of Online Quotes, you will need to install Perl and Finance::Quote (F::Q). See Installing Perl on Windows.

Notes

Error messages, Trace file

In the GnuCash application, all error messages are redirected to a trace file. There will be one trace file for each time GnuCash is run. For a user named "myname" these files are located in the folder

  • c:\Documents and Settings\myname\Local Settings\Temp (Windows XP) or
  • C:\Users\myname\AppData\Local\Temp (Windows Vista/7).

They are named

  • gnucash.trace.ABCDEF (GnuCash 2.2.9 and older) or
  • gnucash.trace.ABCDEF.log (GnuCash 2.4.0 and newer)

where the ABCDEF part is changed randomly on each start of gnucash. See also Tracefile.

If you experience crashes or unexpected behavior, check the latest of these files (or the one created when the problem started) and add all interesting-looking lines of that file to your error reports, at least the lines with the keywords WARNing and CRITical warning.

See also Windows Debugging.

Determining the locale

When asked for the locale, take a look at the Regional Settings in your Control Panel and report the values found for "Standard and Formats", "Location" and "Language for non-Unicode programs".

Also, use this bug's attachment to determine the locale as used internally by gettext.

Problems, issues, comments

For any problem that occurs now, you should add a new section below.

Issues with older versions of GnuCash

In an effort to keep the information somewhat manageable this page will only gather issues with the current stable version of GnuCash. For historical reference, the older issues will be moved to a separate page.

If you experience issues with an older version of GnuCash, the first advice is normally to try again with the current stable version. There may however be situations where you need to revive an older version and in that case the information kept on the older issues page may be useful.

In addition, if you experience any of the older issues in the current stable release of GnuCash, please file a bug report or ask about it on the user mailing list.

Known issues

Here is a list of the most often mentioned Windows issues. If you experience this problem, please check the respective bugzilla reports for potential workarounds.

Windows 7 64-bit - GnuCash fails to run

This is with GnuCash 2.4.3:

Starting GnuCash shows the splash screen and the tip of the day for a brief instant and then it disappears. To fix the problem, I did:

  1. Right-click on the GnuCash icon and select 'Run as Administrator'
  2. GnuCash starts up as expected
  3. Close GnuCash

After doing the above once, I can start GnuCash normally and it starts up properly.

Hopefully this helps someone. --Sketch 05:05, 7 March 2011 (UTC)

Font problems

After upgrading to 2.2.1, people have reported font-related issues:

  • The tick/check mark in the Reconcile window may look like a "nondescript squiggle"
  • Register windows may open with all transactions scrolled out of sight (upwards)
  • Languages other than English show characters as a box of four zeros "0 0 0 0".

The reason appears to be that GnuCash is now referring to Windows to determine what fonts to use, and in both these cases is using the one specified for "Message Box", which defaults to Tahoma 8.

Changing to Tahoma 10 fixed both of these for me.

The procedure on WinXP is:

  1. Start -> Control panel or My Computer -> Control panel
  2. Appearance and Themes -> Display (or, if using the "Classic View", Display)
  3. Appearance
  4. Advanced
  5. Select "Message Box" from the drop-down
  6. Change as required (e.g. set to Tacoma 10 point)
  7. OK
  8. Apply

Fred 10:30, 22 August 2007 (EDT)

Is this still necessary when using GnuCash 2.2.2? andi5

I (piyo) confirmed that the above procedure is necessary for viewing Japanese on Windows XP with GnuCash 2.2.3 (2008-01-08):

  • Confirmed that working fonts are Arial UI Unicode, FixSys, System, Tahoma (including 8!), Terminal. Also for Japanese, MS P Gothic, MS P Mincho, MS UI Gothic, MS Gothic, MS Mincho fonts are working.
  • Confirmed that non-working fonts are Lucida Sans Unicode and Microsoft Sans Serif.

--Piyo 23:23, 5 February 2008 (EST)

Program hangs constantly

(GnuCash 2.4)

According to this bug report GnuCash can become unstable with some themes. The original reporter didn't remember which themes caused issues, but had no problems when using the "Unity" theme.

--GJanssens 18 October 2013

Gnucash fails to start with Failed to contact configuration server

(GnuCash 2.4)

Copied from this bug report:

I installed GnuCash on Windows 7 and at one point I received the following error message

 Failed to contact configuration server; some possible causes are that you need
 to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a
 system crash. See https://projects-old.gnome.org/gconf/ for information.
 (Details -  1: IOR file
 'C:\Users\Username\AppData\Local\Temp\gconfd-Username/lock/ior' not opened
 successfully, no gconfd located: No such file or directory 2: IOR file
 'C:\Users\Username\AppData\Local\Temp\gconfd-Username/lock/ior' not opened
 successfully, no gconfd located: No such file or directory)

I do not know what caused this error message.

Uninstalling GnuCash, removing an empty gnucash folder in C:\Program Files (x86)\, and reinstalling Gnucash does not restore GnuCash. I.e., same error message was produced.

Cleaning up the windows registry did not help either.

What did work was to remove the folder C:\Users\Username\AppData\Local\Temp\gconfd-Username/ which did not contain the subdirectory + file lock/ior that is mentioned in the error message.

The folder AppData is hidden (for Windows 7) and needs to be explicitly typed in the folder browser.

And also note that 'Username' should be replaced with your real username in the path (it's in there two times).

--GJanssens 18 October 2013

Windows 11: GnuCash installer quits without doing anything

When launching gnucash-setup.exe Windows 10 and Windows 11 usually complain that GnuCash is from an unknown developer and will put up a scary dialog but if you accept the risk it will run the installer after the usual User Authorization Escalation dialog. We've had a report that Windows 11 might silently fail to do anything. If that happens to you right-click on gnucash-setup.exe and select Properties from the context menu, then click Unblock and Save. You should be able to launch the installer normally.