GNU bug report logs - #32769
Packaging Next browser (Common Lisp) [work in progress]

Previous Next

Package: guix;

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

Date: Wed, 19 Sep 2018 07:16:02 UTC

Severity: normal

Tags: fixed

Done: Pierre Neidhardt <pierre <at> atlas.engineer>

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 32769 in the body.
You can then email your comments to 32769 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#32769; Package guix. (Wed, 19 Sep 2018 07:16:03 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. (Wed, 19 Sep 2018 07:16:03 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
Subject: Packaging Next browser (Common Lisp) [work in progress]
Date: Wed, 19 Sep 2018 09:15:33 +0200
[Message part 1 (text/plain, inline)]
I've started working on packaging a collection of Common Lisp
dependencies for Next browser:

http://next.atlas.engineer/

My progress can be found on the wip-next-browser branch.

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Wed, 10 Oct 2018 13:22:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 32769 <at> debbugs.gnu.org
Cc: Andy Patterson <ajpatter <at> uwaterloo.ca>
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Wed, 10 Oct 2018 15:21:26 +0200
[Message part 1 (text/plain, inline)]
The good news: all Next browser dependencies are now packaged under the
branch wip-nextbrowser.

The bad news: Next browser fails to build.

--8<---------------cut here---------------start------------->8---
; compiling file "/gnu/store/39vh5ghdn9x7zwb6ky7law678wkz20l2-next-browser-0.0.8-1.ccc289b/share/common-lisp/sbcl-source/next/gtk/next/source/document-mode.lisp" (written 10 OCT 2018 01:12:05 PM):
; compiling (IN-PACKAGE :NEXT)
; compiling (DEFVAR *DOCUMENT-MODE-MAP* ...)
; compiling (DEFCLASS DOCUMENT-MODE ...)
; compiling (DEFPARENSTATIC SCROLL-TO-TOP ...)
; compiling (DEFPARENSTATIC SCROLL-TO-BOTTOM ...)
; compiling (DEFPARENSTATIC SCROLL-DOWN ...)
; compiling (DEFPARENSTATIC SCROLL-UP ...)
; compiling (DEFPARENSTATIC SCROLL-LEFT ...)
; compiling (DEFPARENSTATIC SCROLL-RIGHT ...)
; compiling (DEFUN ENSURE-ZOOM-RATIO-RANGE ...)
; compiling (DEFPAREN %ZOOM-IN-PAGE ...)
; compiling (DEFINE-COMMAND ZOOM-IN-PAGE ...)
; compiling (DEFPAREN %ZOOM-OUT-PAGE ...)
; compiling (DEFINE-COMMAND ZOOM-OUT-PAGE ...)
; compiling (DEFPAREN %UNZOOM-PAGE ...)
; compiling (DEFINE-COMMAND UNZOOM-PAGE ...)
; compiling (DEFINE-COMMAND HISTORY-BACKWARDS ...)
; compiling (DEFINE-COMMAND HISTORY-FORWARDS ...)
; compiling (DEFUN HISTORY-FOWARDS-QUERY-COMPLETE ...)
; compiling (DEFINE-COMMAND HISTORY-FORWARDS-QUERY ...)
; compiling (DEFUN ADD-OR-TRAVERSE-HISTORY ...)
; compiling (DEFINE-COMMAND SET-URL-NEW-BUFFER ...)
; compiling (DEFUN SET-URL-BUFFER ...)
; compiling (DEFUN SET-URL-NEW-BUFFER ...)
; file: /gnu/store/39vh5ghdn9x7zwb6ky7law678wkz20l2-next-browser-0.0.8-1.ccc289b/share/common-lisp/sbcl-source/next/gtk/next/source/document-mode.lisp
; in: DEFUN SET-URL-NEW-BUFFER
;     (DEFUN NEXT::SET-URL-NEW-BUFFER
;            (NEXT::INPUT-URL &OPTIONAL NEXT::DISABLE-HISTORY)
;       (LET ((NEXT::NEW-BUFFER (NEXT::GENERATE-NEW-BUFFER "default" #)))
;         (NEXT::SET-VISIBLE-ACTIVE-BUFFER NEXT::NEW-BUFFER)
;         (NEXT::SET-URL-BUFFER NEXT::INPUT-URL NEXT::NEW-BUFFER
;          NEXT::DISABLE-HISTORY)))
; --> PROGN
; ==>
;   (EVAL-WHEN (:COMPILE-TOPLEVEL)
;     (SB-C:%COMPILER-DEFUN 'NEXT::SET-URL-NEW-BUFFER NIL T))
;
; caught WARNING:
;   Duplicate definition for SET-URL-NEW-BUFFER found in one file.
;   See also:
;     The ANSI Standard, Section 3.2.2.3

; compiling (DEFUN SETUP-URL ...)
; compiling (DEFUN SET-URL ...)
; compiling (DEFINE-COMMAND SET-URL-CURRENT-BUFFER ...)
; compiling (DEFINE-COMMAND SET-URL-FROM-BOOKMARK ...)
; compiling (DEFUN SETUP-ANCHOR ...)
; compiling (DEFINE-COMMAND GO-ANCHOR ...)
; compiling (DEFINE-COMMAND GO-ANCHOR-NEW-BUFFER ...)
; compiling (DEFINE-COMMAND GO-ANCHOR-NEW-BUFFER-FOCUS ...)
; compiling (DEFUN DOCUMENT-MODE ...)
; compiling (DEFMETHOD SETUP ...)

; /gnu/store/39vh5ghdn9x7zwb6ky7law678wkz20l2-next-browser-0.0.8-1.ccc289b/lib/sbcl/next/source/document-mode-tmpOPCILR65.fasl written
; compilation finished in 0:00:00.058
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                          {10005585B3}>:
  COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "next" "document-mode">

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005585B3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {1004DDACA3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {1004DDACA3}>)
2: (INVOKE-DEBUGGER #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {1004DDACA3}>)
3: (ERROR UIOP/LISP-BUILD:COMPILE-FILE-ERROR :CONTEXT-FORMAT "~/asdf-action::format-action/" :CONTEXT-ARGUMENTS ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "next" "document-mode">)))
4: (UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "next" "document-mode">)))
5: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "next" "document-mode">)
6: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
7: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "next" "document-mode">) [fast-method]
8: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1002497DE3}>) [fast-method]
9: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
10: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1002497DE3}>) [fast-method]
11: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/BUNDLE:COMPILE-BUNDLE-OP > #<ASDF/SYSTEM:SYSTEM "next/gtk"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
12: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/BUNDLE:COMPILE-BUNDLE-OP > #<ASDF/SYSTEM:SYSTEM "next/gtk">)
13: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
14: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/BUNDLE:COMPILE-BUNDLE-OP > #<ASDF/SYSTEM:SYSTEM "next/gtk">) [fast-method]
15: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/BUNDLE:COMPILE-BUNDLE-OP "next/gtk")
16: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
17: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/BUNDLE:COMPILE-BUNDLE-OP "next/gtk") [fast-method]
18: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<CLOSURE (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {1002351FBB}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
19: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
20: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<CLOSURE (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {1004329D1B}> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
21: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/BUNDLE:COMPILE-BUNDLE-OP "next/gtk") [fast-method]
22: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/OPERATE:OPERATE (QUOTE ASDF/BUNDLE:COMPILE-BUNDLE-OP) "next/gtk") #<NULL-LEXENV>)
23: (EVAL (ASDF/OPERATE:OPERATE (QUOTE ASDF/BUNDLE:COMPILE-BUNDLE-OP) "next/gtk"))
24: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(require :asdf)") (:EVAL . "(let ((*package* (find-package :asdf))) (load \"/gnu/store/39vh5ghdn9x7zwb6ky7law678wkz20l2-next-browser-0.0.8-1.ccc289b/share/common-lisp/sbcl-source/next/gtk/next/next.asd\"))") (:EVAL . "(asdf:operate (quote asdf:compile-bundle-op) \"next/gtk\")") (:QUIT)))
25: (SB-IMPL::TOPLEVEL-INIT)
26: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
27: ((FLET "WITHOUT-INTERRUPTS-BODY-27" :IN SAVE-LISP-AND-DIE))
28: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))

unhandled condition in --disable-debugger mode, quitting
;
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 1 WARNING condition
;   caught 8 STYLE-WARNING conditions
Backtrace:
           7 (primitive-load "/gnu/store/6v5dy1rnk8m3h154q4c8mjwgq7y…")
In ice-9/eval.scm:
   191:35  6 (_ _)
In ice-9/boot-9.scm:
    152:2  5 (with-fluid* _ _ _)
    152:2  4 (with-fluid* _ _ _)
In srfi/srfi-1.scm:
    640:9  3 (for-each #<procedure 98e3a0 at /gnu/store/k4nbgbgygrv…> …)
In /gnu/store/k4nbgbgygrv0lk97d5phx8fwrxr0ah9r-module-import/guix/build/gnu-build-system.scm:
   799:31  2 (_ _)
In /gnu/store/k4nbgbgygrv0lk97d5phx8fwrxr0ah9r-module-import/guix/build/asdf-build-system.scm:
    124:4  1 (build #:outputs _ #:inputs _ #:asd-file _ # _)
In unknown file:
           0 (scm-error misc-error #f "~A ~S ~S" ("lisp-eval-pro…" …) …)

ERROR: In procedure scm-error:
lisp-eval-program failed! "/gnu/store/rdvy6q3nskb0r01rwjrxj3935d850r2d-sbcl-1.4.4/bin/sbcl" ((require :asdf) (let ((*package* (find-package :asdf))) (load "/gnu/store/39vh5ghdn9x7zwb6ky7law678wkz20l2-next-browser-0.0.8-1.ccc289b/share/common-lisp/sbcl-source/next/gtk/next/next.asd")) (asdf:operate (quote asdf:compile-bundle-op) "next/gtk"))
--8<---------------cut here---------------end--------------->8---

Andy, any clue on this?

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Thu, 11 Oct 2018 07:18:02 GMT) Full text and rfc822 format available.

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

From: Andy Patterson <ajpatter <at> uwaterloo.ca>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Thu, 11 Oct 2018 03:16:49 -0400
Hi,

On Wed, 10 Oct 2018 15:21:26 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> The good news: all Next browser dependencies are now packaged under
> the branch wip-nextbrowser.
> 
> The bad news: Next browser fails to build.
> 
> [...]
> 
> Andy, any clue on this?

It's probably the

> ; caught WARNING:
> ;   Duplicate definition for SET-URL-NEW-BUFFER found in one file.

since sbcl (at least on guix?) treats some warnings as errors for some
reason.

Hoping that helps,

--
Andy





Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Thu, 11 Oct 2018 08:51:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Thu, 11 Oct 2018 10:50:06 +0200
[Message part 1 (text/plain, inline)]
I'll try this.  Note that Next builds fine via Quicklisp.  Any idea why?

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Thu, 11 Oct 2018 10:45:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Thu, 11 Oct 2018 12:44:43 +0200
[Message part 1 (text/plain, inline)]
You were right, this was the issue.  I've posted a patch upstream, it should be
fixed soon.

Now Next compiles.  Hurray!!! :D

There is one last step though: the .asd bunble works, but not the
"build-program".
See the wip-nextbrowser for what I've tried.  I've re-used the code from
Stumpwm.

I narrowed down the issue to the "generate-executable" function:

--8<---------------cut here---------------start------------->8---
define* (generate-executable out-file #:key
                              dependencies
                              dependency-prefixes
                              entry-program
                              type
                              #:allow-other-keys)
  "Generate an executable by using asdf operation TYPE, containing whithin the
image all DEPENDENCIES, and running ENTRY-PROGRAM in the case of an
executable.  Link in any asd files from DEPENDENCY-PREFIXES to ensure
references to those libraries are retained."
  let* ((bin-directory (dirname out-file))
         (name (basename out-file)))
    (mkdir-p bin-directory)
    (with-directory-excursion bin-directory
      (generate-executable-wrapper-system name dependencies)
      (generate-executable-entry-point name entry-program))
			...
--8<---------------cut here---------------end--------------->8---

The problem is that Next's system is called "next/gtk", but we cannot use that
as an out-file.  If I use something else, say "next", then compilation fails
with

--8<---------------cut here---------------start------------->8---
  Component :NEXT not found, required by #<SYSTEM "next-exec">
--8<---------------cut here---------------end--------------->8---

I guess there is a flaw in the logic here.  The system name should be

	#:asd-system-name

and not

	(name (basename out-file))

What shall we do?

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Fri, 12 Oct 2018 05:52:02 GMT) Full text and rfc822 format available.

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

From: Andy Patterson <ajpatter <at> uwaterloo.ca>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Fri, 12 Oct 2018 01:51:20 -0400
Hi Pierre,

On Thu, 11 Oct 2018 12:44:43 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> You were right, this was the issue.  I've posted a patch upstream, it
> should be fixed soon.
> 
> Now Next compiles.  Hurray!!! :D

Nice.

> 
> There is one last step though: the .asd bunble works, but not the
> "build-program".
> See the wip-nextbrowser for what I've tried.  I've re-used the code
> from Stumpwm.
> 
> I narrowed down the issue to the "generate-executable" function:
> 
> [...]
> 
> The problem is that Next's system is called "next/gtk", but we cannot
> use that as an out-file.  If I use something else, say "next", then
> compilation fails with
> 
> --8<---------------cut here---------------start------------->8---
>   Component :NEXT not found, required by #<SYSTEM "next-exec">
> --8<---------------cut here---------------end--------------->8---
> 
> I guess there is a flaw in the logic here.  The system name should be
> 
> 	#:asd-system-name
> 
> and not
> 
> 	(name (basename out-file))
> 
> What shall we do?
> 

That seems right.  I guess we'll need to update that and then maybe
also normalize the generated asd.  Doesn't seem like it'd be too
difficult; there just weren't enough examples of program-generating
systems for this to get caught.

Thanks for the update,

--
Andy




Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Fri, 12 Oct 2018 06:45:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Fri, 12 Oct 2018 08:44:35 +0200
[Message part 1 (text/plain, inline)]
Let me know if you'd like to do it or if I should give it a shot :)

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Fri, 12 Oct 2018 22:26:02 GMT) Full text and rfc822 format available.

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

From: Andy Patterson <ajpatter <at> uwaterloo.ca>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Fri, 12 Oct 2018 18:25:10 -0400
Hi,

On Fri, 12 Oct 2018 08:44:35 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> Let me know if you'd like to do it or if I should give it a shot :)
> 

Please feel free.  I'll probably get around to it this weekend if you
don't have time before then, if that's ok with you.

Thanks,

--
Andy




Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Sun, 14 Oct 2018 08:28:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Sun, 14 Oct 2018 10:27:46 +0200
[Message part 1 (text/plain, inline)]
I won't have time this weekend, so you can go ahead.  Otherwise I'll do it next
week.

Cheers!

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Mon, 15 Oct 2018 06:06:02 GMT) Full text and rfc822 format available.

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

From: Andy Patterson <ajpatter <at> uwaterloo.ca>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Mon, 15 Oct 2018 02:05:05 -0400
Hi Pierre,

On Sun, 14 Oct 2018 10:27:46 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> I won't have time this weekend, so you can go ahead.  Otherwise I'll
> do it next week.

I investigated the problem and I think the build-program procedure is
ok.  It has the option to specify which dependencies you want (maybe
that's what you used?), and I think that's the right option.

You said that you'd tried passing "next" in some way - in this case the
system that the executable will depend on is "next-gtk".  There's a
couple of things here - firstly we need a system for "next" and a
separate one for "next/gtk".  The other is that the resulting systems
will be normalized, so we'll end up with "next-gtk" as the system that
we want to use a dependency for the next-browser executable.

I made these changes and found that I still had problems building
next.  I managed to figure out that it's because next exercises some
less common asd options which makes the bundle that it outputs not
conform to the expectations of the build system.  We'll have to make
some changes to accommodate that, but for now, here's a patch that makes
next build.

I wasn't able to really test whether or not it works - it throws an
exception whenever I press a key.  I was able to find out that its
*active-buffer* variable is nil, which it expects not to be.  If you
want to debug the problems, I recommend doing something like 

$ guix environment --ad-hoc sbcl sbcl-slynk:image next-browser:lib &&
slynk.image
* (slynk:create-server :port 4545)

and then connecting from sly.  You might also pass
(sb-ext:enable-debugger) to the entry program if you prefer that
interface but I haven't tried.  You can then run

|> (asdf:load-system 'next-gtk)
|> (next:start)

to get started.

Hoping that helps,

--
Andy

From 452bb2919ab1db6d819973d655407b1a335b2741 Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter <at> uwaterloo.ca>
Date: Mon, 15 Oct 2018 01:59:25 -0400
Subject: [PATCH] gnu: next-browser: Fix the build.

* gnu/packages/web-browsers.scm (next-browser-core): New variable.
(next-browser): Inherit from next-browser-core.
---
 gnu/packages/lisp.scm         |  1 +
 gnu/packages/web-browsers.scm | 59 ++++++++++++++++++++++++-----------
 2 files changed, 42 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index fcd3156a7..1b390b66d 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -30,6 +30,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix hg-download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 0df9180d7..c6844c868 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -25,6 +25,7 @@
 (define-module (gnu packages web-browsers)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -324,10 +325,10 @@ access.")
 GUI.  It is based on PyQt5 and QtWebKit.")
     (license license:gpl3+)))
 
-(define-public next-browser
+(define-public next-browser-core
   (let ((commit "ccc289b44610ada4ae9c875910af7720e85b546b"))
     (package
-      (name "next-browser")
+      (name "next-browser-core")
       (version (git-version "0.0.8" "1" commit))
       (source (origin
                 (method git-fetch)
@@ -338,11 +339,11 @@ GUI.  It is based on PyQt5 and QtWebKit.")
                  (search-patches "next-fix-duplicate-function.patch"))
                 (sha256
                  (base32
-                  "1pcpb274zb0qm26rrglgcgzg2d2v7j2aja5685swwyq9rcqlbdf4"))))
+                  "0rccs9w49p577l12kgykccxrjkr03rf1cfz9mvxbjzc8g82dya2k"))
+                (file-name (git-file-name name version))))
       (build-system asdf-build-system/sbcl)
       ;; TODO: Move Common Lisp libraries to "native-inputs"?
       ;; TODO: Does runtime depends on gsettings-desktop-schemas and glib-networking?
-      (outputs '("out" "lib"))
       (inputs
        `(("alexandria" ,sbcl-alexandria)
          ("cl-strings" ,sbcl-cl-strings)
@@ -352,26 +353,48 @@ GUI.  It is based on PyQt5 and QtWebKit.")
          ("cl-sqlite" ,sbcl-cl-sqlite)
          ("parenscript" ,sbcl-parenscript)
          ("cl-json" ,sbcl-cl-json)
-         ("unix-opts" ,sbcl-unix-opts)
-         ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk)
-         ("cl-webkit" ,sbcl-cl-webkit)
-         ("lparallel" ,sbcl-lparallel)))
+         ("unix-opts" ,sbcl-unix-opts)))
       (arguments
        `( ;; #:tests? #f
          #:asd-file "next/next.asd"
-         #:asd-system-name "next/gtk"
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'create-symlinks 'build-program
-             (lambda* (#:key outputs #:allow-other-keys)
-               (build-program
-                (string-append (assoc-ref outputs "out") "/bin/next-browser")
-                outputs
-                #:entry-program '((next:start) 0)))))
-         ))
+         #:asd-system-name "next"))
       (home-page "http://next.atlas.engineer/")
       (synopsis "Emacs-inspired web browser in extensible in Common Lisp")
       (description "Next is a keyboard-oriented, extensible web-browser inspired
 by Emacs and designed for power users.  The application has familiar
 key-bindings, is fully configurable and extensible in Lisp.")
       (license license:expat))))
+
+(define-public next-browser
+  (package
+    (inherit next-browser-core)
+    (name "next-browser")
+    (outputs '("out" "lib"))
+    (inputs
+     `(("next" ,next-browser-core)
+       ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk)
+       ("cl-webkit" ,sbcl-cl-webkit)
+       ("lparallel" ,sbcl-lparallel)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments next-browser-core)
+       ((#:asd-system-name _ #f) "next/gtk")
+       ((#:phases phases '%standard-phases)
+        `(modify-phases ,phases
+           (add-before 'cleanup 'move-bundle
+             (lambda* (#:key outputs #:allow-other-keys)
+               (define lib (assoc-ref outputs "lib"))
+               (define actual-fasl (string-append
+                                    lib
+                                    "/lib/sbcl/next/source/next-gtk.fasl"))
+               (define expected-fasl (string-append
+                                      lib
+                                      "/lib/sbcl/gtk--system.fasl"))
+               (copy-file actual-fasl expected-fasl)
+               #t))
+           (add-after 'create-symlinks 'build-program
+             (lambda* (#:key outputs #:allow-other-keys)
+               (build-program
+                (string-append (assoc-ref outputs "out") "/bin/next-browser")
+                outputs
+                #:entry-program '((next:start) 0)
+                #:dependencies '("next-gtk"))))))))))
-- 
2.19.1





Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Mon, 15 Oct 2018 09:35:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Mon, 15 Oct 2018 11:34:14 +0200
[Message part 1 (text/plain, inline)]
Hi Andy!

Thanks for the hard work, this is pretty elegant indeed!

Question: do we need both "out" and "lib" outputs?
My understanding is that "lib" is useful when one wants to start the program
from a REPL.  Correct?

> I wasn't able to really test whether or not it works - it throws an
> exception whenever I press a key.

Same here.  It does not do that when built manually with Quicklisp.  Although I
recall seeing something similar when building manually with the wrong arguments.

I also suspect that some CFFI dependency (gtk?) is not packaged correctly and
some paths are missing.

I'll look into it.

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Mon, 15 Oct 2018 10:05:04 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Mon, 15 Oct 2018 12:04:14 +0200
[Message part 1 (text/plain, inline)]
It could also be a dependency version that's different from the one pulled by
Quicklisp.

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

Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Tue, 16 Oct 2018 03:12:01 GMT) Full text and rfc822 format available.

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

From: Andy Patterson <ajpatter <at> uwaterloo.ca>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Mon, 15 Oct 2018 23:11:20 -0400
Hi Pierre,

On Mon, 15 Oct 2018 11:34:14 +0200
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> Question: do we need both "out" and "lib" outputs?
> My understanding is that "lib" is useful when one wants to start the
> program from a REPL.  Correct?

"out" will always depend on "lib" for programs.  We want to build it
the same way as other systems so that all of the source for the
program remains inspect-able at run-time, even if it's just a
one-liner.

--
Andy




Information forwarded to bug-guix <at> gnu.org:
bug#32769; Package guix. (Fri, 19 Oct 2018 16:06:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Andy Patterson <ajpatter <at> uwaterloo.ca>
Cc: 32769 <at> debbugs.gnu.org
Subject: Re: bug#32769: Packaging Next browser (Common Lisp) [work in progress]
Date: Fri, 19 Oct 2018 18:05:17 +0200
[Message part 1 (text/plain, inline)]
I haven't managed to figure what's happening.  According to John Mercouris (Next
developer), the state of CFFI-GTK is rather poor and it will be hard to track
down exactly what's wrong.

Next browser will soon move to another interface which does not rely on cffi-gtk
so it won't be a problem.

Andy, if you have an immediate solution, feel free to chime in, otherwise Next
will have to wait a few more weeks before hitting the Guix repository.

I've merged all the 78 (?) new Lisp packages onto master.
I've moved the Next package draft to wip-next-browser3.

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

Added tag(s) fixed. Request was from Pierre Neidhardt <pierre <at> atlas.engineer> to control <at> debbugs.gnu.org. (Sun, 02 Dec 2018 17:49:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 32769 <at> debbugs.gnu.org and Pierre Neidhardt <mail <at> ambrevar.xyz> Request was from Pierre Neidhardt <pierre <at> atlas.engineer> to control <at> debbugs.gnu.org. (Sun, 02 Dec 2018 17:49:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 31 Dec 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 118 days ago.

Previous Next


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