GNU bug report logs - #44548
SBCL build system fails to pacakge cl-environments, generic-cl.

Previous Next

Package: guix;

Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>

Date: Tue, 10 Nov 2020 09:35:02 UTC

Severity: normal

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44548 in the body.
You can then email your comments to 44548 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 09:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 10 Nov 2020 09:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: bug-guix <at> gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>, Marius Bakke <marius <at> gnu.org>
Subject: SBCL build system fails to pacakge cl-environments, generic-cl.
Date: Tue, 10 Nov 2020 10:34:48 +0100
[Message part 1 (text/plain, inline)]
Hi!

I'm trying to package generic-cl on staging where the SBCL build system
has been revamped by Guillaume.

--8<---------------cut here---------------start------------->8---
(define-public sbcl-generic-cl
  (package
    (name "sbcl-generic-cl")
    (version "0.7.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/alex-gutev/generic-cl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1jjg1d221a667wacbrh7abswrkzq6c9qwapdfh0frzl0la9xjz2f"))))
    (build-system asdf-build-system/sbcl)
    (inputs
     `(("agutil" ,sbcl-agutil)
       ("alexandria" ,sbcl-alexandria)
       ("anaphora" ,sbcl-anaphora)
       ("arrows" ,sbcl-arrows)
       ("cl-custom-hash-table" ,sbcl-custom-hash-table)
       ("static-dispatch" ,sbcl-static-dispatch)
       ("trivia" ,sbcl-trivia)))
    (native-inputs
     `(("prove" ,sbcl-prove)))
    (home-page "https://alex-gutev.github.io/generic-cl/")
    (synopsis "")
    (description "")
    (license license:expat)))
--8<---------------cut here---------------end--------------->8---

It fails with

--8<---------------cut here---------------start------------->8---
; wrote /gnu/store/hkr132gc9ra2pnx16lbvl66pn86w11nx-sbcl-generic-cl-0.7.1/.cache/common-lisp/sbcl-2.0.10-linux-x64/gnu/store/d99q6jgx4xqw7fnk8vhb1xaqqc4h65fl-cl-environments-0.2.3-1.bbcd958/share/common-lisp/source/cl-environments/src/tools/types-tmp1CXFJSK9.fasl
; compilation finished in 0:00:00.012
Unhandled SB-INT:SIMPLE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                {1008248303}>:
  Error opening #P"/gnu/store/jzwgprixssmzm8yc76gh0ir1cw9myr4b-sbcl-static-dispatch-0.3-1.6243afc/lib/common-lisp/sbcl/static-dispatch/src/package-tmpX4BRKI0R.fasl":

    Permission denied
--8<---------------cut here---------------end--------------->8---

My suspicion is that generic-cl depends on sbcl-static-dispatch, which
depends on cl-environments, which is a _source_ package and not an SBCL package.

Indeed, I fail to package sbcl-cl-environments:

--8<---------------cut here---------------start------------->8---
(define-public sbcl-cl-environments
  (let ((commit "bbcd958a9ff23ce3e6ea5f8ee2edad9634819a3a")) ; No version in 2 years.
    (package
      (name "sbcl-cl-environments")
      (version (git-version "0.2.3" "1" commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/alex-gutev/cl-environments")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "1pfxl3vcdrb4mjy4q4c3c7q95kzv6rfjif3hzd5q91i9z621d64r"))))
      (build-system asdf-build-system/sbcl)
      (inputs
       `(("alexandria" ,sbcl-alexandria)
         ("anaphora" ,sbcl-anaphora)
         ("collectors" ,sbcl-collectors)
         ("optima" ,sbcl-optima)))
      (native-inputs
       `(("prove" ,sbcl-prove)))
      (home-page "https://github.com/alex-gutev/cl-environments")
      (synopsis "Implements the Common Lisp standard environment access API")
      (description "This library provides a uniform API, as specified in Common
Lisp the Language 2, for accessing information about variable and function
bindings from implementation-defined lexical environment objects.  All major
Common Lisp implementations are supported, even those which don't support the
CLTL2 environment access API.")
      (license license:expat))))
--8<---------------cut here---------------end--------------->8---

It errors out with

--8<---------------cut here---------------start------------->8---
; file: /gnu/store/xhgnh1yx8z999dx5qnxc0h3iwh1s836j-sbcl-cl-environments-0.2.3-1.bbcd958/share/common-lisp/sbcl/cl-environments/src/common/macro-util.lisp
; in: DEFMACRO! MATCH-STATE
;     (CL-ENVIRONMENTS.UTIL:LET-IF ((CL-ENVIRONMENTS.UTIL::START
;                                    (SECOND CL-ENVIRONMENTS.UTIL::STATES) :START)
;                                   (CL-ENVIRONMENTS.UTIL::BODY
;                                    (CDDR CL-ENVIRONMENTS.UTIL::STATES)
;                                    CL-ENVIRONMENTS.UTIL::STATES))
;         (EQ (FIRST CL-ENVIRONMENTS.UTIL::STATES) :START)
;       `(LABELS ((,CL-ENVIRONMENTS.UTIL::G!NEXT
;                     (,CL-ENVIRONMENTS.UTIL::FROM-STATE
;                      ,CL-ENVIRONMENTS.UTIL::G!FORCE ,CL-ENVIRONMENTS.UTIL::G!ARG)
;                   (OPTIMA:MULTIPLE-VALUE-MATCH #
;                     ,@#)))
;          (,CL-ENVIRONMENTS.UTIL::G!NEXT ,CL-ENVIRONMENTS.UTIL::START NIL
;           ,CL-ENVIRONMENTS.UTIL::ARG)))
; 
; caught ERROR:
;   during macroexpansion of
;   (LET-IF (# #)
;       (EQ # :START)
;     ...).
;   Use *BREAK-ON-SIGNALS* to intercept.
;   
;    The function CL-ENVIRONMENTS.UTIL::GENSYMS is undefined.
--8<---------------cut here---------------end--------------->8---

Guillaume, any clue what's going on?

--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 09:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 44548 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44548 <at> debbugs.gnu.org
Subject: Re: bug#44548: Acknowledgement (SBCL build system fails to pacakge
 cl-environments, generic-cl.)
Date: Tue, 10 Nov 2020 10:51:11 +0100
[Message part 1 (text/plain, inline)]
If I build manually it works:

--8<---------------cut here---------------start------------->8---
> sbcl --no-userinit
* (require :asdf)
("ASDF" "asdf" "UIOP" "uiop")

* (asdf:load-asd (truename "/gnu/store/pr52bqxa2kf1n8jadhzw4rjsl3jjk6yl-sbcl-cl-environments-0.2.3-1.bbcd958/share/common-lisp/sbcl/cl-environments/cl-environments.asd"))
#<ASDF/FIND-SYSTEM:DEFINE-OP >
#<ASDF/PLAN:SEQUENTIAL-PLAN {100287B6A3}>

* (asdf:compile-system "cl-environments")
WARNING: System definition file #P"/home/ambrevar/common-lisp/collectors/collectors.asd" contains definition for system "collectors-test". Please only define "collectors" and secondary systems with a name starting with "collectors/" (e.g. "collectors/test") in that file.
WARNING: System definition file #P"/gnu/store/n3sgz03ylnxprkbzj8f20zxvpldfxbcl-cl-symbol-munger-0.0.1-1.97598d4/share/common-lisp/source/cl-symbol-munger/symbol-munger.asd" contains definition for system "symbol-munger-test". Please only define "symbol-munger" and secondary systems with a name starting with "symbol-munger/" (e.g. "symbol-munger/test") in that file.
T
--8<---------------cut here---------------end--------------->8---

The above builds against a local version of collectors, not sure that's
related though.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 10:46:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: bug-guix <at> gnu.org, 44548 <at> debbugs.gnu.org
Subject: Re: bug#44548: Acknowledgement (SBCL build system fails to pacakge
 cl-environments, generic-cl.)
Date: Tue, 10 Nov 2020 11:45:37 +0100
[Message part 1 (text/plain, inline)]
It looks like the files in "src/common/" must be compiled in a specific
order because some files depend on others, but the system definition has
neither the ":depends-on xyx" nor the ":serial t" indications. It causes
the functions defined in "src/common/util.lisp" not being available when
compiling "src/common/macro-util.lisp".
I'm not sure why it fails with asdf-build-system/sbcl but it succeeds
with Quicklisp though; different versions of ASDF maybe, or slightly
different initialization of ASDF...

By adding the missing ":serial t" I was able to build sbcl-cl-environments:

--8<---------------cut here---------------start------------->8---
(define-public sbcl-cl-environments
  ;; TODO: asdf-build-system/sbcl fails here, why?  See if it works with the
  ;; build system revamp once staging is merged after 2020-11-09.
  (let ((commit "bbcd958a9ff23ce3e6ea5f8ee2edad9634819a3a")) ; No version in 2 years.
    (package
      (name "sbcl-cl-environments")
      (version (git-version "0.2.3" "1" commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/alex-gutev/cl-environments")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "1pfxl3vcdrb4mjy4q4c3c7q95kzv6rfjif3hzd5q91i9z621d64r"))))
      (build-system asdf-build-system/sbcl)
      (propagated-inputs
       `(("alexandria" ,sbcl-alexandria)
         ("anaphora" ,sbcl-anaphora)
         ("collectors" ,sbcl-collectors)
         ("optima" ,sbcl-optima)))
      (native-inputs
       `(("prove" ,sbcl-prove)))
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'fix-build
             (lambda _
               (substitute* "cl-environments.asd"
                 ((":module \"common\"" all)
                  (string-append all " :serial t")))
               #t)))))
      (home-page "https://github.com/alex-gutev/cl-environments")
      (synopsis "Implements the Common Lisp standard environment access API")
      (description "This library provides a uniform API, as specified in Common
Lisp the Language 2, for accessing information about variable and function
bindings from implementation-defined lexical environment objects.  All major
Common Lisp implementations are supported, even those which don't support the
CLTL2 environment access API.")
      (license license:expat))))
--8<---------------cut here---------------end--------------->8---
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 10:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 11:36:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: bug-guix <at> gnu.org, 44548 <at> debbugs.gnu.org
Subject: Re: bug#44548: Acknowledgement (SBCL build system fails to pacakge
 cl-environments, generic-cl.)
Date: Tue, 10 Nov 2020 12:34:56 +0100
[Message part 1 (text/plain, inline)]
Good catch!

It also does the trick for generic-cl:

--8<---------------cut here---------------start------------->8---
(arguments
 `(#:tests? #f
   #:phases
     (modify-phases %standard-phases
       (add-after 'unpack 'fix-compile-order
         (lambda _
           (substitute* "generic-cl.asd"
             ((":module \"src\"") ":module \"src\" :serial t")))))))
---------------cut here---------------end--------------->8---

I don't understand why it works outside our build system.
It works when I run SBCL locally, so technically with the same ASDF.

I'll ask upstream, maybe they have a clue.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 11:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 11:49:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: bug-guix <at> gnu.org, 44548 <at> debbugs.gnu.org
Subject: Re: bug#44548: Acknowledgement (SBCL build system fails to pacakge
 cl-environments, generic-cl.)
Date: Tue, 10 Nov 2020 12:47:55 +0100
[Message part 1 (text/plain, inline)]
Reported here: https://github.com/alex-gutev/generic-cl/issues/7

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44548; Package guix. (Tue, 10 Nov 2020 11:49:02 GMT) Full text and rfc822 format available.

Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Tue, 04 May 2021 13:02:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
bug acknowledged by developer. (Tue, 04 May 2021 13:02:02 GMT) Full text and rfc822 format available.

Message #31 received at 44548-done <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 44548-done <at> debbugs.gnu.org
Subject: Re: bug#44548: Acknowledgement (SBCL build system fails to pacakge
 cl-environments, generic-cl.)
Date: Tue, 04 May 2021 13:01:20 +0000
[Message part 1 (text/plain, inline)]
The cl-environments and generic-cl packages are currently in Guix
(36d4877041e0651d1af56b47127b8566c0fd0259).
Closing.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Jun 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 322 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.