Difference between revisions of "Windows"

From GnuCash
Jump to: navigation, search
(Download numbers)
(DLL install error: still appears.)
Line 150: Line 150:
 
::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!
 
::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/ . --[[User:Cstim|Cstim]] 10:27, 22 January 2007 (EST)
  
 
=== GConf/ORBit COMM_FAILURE ===
 
=== GConf/ORBit COMM_FAILURE ===

Revision as of 15:27, 22 January 2007

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

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: r15308 351; r15309 81; r15330 295;15335 534; 15393 116.

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.
  • Adapt the directory name variables in the custom.sh file 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 custom.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 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

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.

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

In case anyone wants to build GnuCash with Online Banking enabled, here are some notes on what needs to be done. Eventually, you should only need to uncomment the two steps in custom.sh that are clearly marked as "Online Banking".

Here are the notes from manual installation:

gwenhywfar

  • Install gwenhywfar, http://sourceforge.net/projects/gwenhywfar ; requires OpenSSL (which happens to be installed from install.sh already because libgnomevfs needs it). The tarball of gwenhywfar compiles out-of-the-box on mingw32; there's a .iss file for Inno Setup included as well. But for a full GnuCash setup.exe we probably don't need this.

Actually the 2.5.1 tarball still has a problem with linker flag detection (of openssl). Currently you need its code from SVN (r1119) or wait for 2.5.2.

aqbanking

The non-GUI installation goes like this:

./configure --with-gwen-dir=/c/Programme/gwenhywfar \
            --with-frontends="cbanking" --with-backends="aqdtaus aqhbci"
  • This will already provide the header files and libraries that GnuCash needs to build against. Also, in principle you can use the command-line tool aqhbci-tool for setting up your HBCI connection (but not OFX).
  • In GnuCash, you need to say ./configure --enable-hbci --with-aqbanking-dir=... to build with aqbanking. (Needs to be uncommented in the inst_gnucash section)

This is what install.sh should do already automatically. aqbanking-2.2.5 should compile out-of-the-box on win32.

The GUI installation goes like this for a manual install:

  • Install Qt 4.x (Open Source Edition) from http://www.trolltech.com/developer/downloads/qt/windows
  • However, because the setup of the online banking connectivity (HBCI or OFX) in aqbanking is so complex, aqbanking provides a qt-based setup wizard for all online banking methods. This wizard is a standalone executable and originally it is written for qt 3.x. Fortunately, the qt3 code of that aqbanking wizard can be automatically converted for use with qt 4.x. So for building this GUI program as well, use the following lines (see also the README):
./configure --with-gwen-dir=/c/Programme/gwenhywfar \
  qt3_libs="-L$QTDIR/bin -lQtCore4 -lQtGui4 -lQt3Support4" \
  qt3_includes="-I$QTDIR/include -I$QTDIR/include/Qt -I$QTDIR/include/QtCore \
                -I$QTDIR/include/QtGui -I$QTDIR/include/Qt3Support" \
  --with-frontends="cbanking qbanking" --with-backends="aqdtaus aqhbci"
make qt4-port
make

This should build the qt parts as well.

Problems, issues, comments

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

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/ . --Cstim 10:27, 22 January 2007 (EST)

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.

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)

Reading/writing compressed files

The current win32 SVN code doesn't read or write compressed (gzip'd) files. On Linux, gnucash forks gzip as a child process and pipes the file through it. On windows, there isn't an easy replacement for fork() and pipe(). See src/backend/file/io-gncxml-v2.c:1246 ff.

As a consequence, a linux-stored data file which, by default, is stored in compressed form cannot be read by the Windows version at the moment. If you want to use the linux datafile, you need to switch off file compression beforehand. Or 'mv datafile datafile.gz && gunzip datafile.gz #providing a .gz suffix, and finally unzipping it'

Todo

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

[ ] R  Compressed files
[ ]    AqBanking
[ ]    Finance::Quote
[ ]    File name encodings [andi5]
[ ]    Randomness (Mail)
[W] R  GConf/ORBit2
[X] R  Text report crashers (Bug, Bug)
[X] R  Packaging

A lot more, fill me
X = done, W = workaround