This is the mail archive of the
mailing list for the Cygwin project.
building gnucash on cygwin (almost there, I think)
- From: Ivan Middleton <ivan_middleton at yahoo dot com>
- To: cygwin at cygwin dot com, gnucash-devel at lists dot gnucash dot org
- Date: Fri, 9 May 2003 22:24:55 -0700 (PDT)
- Subject: building gnucash on cygwin (almost there, I think)
- Reply-to: ivan_middleton at yahoo dot com
After having used Linux for quite some time, I recently became
interested in Cygwin for the purpose of free software evangelism to
friends and family. I happen to like Gnucash a lot, and would like to
persuade some Windows users to use it, which for most of them will only
happen if it runs on Windows. Thus I have become somewhat obsessed
with getting gnucash to compile under cygwin. If anyone else has tried
or is trying to do this, please let me know. For all I know at this
point, there could be some lurking hidden issue(s) which need to be
However, I have already had some good successes which lead me to
believe that I'm almost there. First off, I succeeded in performing a
complete build with static libraries only. (This seems to happen by
default on Cygwin: you need the -no-undefined flag to get libtool to
build shared libraries.) To do this, I had to disable Guppi and ignore
an issue with scanf not having `long long' conversion support. I also
had to fix some other very minor problems. (The Guppi and scanf issues
are probably not too hard to fix later. Apparently, `long long'
support for scanf has already been contributed to newlib, but doesn't
seem to be present in Cygwin yet.)
Now, I haven't completely figured out how Gnucash works when you run
it, but it looks like guile is called, which then expects to dlopen
some library modules. So this means we need to build the modules as
shared libraries. I have had partial success with this-- the main
difficulty seems to be that, on windows, you can't have any unresolved
symbols when linking shared libraries.
The solution, of course, is to make sure that the linker can find all
dependencies. I have done this by running `nm' on the static libraries
I already built and writing some scripts to find out which libraries
are needed. Then I added the appropriate dependencies to
libfoo_la_LIBADD in each Makefile (later this should be done in
Makefile.am, of course). Someone should tell me if adding to
libfoo_la_LIBADD is The Right Thing to do.
The reason I haven't finished (and I was afraid of it all along) is
that there seems to be a cycle in the dependency graph, i.e., two
libraries which each depend on the other. Namely, the library
`src/app-file/libgncmod-app-file.la' needs the symbols
`gnc_history_add_file', `gnc_history_get_last', and `gnc_file_dialog'
from the library `src/app-file/gnome/libgnc-app-file-gnome.la'; and
conversely, the latter library needs `gnc_file_open_file' from the
former. Interestingly enough, on my linux installation of gnucash
1.8.2 (the same version as I'm trying to build on cygwin), running
`ldd' on `libgnc-app-file-gnome.so' reveals no dependence on
Gnucash developers, does this sound correct? Should the two libraries
be merged, or should one of them not depend on the other? Are there
any other possibilities?
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html