Re: GnuCash and Guile 2

2012-12-18 Thread Geert Janssens
I have fixed the remaining warnings I got when not auto compiling and 
the errors that guile's autocompile (1) generated. While files are 
autocompiled, it still generates lots of warnings about 'potentially 
undefined symbols'. This only happens while autocompiling. Since the 
compile results are cached, this happens only once for normal users.

The warnings are apparently harmless, because gnucash runs fine in my tests.

Also make check passes for both guile 1.8 and guile 2.0. Word of caution 
here though: if you install both guile and guile 2, for one of both the 
guile executable is not guile. In my case, I have guile (1.8) and 
guile2 (2.0). Some tests are hardcoded to execute 'guile' and these 
tests will segfault when run against guile2. If you manually fix the 
tests to execute guile2, they pass fine. This is a transient issue that 
will resolve itself once only guile2 is an option.


With current code, only three real deprecated symbol compile warnings 
(generated by guile) remain in src/app-utils/gfec.c


This has to do with catching errors when trying to eval some string/load 
a file from c to scm. This is slightly too technical for me to really 
grasp. Moreover, the deprecation warning states:
'scm_internal_stack_catch' is deprecated. Talk to guile-devel if you see 
this message


So that's what needs to happen. For now, I'll just keep the warnings in 
place, but will prevent the build from failing on this and consider 
GnuCash ready for guile 2.


Note this hasn't been tested on platforms other than (Fedora) linux. The 
windows build should first try to get guile 2 itself running before it 
can be tested and probably something similar is needed for the OS 
X/Quarz build.


But I consider neither a requirement for GnuCash 2.6. What guile 2 is 
concerned, I consider it ready to go.


Geert


(1) Note that compiling scheme files is a new feature of guile 2. Guile 
2 by default compiles those files into some byte code format to be run 
on in internal virtual machine. If no specific parameters are set, this 
happens the first time a scheme file is needed by guile. The compiled 
file is cached for later use. Compilation can be skipped by setting the 
environment variable GUILE_AUTO_COMPILE to 0 before running the 
program.  If skipped guile will fall back to the old method of simply 
interpreting the files (unless a previously compiled file is still found 
in cache).


On 15-12-12 19:21, Geert Janssens wrote:

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.


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: GnuCash and Guile 2

2012-12-18 Thread John Ralls

On Dec 18, 2012, at 10:01 AM, Geert Janssens janssens-ge...@telenet.be wrote:
 Also make check passes for both guile 1.8 and guile 2.0. Word of caution here 
 though: if you install both guile and guile 2, for one of both the guile 
 executable is not guile. In my case, I have guile (1.8) and guile2 (2.0). 
 Some tests are hardcoded to execute 'guile' and these tests will segfault 
 when run against guile2. If you manually fix the tests to execute guile2, 
 they pass fine. This is a transient issue that will resolve itself once only 
 guile2 is an option.

Can we fix that to use a configure-set variable?

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: GnuCash and Guile 2

2012-12-18 Thread Geert Janssens

On 18-12-12 19:52, John Ralls wrote:

On Dec 18, 2012, at 10:01 AM, Geert Janssens janssens-ge...@telenet.be wrote:

Also make check passes for both guile 1.8 and guile 2.0. Word of caution here though: if 
you install both guile and guile 2, for one of both the guile executable is not 
guile. In my case, I have guile (1.8) and guile2 (2.0). Some tests are 
hardcoded to execute 'guile' and these tests will segfault when run against guile2. If 
you manually fix the tests to execute guile2, they pass fine. This is a transient issue 
that will resolve itself once only guile2 is an option.

Can we fix that to use a configure-set variable?

Regards,
John Ralls

As far as I understand, this is a distro-specific issue. Upstream the 
guile binary is called guile for both 1.8 and 2.0. It's because distro's 
want to install two releases next to each other that they rename one 
binary. Fedora has chosen guile and guile2, but another distro might 
just as well choose guile1 and guile or guile and guile-2 as binary names.


GnuCash can't know this. It also not something that is defined in 
pkgconfig, so I don't know how we can figure out what binary name we 
should use.


Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: GnuCash and Guile 2

2012-12-18 Thread John Ralls

On Dec 18, 2012, at 1:16 PM, Geert Janssens janssens-ge...@telenet.be wrote:

 On 18-12-12 19:52, John Ralls wrote:
 On Dec 18, 2012, at 10:01 AM, Geert Janssens janssens-ge...@telenet.be 
 wrote:
 Also make check passes for both guile 1.8 and guile 2.0. Word of caution 
 here though: if you install both guile and guile 2, for one of both the 
 guile executable is not guile. In my case, I have guile (1.8) and guile2 
 (2.0). Some tests are hardcoded to execute 'guile' and these tests will 
 segfault when run against guile2. If you manually fix the tests to execute 
 guile2, they pass fine. This is a transient issue that will resolve itself 
 once only guile2 is an option.
 Can we fix that to use a configure-set variable?
 
 Regards,
 John Ralls
 
 As far as I understand, this is a distro-specific issue. Upstream the guile 
 binary is called guile for both 1.8 and 2.0. It's because distro's want to 
 install two releases next to each other that they rename one binary. Fedora 
 has chosen guile and guile2, but another distro might just as well choose 
 guile1 and guile or guile and guile-2 as binary names.
 
 GnuCash can't know this. It also not something that is defined in pkgconfig, 
 so I don't know how we can figure out what binary name we should use.

But configure can figure it out by testing possibilities with AC_CHECK_PROGS, 
as a configure option using AC_ARG_WITH, or both.

You could also check an environment variable, which would facilitate testing 
the same build with both versions.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


GnuCash and Guile 2

2012-12-15 Thread Geert Janssens

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

Re: Gnucash with Guile 2

2011-05-20 Thread Geert Janssens
On vrijdag 20 mei 2011, Mike Alexander wrote:
 --On May 18, 2011 7:23:38 PM +0200 Geert Janssens
 
 janssens-ge...@telenet.be wrote:
  On vrijdag 6 mei 2011, John Ralls wrote:
  On May 6, 2011, at 9:47 AM, Daniel Kraft wrote:
   Hi all,
   
   I'm not able to build Gnucash 2.4.5 with Guile 2 installed --
   which is not too surprising, since the API and architecture of
   Guile changed a lot since 1.8.  Is this expected, or is there some
   way I can build Gnucash without having to install also an old
   Guile somewhere?  Are there plans to switch to the new API (or in
   general, support Guile 2)?
  
  It's expected. We haven't done anything with Guile2. Heck, we just
  got rid of the Guile 1.6 dependencies in trunk. I'm afraid you're
  stuck with having to have both versions installed for awhile.
  
  Regards,
  John Ralls
  
  If you are adventurous though, you could try to build GnuCash from
  trunk. I  have applied a number of patches by Andy Wingo [1] that
  should make GnuCash  work with Guile 2. It would be a nice test to
  see if that actually works.
  
  Standard disclaimer: note that such an attempt is at your own risk.
  Trunk is  not considered production quality and using it may cause
  crashes and data  loss.
  
  If you want to try it and have further questions, I suggest you
  subscribe to  the gnucash-devel list and post your findings there.
 
 Just out of curiosity I gave this a try today.  I got it to build ok,
 but it doesn't run since SWIG hasn't been updated to work with Guile2.
 There seems to be some progress on this, however [1] so there's hope.
 
Ok, thanks for trying. At least we know where the bottleneck is now.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Gnucash with Guile 2

2011-05-19 Thread Mike Alexander
--On May 18, 2011 7:23:38 PM +0200 Geert Janssens 
janssens-ge...@telenet.be wrote:



On vrijdag 6 mei 2011, John Ralls wrote:

On May 6, 2011, at 9:47 AM, Daniel Kraft wrote:
 Hi all,

 I'm not able to build Gnucash 2.4.5 with Guile 2 installed --
 which is not too surprising, since the API and architecture of
 Guile changed a lot since 1.8.  Is this expected, or is there some
 way I can build Gnucash without having to install also an old
 Guile somewhere?  Are there plans to switch to the new API (or in
 general, support Guile 2)?

It's expected. We haven't done anything with Guile2. Heck, we just
got rid of the Guile 1.6 dependencies in trunk. I'm afraid you're
stuck with having to have both versions installed for awhile.

Regards,
John Ralls


If you are adventurous though, you could try to build GnuCash from
trunk. I  have applied a number of patches by Andy Wingo [1] that
should make GnuCash  work with Guile 2. It would be a nice test to
see if that actually works.

Standard disclaimer: note that such an attempt is at your own risk.
Trunk is  not considered production quality and using it may cause
crashes and data  loss.

If you want to try it and have further questions, I suggest you
subscribe to  the gnucash-devel list and post your findings there.


Just out of curiosity I gave this a try today.  I got it to build ok, 
but it doesn't run since SWIG hasn't been updated to work with Guile2. 
There seems to be some progress on this, however [1] so there's hope.


 Mike

[1] http://lists.gnu.org/archive/html/guile-user/2011-03/msg00066.html


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel