Re: guile-2.0
On 10-02-12 16:34, rbibr...@t-online.de wrote: -Original Message- Date: Fri, 03 Feb 2012 15:40:17 +0100 Subject: Re: guile-2.0 From: "rbibr...@t-online.de" To: gnucash-devel@gnucash.org according to the manual guile provides two types of hashtables one "abstract" type and one vectorlike type. May be that mixing both types was allowed in guile 1.8 but not longer in 2.0 In file html-style-info.scm a vector type table was created. The lines for the abstract type are outcommented. May be that the hanging hash-fold should be replaced by a construction similare to kvt-fold.??? Rudolf In the file html-document.scm line 292 I have replaced hash-fold with kvt-fold so that this line reads now: (if attr (kvt-fold add-attribute #f attr)) The reports are working now!! Obviously guile-2 has different sorts of hashtables. Your suggestion about incompatible hashtable types was invaluable to get me past this crasher. GnuCash was mixing a custom hash datatype (kvt-hash) with a guile proper hash type. Apparently in guile 1.8 the internal representation was compatible enough to get away with this. In guile 2 this obviously changed. I decided to fix it in the other direction though: I have thrown out our custom hash datatype. It was only used in one file and I couldn't see any obvious benefits in it. Thanks a lot for guiding me in the right direction ! Starting gnucash within the console will result in a new compile process for the guile files. Besides masses of warnings there are some errors relating missing "sw_***" files The lines "(load-extension ..)" in file core-utils.scm, gnc-module.scm and qif-import.scm should be replaced with (eval-when (compile load eval) (load-extension...)). In file app-utils.scm it should read (eval-whwn (compile load eval) (gnc:module-load "gnucash/engine" 0)). One error in business-reports.scm remains : unbound variable: gnc:menuname-business-reports which I do not understand??? But as long gnucash does not use these compiled files it is not very relevant. I still have to go into this, but again a very good starting point ! Geert ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
GnuCash and Guile 2
As of r22655 the development branch of gnucash can be built and run with guile 2. It still spews warnings and the environment variable GUILE_AUTO_COMPILE should be set to 0, so this is still a work in progress. It is important to realize though that this is only possible is swig is properly patched as well. I have submitted a patch here for swig: https://bugzilla.redhat.com/show_bug.cgi?id=752054 So build instructions in short: - download the swig patch from the above link (against swig 2.0.8) and build a patched swig - install guile 2 - checkout gnucash' trunk branch as of r22655 - you may need to update configure.ac to have it prefer guile 2 if both guile 1.8 and guile 2 are installed on the system - build gnucash as usual - run gnucash as GUILE_AUTO_COMPILE=0 /path/to/gnucash It goes without saying that gnucash continues to work with guile 1.8. Feedback is welcome. For those interested, below are the warnings I still get: WARNING: (gnucash import-export qif-import): `gnc-build-dotgnucash-path' imported from both (sw_engine) and (gnucash core-utils) WARNING: (gnucash report report-system): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report report-system): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report report-system): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report stylesheet-plain): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report stylesheet-fancy): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report stylesheet-footer): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report stylesheet-easy): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports budget): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports average-balance): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports budget-balance-sheet): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports category-barchart): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports general-journal): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports net-barchart): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports net-linechart): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports cash-flow): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports register): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports budget-barchart): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports daily-reports): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports price-scatter): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports trial-balance): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports budget-flow): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports account-summary): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports balance-sheet): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports general-ledger): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports advanced-portfolio): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports income-statement): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports budget-income-statement): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports account-piecharts): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports portfolio): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports sx-summary): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports equity-statement): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report standard-reports transaction): imported module (gnucash app-utils) overrides core binding `N_' WARNING: (gnucash report hello-world): imported module (gnucash app-utils) ov