[gnutls-dev] Guile needs 1.8?

Simon Josefsson simon at josefsson.org
Wed Jun 27 11:48:20 CEST 2007


ludo at gnu.org (Ludovic Courtès) writes:

> Hi,
>
> Simon Josefsson <simon at josefsson.org> writes:
>
>> I noticed now that this didn't work...  on my system, the command
>> 'guile' is 1.8, but the guile-dev package is 1.6.
>
> Hmm, annoying.  I think `guile-1.8-libs' should conflict with
> `guile-1.6-dev', although that'd look strange.

Hi!  I think it is common in Debian to allow multiple versions of
libraries to be installed, and that they don't conflict with *-dev
packages unless the ABI isn't backwards incompatible.  In this case,
doesn't the guile 1.8 libraries support the 1.6 API/ABI?  If that isn't
the case, then I agree with you.

> The reason is that in this case, the Guile M4 macros see
> `guile-config' from 1.6 but see `guile' from 1.8...

My view is that the Guile M4 macros are broken here, the autoconf
approach is to test for the features you need instead of relying on
version information.  Using guile-config to get some necessary
parameters is fine, but then the macros need also check that the setup
is sane.

>>> No.  Those types and macros are actually defined in 1.6 as well.  It
>>> just turned out that for some reason their definitions were not visible.
>>>
>>> Anyway, such a feature test wouldn't help since 1.6 and 1.8 are
>>> significantly different API-wise.
>>
>> So, I still think it is better to test for some particular feature in
>> the guile header files that is required by the guile bindings, which is
>> available in v1.8 but not in v1.6.  I installed the patch below, what do
>> you think?
>
>> +      AC_COMPILE_IFELSE(AC_LANG_PROGRAM([
>> +	#include <libguile.h>
>> +SCM_API scm_t_bits scm_tc16_gnutls_cipher_enum;]),
>> +	recent_guile=yes,recent_guile=no)
>
> This only fails because `SCM_API' is undefined in 1.6.  Well, that's a
> sufficient reason, but not a strong one.

Right, but the GnuTLS guile bindings use and need SCM_API, so that
seemed like a good thing to test for.

> Instead, I prefer the solution below that tries to link against Guile
> and check for a function that appeared in 1.8 and will never appear in
> 1.6.
>
> Does it look ok?

I'm not sure, do the GnuTLS guile bindings uses and require the
scm_from_locale_string function?

To see the advantage of testing for the features you need, consider if
someone backports the SCM_API stuff from guile 1.8 to guile 1.6, but not
scm_from_locale_string.  Then the GnuTLS guile bindings might start to
work with guile 1.6.  I don't know what other features from guile 1.8
gnutls-guile needs, but it may be possible to backport all of them from
1.8 to 1.6.  This might not happen in this case, but there is no big
cost in associated with not assuming that.

/Simon



More information about the Gnutls-dev mailing list