[gnutls-dev] Starting Guile integration

Simon Josefsson simon at josefsson.org
Fri Jun 1 13:55:25 CEST 2007


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

> Hi,
>
> Simon Josefsson <simon at josefsson.org> writes:
>
>> Thanks!  I accidentally used 'git pull' on your repository (I think I
>> wanted to use 'git fetch' instead), so your changes have now been
>> installed!
>
> How fun!  ;-)
>
> Anyway, sorry for all the mess that you ended up merging.

Ok, this time I used 'git-pull --no-commit' but it seems to have
committed everything anyway!

jas at mocca:~/src/gnutls$ gitco
jas at mocca:~/src/gnutls$ git-pull --no-commit http://www.laas.fr/~lcourtes/software/gnutls.git
Fetching HEAD from http://www.laas.fr/~lcourtes/software/gnutls.git using http
walk ac2c37fd6a7820ebc10182b02d5d9e9d075981d9
walk f469cfce51318df3b629d9af210ce4b4e587fac0
walk 76b313969e72860092441f54cc9a4f52c8eaba57
walk be1614e554969c35c5a58fdf0deff4b065cde1fe
Updating faa8f90..ac2c37f
Fast forward
 Makefile.am                                    |    4 ++
 configure.in                                   |   51 ++++++++++++------------
 doc/Makefile.am                                |   17 ++++++-
 doc/extract-guile-c-doc.scm                    |   38 ++++++++---------
 guile/modules/system/documentation/c-snarf.scm |    5 +-
 guile/src/Makefile.am                          |    7 +--
 guile/src/core.c                               |    2 +-
 guile/src/errors.c                             |    2 +-
 guile/src/extra.c                              |    2 +-
 9 files changed, 71 insertions(+), 57 deletions(-)
jas at mocca:~/src/gnutls$ gitco
jas at mocca:~/src/gnutls$ git-commit
nothing to commit
jas at mocca:~/src/gnutls$

I reviewed your changes manually, but I'm really starting to wonder what
git command I should be using to review the changes 'git-pull' from
someone else's repository will actually pull in.

In the future, do you want to develop things in your git repository, and
ask me to pull things in when ready?  I think that would work well, if I
can figure out which command I should be using for reviewing the changes
before committing them.

>> * configure.ac contains:
>>
>>    AC_PATH_PROG([guile_snarf], [guile-snarf], [not-found])
>>    if test "x$guile_snarf" = "xnot-found"; then
>>       AC_MSG_ERROR([`guile-snarf' not found.  Please install Guile 1.8.x or later.])
>>    fi
>>
>>   This seems unsafe.  Could you change this so that if guile-snarf is
>>   not available, the guile bindings are disabled rather than aborting
>>   the build?
>
> Done.

It now says:

if test "x$opt_guile_bindings" = "xyes"; then
   GUILE_PROGS
   GUILE_FLAGS
   AC_PATH_PROG([guile_snarf], [guile-snarf])
   if test "x$guile_snarf" = "x"; then
      AC_MSG_WARN([`guile-snarf' from Guile 1.8 not found.  Guile bindings not built.])
      opt_guile_bindings=no
   else

Would it work to move GUILE_PROGS + GUILE_FLAGS down into the else-case?
This avoids some unnecessary checking if guile isn't going to be used
anyway, due to guile-snarf missing.

>> * The manual's @node's were heavily changed, which causes problems.  You
>>   shouldn't need these modifications if you use the latest texinfo.  I
>>   reverted this stuff.
>
> I think I routinely hit "Update all nodes" in Emacs, hence those
> changes.  Sorry.

That should probably be reported as a Emacs bug, I don't think it is
considered good practice to maintain such @node's anymore.  But I don't
know for sure.

>> Another problem:
>>
>> ./configure: line 7459: GUILE_PROGS: command not found
>> ./configure: line 7460: GUILE_FLAGS: command not found
>>
>> The m4 files that define these macros need to be included in GnuTLS, I
>> suggest to place them in m4/.
>
> That's from `guile.m4' from Guile 1.8 which should be available at
> `/usr/share/aclocal' (or similar).  It's only needed by those who modify
> `configure.in'.  Should we really include it?

Yes -- otherwise people who don't have guile.m4 on their systems will
get the above error when they build from CVS.  And we don't want to
require that guile is installed in order to bootstrap gnutls.

Compare this with including libgcrypt.m4, libtasn1.m4, gtk-doc.m4.
Building gnutls from CVS doesn't require that all of the tools are
installed (i.e., libtasn1 is optional, gtk-dock is optional), and
consequently building gnutls should not require files from those
packages.  If the files aren't available at build-time, the generated
tar-ball won't work correctly for end-users.  This happens on the daily
build machine now, since it doesn't have guile.m4: you probably can't
build gnutls with guile-features, because guile.m4 was not included into
the daily snapshot (and it is not picked up at user's build-time).

> The changes above are available in my repository.

Incorporated now...

> There are still a couple of minor glitches:
>
>   * Code in `guile/src' doesn't want to be compiled with
>     `-Wstrict-prototypes'.  Since adding `-Wno-strict-prototypes'
>     doesn't annul the effect of `-Wstrict-prototypes', I'm afraid we'll
>     have to remove `-Wstrict-prototypes' at the project level (i.e, in
>     `configure.in'), and add it to `CFLAGS' in sub-directories where it
>     makes sense.

Ouch.  What is the reason the code needs this?  Maybe we can fix that
problem instead.  It seems to build for me now, though, with warnings,
but I'd rather have warning messages than potentially hiding other
problems.

>   * The "function index" of the manual mixes Scheme procedures and C
>     functions.  In theory it might be possible to create separate
>     indices but since `@deffn' automatically adds functions to the
>     function index, it would not be convenient.

It may be possible to re-define the function index somehow, perhaps we
could ask on the texinfo list about this.  I think it would be cleaner
to have a separate C API index and Scheme API index.  Although it is not
important to fix this before the first releases.

> For some reason, `make' now fails here in `doc/reference':
>
>   $ make -C doc/reference/
>   make: Entering directory `/home/ludo/src/gnutls/doc/reference'
>   gtk-doc: Scanning header files
>   [...]
>   gtk-doc: Compiling scanner
>   gnutls-scan.c:5:25: error: glib-object.h: No such file or directory
>   [...]
>
> Clearly, it lacks `pkg-config glib-2.0 --cflags` as CFLAGS.
> Unfortunately, I wasn't able to pinpoint the root of the problem.
> Re-running `autoreconf' and `configure' didn't help.  Any hint?

Hm, which gtk-doc-tools version are you using?

Btw, building fails in another way now:

make[3]: Entering directory `/home/jas/src/gnutls/guile/src'
/usr/bin/guile-snarf -o core.x core.c -DHAVE_CONFIG_H  -I.  -D_REENTRANT -D_THREAD_SAFE -g -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wno-unused-parameter -Wno-pointer-sign -pipe -I/usr/local/include  -I/usr/local/include
In file included from core.c:27:
enums.h:5:20: error: config.h: No such file or directory
make[3]: *** [core.x] Error 1
make[3]: Leaving directory `/home/jas/src/gnutls/guile/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jas/src/gnutls/guile'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jas/src/gnutls'
make: *** [all] Error 2
jas at mocca:~/src/gnutls$

But I fixed this by adding a -I.

Thanks,
Simon



More information about the Gnutls-dev mailing list