Subject: Re: bug#63331: Guile-GnuTLS/Git circular dependency

From: Christopher Baines <[email-masked]>
Date: Tue, 09 May 2023 12:15:24 +0100

Simon Josefsson via Bug reports for GNU Guix <[email-masked]> writes:

> [[PGP Signed Part:Undecided]]
> Ludovic Courtès <[email-masked]> writes:
>
>> We need to solve that.  For now, the only fix I can think of is having
>> ‘guile-gnutls’ built from a “make dist”-provided tarballs.  Apparently
>> we can add assets at <https://gitlab.com/gnutls/guile/-/tags>; would you
>> like to upload a tarball and accompanying signature, Simon?
>
> I published a release of gnutls-guile 3.7.12, this time built on my Guix
> development machine to test that the release machinery (README-release)
> works under Guix as well; the only "interesting" dependency was ncftp
> but you had that packaged and it worked fine.
>
> https://gitlab.com/gnutls/guile/-/releases/v3.7.12

Thanks so much for this Simon.

I've had a go at updating the Guix guile-gnutls package and sent an
initial patch to https://issues.guix.gnu.org/63388 .

It seems to build for me, but I'm having problems cross building. There
were warnings before about protocol/ssl3 being undefined, but now this
seems to result in an error when building extra.scm:

  GUILEC   modules/gnutls.go
gnutls.scm:608:23: warning: possibly unbound variable `protocol/ssl3'
gnutls.scm:609:25: warning: possibly unbound variable `protocol/tls1-0'
gnutls.scm:610:25: warning: possibly unbound variable `protocol/tls1-1'
  GUILEC   modules/gnutls/extra.go
Backtrace:
In ice-9/psyntax.scm:
  1229:36 19 (expand-top-sequence (#<syntax:extra.scm:21:0 (#<synt?>) ?)
  1221:19 18 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   259:10 17 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #)
In ice-9/eval.scm:
   293:34 16 (_ #<module (#{ g106}#) 7ffff786d500>)
In ice-9/boot-9.scm:
   3411:4 15 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2595:24 14 (call-with-deferred-observers #<procedure 7ffff778ac30 ?>)
  3424:24 13 (_)
   222:17 12 (map1 (((gnutls))))
  3327:17 11 (resolve-interface (gnutls) #:select _ #:hide _ #:prefix ?)
In ice-9/threads.scm:
    390:8 10 (_ _)
In ice-9/boot-9.scm:
  3253:13  9 (_)
In ice-9/threads.scm:
    390:8  8 (_ _)
In ice-9/boot-9.scm:
  3544:20  7 (_)
   2836:4  6 (save-module-excursion #<procedure 7ffff78660f0 at ice-?>)
  3564:26  5 (_)
In unknown file:
           4 (primitive-load-path "gnutls" #<procedure 7ffff27384a0 ?>)
In ice-9/eval.scm:
   626:19  3 (_ #<directory (gnutls) 7ffff786d320>)
   223:20  2 (proc #<directory (gnutls) 7ffff786d320>)
In unknown file:
           1 (%resolve-variable (7 . protocol/ssl3) #<directory (gnu?>)
In ice-9/boot-9.scm:
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: protocol/ssl3
make[3]: *** [Makefile:1295: modules/gnutls/extra.go] Error 1
make[3]: Leaving directory '/tmp/guix-build-guile-gnutls-3.7.12.drv-0/guile-gnutls-3.7.12/guile'
make[2]: *** [Makefile:754: all-recursive] Error 1
make[2]: Leaving directory '/tmp/guix-build-guile-gnutls-3.7.12.drv-0/guile-gnutls-3.7.12/guile'
make[1]: *** [Makefile:471: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-guile-gnutls-3.7.12.drv-0/guile-gnutls-3.7.12'
make: *** [Makefile:403: all] Error 2
error: in phase 'build': uncaught exception: