Guile 1.8 vs 2.0 (was: Re: building from source.)

Geert Janssens janssens-geert at telenet.be
Tue Nov 12 03:55:07 EST 2013


On Monday 11 November 2013 17:19:08 John Ralls wrote:
> On Nov 11, 2013, at 9:00 AM, Derek Atkins <warlord at MIT.EDU> wrote:
> > John Ralls <jralls at ceridwen.us> writes:
> >> On Nov 8, 2013, at 12:32 AM, Geert Janssens <janssens-geert at telenet.be> wrote:
> >>> See, if you install compat-guile18-devel, configure will detect
> >>> guile
> >>> 1.8 on your system, but the guile binary for 1.8 is called
> >>> guile1.8. But gnucash only checks for "guile", which is the name
> >>> of the guile 2.0 binary. So in this setup, you end up with CFLAGS
> >>> and LDFLAGS for guile 1.8, but with the guile executable for
> >>> guile 2.0.
> >> 
> >> We'd prefer Guile 2.0 if it's available, right? Should we invert
> >> the
> >> test so that we look
> >> for Guile 2.0 first and fallback to Guile 1.8?
> > 
I already have the patch to prefer guile 2 over guile 1.8 in my local repository for quite some 
time. I have hesitated to push it to svn because there are still some issues with guile 2:
https://bugzilla.gnome.org/show_bug.cgi?id=709589
https://bugzilla.gnome.org/show_bug.cgi?id=707311

My first attempts at fixing these didn't work out. I haven't had much time to spend on it yet 
though.

On the other hand guile 1.8 works across the board. For that reason I never pushed the 
changes to prefer guile 2.

> > Probably not a bad idea, but we don't necessarily know what the
> > user-space 'guile' app is going to be called.  Is "guile" 1.8 or
> > 2.0?
> 
> I'm working on the hypothesis that the possibilities are guile and
> guile1.8, and the latter exists only in the case where guile 2 is
> installed and is called guile. By inverting the PKG_CONFIG_MODULES
> check to look for guile 2 first, the cflags and libs returned by the
> macro will match the what guile goes with.
> 
> If that hypothesis is wrong and there are instances of 'guile2' or
> something, then we'll need to write a test that checks the result of
> `guile --version` and tries other possible names like guile1.8 and
> guile2.

So far I have only seen guile and guile1.8 as John presumes (that's on Fedora).

But regardless of which guile version we prefer, the module check and the program check 
should get aligned. If the module check finds guile 1.8, the program check should look for the 
executable that belongs to guile 1.8. If the module check returns guile 2, the program check 
equally should look for the guile 2 executable. Guile 2 comes with a macro for that. Guile 1.8 
unfortunately doesn't.

The next issue would be that the gnucash sources still have the executable to use hard-coded. 
So if the program check tells us the executable to use is guile1.8, some parts of the code will 
continue to use guile because that's hard-coded.

Not a difficult issue to fix. I just mention it so we remember to do so.

I'll work on these in the coming days.

Geert


More information about the gnucash-user mailing list