building gnucash on cygwin (almost there, I think)
Derek Atkins
warlord at MIT.EDU
Sat May 10 13:56:19 CDT 2003
Ivan Middleton <ivan_middleton at yahoo.com> writes:
> 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
Cool. I don't think it will work with static libraries, but
I suspect you already figured that out.
> default on Cygwin: you need the -no-undefined flag to get libtool to
> build shared libraries.) In order to get things to build, 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.)
I suspect that the lack of long long support might be a problem
eventually...
> 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.
Yea, this is how it works... unfortunately...
> 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.
Yes, this is the right way to do what you need to do. It's unfortunate
that it needs to happen....
> 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
> `libgncmod-app-file.so'. Strange.
Can you file a bug report at bugzilla.gnome.org about this? There
shouldn't be any dependencies. Please feel free to also submit a
patch to move functions around to fix the dependency.
> 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?
They should definitely not depend on each other. I'm not convinced
that they should be merged.. We could use a registration mechanism
if we need a callback into the gnome library. Or we can just move
functions/files around to clear up the depenency.
Thanks for catching this.
> Best regards,
>
> Ivan Middleton
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list