Windows

From GnuCash
Revision as of 17:46, 22 May 2007 by Roasted (talk | contribs) (Q: Where is the binary?)
Jump to: navigation, search

GnuCash on Microsoft Windows

This page collects various notes about compiling GnuCash on Microsoft Windows. See Windows/Old_Notes for old, solved issues.

Q: Is it possible to compile GnuCash on Windows?

A: Well, compiling is possible, and running as well, but so far not everything runs and we still need plenty of feedback.

Note: Testing indicates that the Windows 9x line (Windows 95, 98, ME) does not run GnuCash.

Q: Where is the binary?

A: Here: https://sourceforge.net/project/showfiles.php?group_id=192&package_id=5582 If no binary is visible check then check previous versions listed. For example, no 2.1.2 binary exists yet but the 2.1.1 binary does.

However, we know compiling is possible, but the runtime testing has just started, and we expect a lot of issues still need to be resolved. This means the source code will change quite quickly and those early testers are expected to follow those source code changes by getting the code from SVN, see below for building from SVN.

Download numbers

The older revisions are being deleted from sourceforge.net again so that only the latest is accessible. Here are the download numbers for previous revisions (downloads in brackets): r15308 (351); r15309 (81); r15330 (295); r15335 (534); r15393 (116); r15398 (335); r15417 (716); r15480 (665); r15522 (387); r15574 (940); r15667 (2697); r15815 (414); r15877 (123+); These builds are now being built with the normal release schedule. See the download pages for numbers.

Q: Anything else?

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

Online Banking Setup Druid (needs Qt)

For the Online Banking Setup Druid (AqBanking), you have to download the library "Qt" from Trolltech. Download the latest package qt-win-opensource-4.x.y-mingw.exe (where x.y is some version number) and install it.

After the installation completed, additionally you need to add the "bin" subdirectory of the newly installed Qt library (e.g. C:\Qt\4.2.3\bin) to your "PATH" environment variable. How to do this on Windows XP is described here.

Finance::Quote

For online retrieval of price quotes, you will need to install Perl and Finance::Quote. To this end, download and install ActivePerl 5.8 from [1]. Contact details are optional, just choose the MSI installer for your system. Then use the start menu item "Install Finance-Quote" from the GnuCash group to install the necessary perl modules and verify the setup.

Support for ActivePerl 5.6 will be added in GnuCash 2.1.2. If you have downloaded a ZIP file, you can use the included installer.bat to install it.

Instructions for an (almost) automated build

Copied from http://lists.gnucash.org/pipermail/gnucash-devel/2006-September/018588.html

Several people have now compiled and run GnuCash on MS Windows by the mingw32/gcc compiler environment. These instructions explain how everyone else can give it a try as well. We would be happy to hear any further feedback about problems or (hopefully) success in this matter.

We've created a shell script that will download, compile, and install all requirements of GnuCash on Windows and eventually GnuCash itself. It will even make sure to retrieve the most up-to-date gnucash source code directly from SVN. Running this script will probably download ~200MB of data (but all downloaded data will be cached) and will take anything between 0.5 through 5 hours of time. That shell script is located in packaging/win32/install.sh of the gnucash SVN sources.

Before you can execute this shell script (which will do everything else automatically), you have to complete these steps manually:

  • Get the contents of the packaging/win32/ directory of gnucash SVN, most up-to-date from SVN, and copy it to some directory on your Windows machine. Do not use a directory that is one of the parent directories of the path you intend to use for the repository in the next step (c:\soft\repos by default). Possible locations are c:\soft\packaging or c:\soft\downloads.
  • Take a look at defaults.sh and optionally create a file custom.sh to specify directories according to your preferences; the defaults would install everything in subdirectories below c:\soft. (Note that due to shell syntax, every windows-style backslash has to be specified as two backslashes.)
  • Execute this downloaded package to install it into the chosen directory, say, C:\soft\msys (which is the $MSYS_DIR variable in defaults.sh)
  • Start the MSYS commandline shell by double-clicking the "MSYS" icon on the desktop which should have been created when you installed the MSYS package.
  • Let the automated build begin by typing:
 $INSTALLER_DIR/install.sh   (the complete path to the install.sh)
  • Some of the downloaded packages are installed through graphical installer dialogs where you can choose an installation directory. In those cases, the install.sh script will tell you in the MSYS window the installation directory that you should choose, according to your settings in defaults.sh/custom.sh. Please enter only those installation directory in the installer dialog because otherwise the install.sh script cannot find the newly installed software.
  • If there haven't been any errors, you should be able (after several hours of compiling and installing) to start gnucash from the MSYS command line by typing
 c:/soft/gnucash/bin/gnucash

or even without MSYS directly by "Start"-> "Run"-> "c:\soft\gnucash\bin\gnucash.bat"

Please spread the word and report back any problems you encounter. It is probably not too difficult anymore to create a full self-contained package of GnuCash on Windows as well! Some more information is also collected here on this wiki page.

A bit of history

This page used to collect random notes from the time when we manually tried to install each and every part of the requirements. They have been moved to Windows/Old Notes.

Notes

Error messages

In the binary builds, all error messages are redirected to files c:\Documents and Settings\myname\Local Settings\Temp\gnucash.trace.ABCDEF (on Vista in C:\Users\myname\AppData\Local\Temp). If you experience crashes or unexpected behavior, check the latest of these files (or the one created when the problem started) and add meaningful snippets to your error reports, at least WARNings and CRITical warnings.

gdb

In addition to Stack Trace, here are a few instructions on how to run gnucash under gdb on Windows:

  • Install "gdb" from mingw.org
  • Modify the installed "gnucash" script to call "exec gdb gnucash-bin.exe" instead of "exec gnucash-bin.exe" at the end
  • Then start gnucash, which will give you the gdb prompt
  • Type "run" at the gdb prompt.
  • Then provoke the crash and type "backtrace" or shorthand "bt" at the gdb prompt to obtain the backtrace, as explained on Stack Trace as well.

You can provide even better stack traces if you tell gdb where in memory dynamically loaded modules got mapped to, because otherwise function calls into those are only written as '??'. See here and here for a way to do this. To enter [ and ], use set editing off.

install.sh

  • To debug install.sh, change set -e to set -ex at the top of it.
  • Once you have installed Subversion, you might want to checkout and update packaging/win32 as described in SVN.
svn checkout http://svn.gnucash.org/repo/gnucash/trunk/packaging/win32 packaging

Online banking

The current install.sh automated build already builds GnuCash with Online Banking enabled, including HBCI, OFX DirectConnect, and OFX file import methods.

However, in order to set up the online banking connectivity (HBCI or OFX, which are both handled by aqbanking), you need to run a separate setup program of aqbanking. Because of the high complexity of the various online banking techniques, the setup program is a GUI program which is based on the Qt library. These Qt parts are not automatically built by install.sh, but you can enable them as described below.

aqbanking

The GUI installation goes like this for a manual install:

export QTDIR=/c/Qt/4.2.2
export aqbanking_with_qt=yes
install.sh

This should build and install the qt parts of aqbanking as well.

Problems, issues, comments

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

Outdated statement in mainline FAQ

The following FAQ in the mainline documentation http://svn.gnucash.org/docs/guide/appendixb_general.html#appendixb_software_windows would benefit from a reference to this page. This http://wiki.gnucash.org/wiki/FAQ#Q:_Is_there_a_version.2Fport_for_Windows.3F is an up-to-date version of the same FAQ, maybe the repository should be updated from the wiki.

Help files not found in the binary distribution

I just installed GnuCash from gnucash-2.0.99-svn-r15522-setup.exe and it is working nicely, except for the help that seems to be absent. When help is requested, the following message pops up:

GnuCash could not find the files for the help
documentation.  This is likely because the
'gnucash-docs' package is not installed.

It would be nice if these can be included in the Windows binary package. Note that my Gtk runtime is configured to work in Dutch, but that should not matter I guess.

You are completely right, it is on our todo list, but not at top priority. -- andi5
Ah, sorry. I had overseen that. -- Bastiaan
Documentation can be built as of r15713. I do not know for sure, but I expect an increase in download size of the binary package by approx. 9 MB. So should the CHM files be included or packaged up in a gnucash-docs-*-setup.exe?
I would vote for inclusion, as that is what Windows users are used to. -- Bastiaan

Errors on Windows 98

Hi, I installed SVN r15355 on Windows 98 and got the following error:

"Die Datei LIBGTK-WIN32-2.0.0.DLL ist verknüpft mit dem fehlenden Export-COMDLG32.DLL:PrintDlgExW." Translated this means "the file ... is bound to the missing export ...". GNUcash failed to start.

As mentioned above (Windows#Q: Is it possible to compile GnuCash on Windows?), GnuCash will not run on Windows 98. You need at least Windows 2000.

DLL install error

I get an error like that:

'libgncmodule.la' 'c:/soft/gnucash/lib/libgncmodule.la'
/bin/install -c .libs/libgncmodule.dll.a
c:/soft/gnucash/lib/libgncmodule.dll.a
base_file=`basename ${file}`
  dlpath=`/bin/sh 2>&1 -c '. .libs/'${base_file}'i;echo $dlname'`
make[5]: *** [install-libLTLIBRARIES] Error 1
make[5]: Leaving directory `/c/soft/repos/src/gnc-module'
make[4]: *** [install-am] Error 2

This seems to be only an installation problem. Fine compiling it seems.

I saw this at "make install" when I stopped and restarted the preceding compiling several times. So to me this looks like an artifact of DLLs that somehow "don't fit" to each other. The solution was always to run "make clean" in the source directory so that all DLLs are being deleted, and then starting the compiling again. --Cstim 05:55, 4 December 2006 (EST)

Now I got that: http://rafb.net/p/zYqOJv60.html (also after removing the whole soft directory (besides the downloads dir).Calmar

So you have got these errors in at least three different directories and also in a clean environment. The problem always seems to be a missing .lai file. But surprisingly other directories (among them those that failed in other builds) contain such files. The only solution I know is still to cd into the offending directory and to run make clean && make all install. I am sorry for the inconvenience. -- andi5
I was able to solve the problem, with ./install.sh (repeated) until it comes through. After the 5th try or so, it came through :) Very happy I can satisfy now what I promised to my friend (I mean new year is a good start for him). Thanks again for all your help! Good new year everybody!

Actually I still see this error frequently, even when I completely remove the build/ directory and let it be created from scratch. (?!?) As an alternative, I've now tried a newer libtool version by installing the cvs snapshot libtool-1.5.23a from http://www.gnu.org/software/libtool/ . Maybe the newer version has this bug fixed. --Cstim 10:27, 22 January 2007 (EST)

Seems like using libtool-1.5.23a didn't change a thing. I've written a script that should track down potential errors:
#!/bin/sh
ALL_LIBDIR=` find . -name '*.la' | grep '\.libs' `
RM_THESE=""

for LIB in $ALL_LIBDIR ; do
    DIR=`dirname ${LIB}`
    FNAME=`basename ${LIB}`
    LIBBASE=`basename ${LIB} .la`
    if test ! -f "${LIB}i" -a -f "${DIR}/${LIBBASE}.dll.a" ; then
	echo "File ${LIB}i missing"
	PDIR=`dirname ${DIR}`
	#echo "Do this: rm ${PDIR}/${FNAME}"
	RM_THESE="${RM_THESE} ${PDIR}/${FNAME}"
    fi
done

if test "x${RM_THESE}" != "x"; then
    echo "Do this:"
    echo "rm ${RM_THESE}"
fi

GConf/ORBit COMM_FAILURE

On some computers (Windows 2000/SP4), the following error has been observed, but on other computers GConf runs fine. GConf shows plenty of error messages like these: "Failed to save key /apps/gnucash/window/pages/account_tree/name_visible: Adding client to server's list failed, CORBA error: IDL:omg.org/CORBA/COMM_FAILURE:1.0" and also the "Cannot find default values" dialog is shown on each startup, regardless whether the "setup" is done or not. Also, the startup of GnuCash might open dozens of shell windows one after the other, and the startup of GnuCash is incredibly slow.

This is being reported to the ORBit crew as bug#363648. As a quick workaround, you have to install ORBit2-2.13.3 from here instead of 2.14.2, as this seems to fix that problem.

Bug still present in 16017:16019m (2007-04-28), it's sistematically preventing application load on Windows XP Home 5.1.26000, here is GnuCash error log:
OTHER <> file corba-object.c: line 76 (ORBit_register_objref): assertion failed: (obj->object_key != NULL)
Please kill all running gconfd-2.exe instances and remove C:\Documents and Settings\$user\Local Settings\Temp\gconfd-$user\lock\ior.

Failed to fork

When starting GNUCash I receive the following message:

gnucash: [E] "Failed to fork child process."

It is not a fatal error (program continues to load). Is this something I can safely ignore? --Scbash 17:10, 3 December 2006 (EST)

This is from the file process.scm and it concerned with the Finance::Quote script for stock price retrieval. Chris wrote: "That's process.scm which is run during price-quote retrieval. Perhaps guile's (primitive-fork) doesn't work on win32." You can ignore this for now. On the other hand, this means Finance::Quote and price retrieval currently doesn't work yet. --Cstim 16:07, 4 December 2006 (EST)
Fixed. There is no single fork anymore.

Check Printing characters inverted

Using r1557 on windows 2000, and testing check printing I found each string positioned well but each character was inverted vertically. The baseline for each line was also at the top.

Workaround: Deactivate advanced features of your printer, may be this bug.
So I think this is a bug in Gnome-Print, but I hope we will actually use GtkPrint in GnuCash 2.2. -- andi5
The infrastructure is there now, we only need a newer gtkhtml package. -- andi5
Now the gtkhtml package is there, but we fall back to gnomeprint with the known workaround, given that currently gtkhtml/gtkprint produces black filled boxes only.


Windows XP Home Edition Problems

Gnucash does not appear to work on windows XP home edition (mediea edition). Gconfd takes a long time to start (5+ minuets) and everything else takes longer and then it just appears to do nothing (even though it is still in the list of processes). In my machine it works well, except for the reports, that doesn't work and cause the application to crash. I have installed the last build (15667) on my windows xp home with SP2. -- jeanobrega

Windows 2000 Problems

I downloaded the latest binary today. Installed on Windows 2000 SP4. GnuCash did not display windows fully. When I selected the option to import QIF files, program immediately crashed with no error messages. Did not even get a chance to select a QIF file.

Please take a look at Error messages, maybe you find something useful in there. Ok, I just added that section ;-)
What does "display windows fully" mean? -- andi5

I have a multiboot system, each OS is Windows 2000. I installed the binaries in the OS on G. I checked C, G, and I, and could not find any file named gnucash.trace. I: has several shared directories. It's possible I cleaned out Temp files, do not recall.

Do I now have to download a more recent binary to see this? I'll check for a more recent binary.

"does not display fully means, remember this is first time I ever ran GniCash:

1. Window wit hoption to create account, import QIF, amd one other option appeared. 2. Smalling, what appearerd to be main, Gnucash window opened. not sized properly.

Clicking on the option to import QIF caused Gnucash to vanish, all windows closed, no messages displayed.

I just remembered, I uninstalled gnucash-2.0.99-svn-r15667-setup.exe after the error occurred yesterday.

Windows Vista

Does GnuCash run on Windows Vista? http://bugzilla.gnome.org/show_bug.cgi?id=434755 : GnuCash is designed to be portable, but certainly not specifically to run on Windows Vista. Here is what we know about:

  • GnuCash cannot be built on a Vista machine. At least on cstim's Vista 64-bit the available MSYS version will not open a shell window, but instead it will open 100 windows which will get closed automatically instantly. So we need to know about a Vista-capable MSYS first.
  • None of the developers use Vista
  • The section below indicates that the binary in fact works on (some?) Vista versions, so Vista support does not seem to be fundamentally broken.
  • GnuCash depends on a lot a lot of libraries. Some may have better Vista support than others. If other products have similar problems, you might suffer bugs in libraries up the stack, e.g. in GTK+.

64 bit

I have Windows Vista 64 bit and just downloaded and installed gnucash-2.0.99-svn-r15815-setup. I've encountered no problems so far, everything works great. Importing .ofx files works too. Looking forward to using it!

Application Error on Exit in XP Pro

I just installed 2.1.1 from SourceForge (not sure the rev number). Install goes okay and program runs fine, but when I exit (using File->Quit) I get a dialog titled

*<no file>: gnucash-bin.exe - Application Error

The text reads:

The instruction at "0x0138a214" referenced memory at "0x014d3aa8".
The memory could not be "read".

Any ideas? I'm a little confused because I was editing my existing GnuCash files (originally 1.8.11, saved using 2.0.1 in Linux), so it shouldn't be <no file>. Here are the contents of the trace file:

*   WARN <qof.engine> [guid_init()] only got 1731 bytes.
The identifiers might not be very random.
*   WARN <gnc.engine> failed to load gnc-backend-postgres from 
C:\Program Files\gnucash\lib\gnucash
*   WARN <gnc.app-util> Could not spawn perl: Failed to execute child 
process (No such file or directory)
*   WARN <qof.session> [qof_session_load_backend()]  failed to load 
gncqof-backend-qsf from c:/soft/gnucash/repos/inst/lib/gnucash
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid 
window handle.
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid 
window handle.

--Scbash 13:22, 12 May 2007 (EDT)

Todo

This section is intended mainly for developers to concisely specfiy what issues are open, assigned or closed (and can be removed then).

[/]    AqBanking
[/]    Encoding issues (Bug)
[ ]    Randomness (Mail)
[W] R  GConf/ORBit2
[X]    Finance::Quote
[X] R  Compressed files (Mail)
[X] R  Documentation
[X]    LibOFX
[X] R  Text report crashers (Bug, Bug)
[X] R  Packaging

A lot more, fill me
X = done; W = workaround; / = in-progress, not-yet-done, needs-testing