unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: John Darrington <john@darrington.wattle.id.au>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org, John Darrington <jmd@gnu.org>
Subject: Re: [PATCH] gnu: Fix load-extension path in packaging of guile-ncurses.
Date: Tue, 20 Dec 2016 12:03:31 +0100	[thread overview]
Message-ID: <20161220110331.GA20543@jocasta.intra> (raw)
In-Reply-To: <87lgvb9ii1.fsf@netris.org>

[-- Attachment #1: Type: text/plain, Size: 2965 bytes --]

On Tue, Dec 20, 2016 at 02:17:42AM -0500, Mark H Weaver wrote:
     Hi John,
     
     John Darrington <jmd@gnu.org> writes:
     > * gnu/packages/guile.scm (guile-ncurses) [arguments]: Install shared object before
     > attempting to build the package.  Patch load-extension path before building instead
     > of after.
     
     The first sentence above is mistaken or misleading:
     
       "Install shared object before attempting to build the package."

How about I change it to "... attempting to build the rest of the package" ??

     > +         (add-before 'build 'fix-libguile-ncurses-file-name
     >             (lambda* (#:key outputs #:allow-other-keys)
     > - [...]
     > +             (and (zero? (system* "make" "install"
     > +                                  "-C" "src/ncurses"
     > +                                  "-j" (number->string
     > +                                        (parallel-job-count))))
     > +                  (let* ((out   (assoc-ref outputs "out"))
     > +                         (dir   "src/ncurses")
     > +                         (files (find-files dir ".scm")))
     > +                    (substitute* files
     > +                      (("\"libguile-ncurses\"")
     > +                       (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
     > +                               out)))
     > +                    #t)))))))
     
     By running "make install -C src/ncurses [...]", you are in fact causing
     most if not all of the package to be built and installed right here in
     the 'fix-libguile-ncurses-file-name' phase.

I didn't check to see what percentage of the package is contained in the 
src/ncurses directory, but it certainly isn't "all".

     This is no good.

Why do you think it is "no good"?  It may not be perfect, but it is better
than what we had before, and certainly fixes the problem.

     
     Can you help me understand what you're trying to do here, and why?
     
Sure (I would like to see a convention where such explanations are
put in the commit messaage, but I have previously been outvoted on
that issue):

The scheme code contains a number of procedures similar to 
(load-extension "libguile-ncurses" "func"). We need the first
string to contain the absolute path where the shared object is 
installed.   The previous version had done this by patching the 
.scm file post-installation.  However that meant that the compiled
.go file was compiled with the old, unmodified version.  
This patch ensures that the .scm files are patched first, and that
the .go files are built from the patched .scm files.

I hope this makes things clearer for you.

J'


-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-12-20 11:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 17:50 (unknown), John Darrington
2016-12-19 17:50 ` [PATCH] gnu: Fix load-extension path in packaging of guile-ncurses John Darrington
2016-12-19 21:17   ` Ludovic Courtès
2016-12-20  7:17   ` Mark H Weaver
2016-12-20 11:03     ` John Darrington [this message]
2016-12-20 14:16       ` John Darrington
2016-12-21  8:36       ` Danny Milosavljevic
2016-12-21  9:56         ` John Darrington
2016-12-22  5:56           ` Tobias Geerinckx-Rice
2016-12-22  8:20             ` John Darrington
2016-12-24 15:39               ` Mark H Weaver
2016-12-24 17:02                 ` John Darrington
2017-01-16  0:11                   ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161220110331.GA20543@jocasta.intra \
    --to=john@darrington.wattle.id.au \
    --cc=guix-devel@gnu.org \
    --cc=jmd@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).