This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

building gnucash on cygwin (almost there, I think)


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
resolved first.

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, 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/' needs the symbols
`gnc_history_add_file', `gnc_history_get_last', and `gnc_file_dialog'
from the library `src/app-file/gnome/'; 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 `' reveals no dependence on
`'.  Strange.

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?

Best regards,

Ivan Middleton

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]