Core-updates timeline (was: Re: [PATCH 2/2] gnu: perl: Enable threading support.)
On Sat, Oct 01, 2016 at 03:22:36PM +0200, Ludovic Courtès wrote: > I pushed simplified versions of these two patches as > 56ee1d2015e9b2c55d34f19c70b06eefe8a20c76 and > 156c0810e936413ac554e2883343b3b40695cfdc. > > I think this was the last non-bug-fix change for this core-updates > cycle. :-) Cool :) I've been waiting for libarchive 3.2.2 [0] so that I can graft it on master and ungraft it on core-updates. But, I can try cherry-picking the most important changes today. When do you hope to freeze core-updates? Do you want me to try cherry-picking? https://github.com/libarchive/libarchive/milestone/4
Re: [PATCH 2/2] gnu: perl: Enable threading support.
Hi Ben, Ben Woodcroft skribis: > From c61c799da21f349c739f9d094d348ae429a91ffc Mon Sep 17 00:00:00 2001 > From: Ben Woodcroft > Date: Sat, 24 Sep 2016 22:44:55 +1000 > Subject: [PATCH 1/2] gnu: perl: Use configure-flags. > > * gnu/packages/perl.scm (perl)[arguments]: Use configure-flags. [...] > From d382e48d801406897c27b045ab1feb20cfec6db4 Mon Sep 17 00:00:00 2001 > From: Ben Woodcroft > Date: Sat, 24 Sep 2016 23:22:54 +1000 > Subject: [PATCH 2/2] gnu: perl: Enable threading support. > > * gnu/packages/perl.scm (perl)[arguments]: Configure with '-Dusethreads'. > * gnu/packages/commencement.scm (perl-boot0)[arguments]: Omit inherited > '-Dusethreads' flag during configure. I pushed simplified versions of these two patches as 56ee1d2015e9b2c55d34f19c70b06eefe8a20c76 and 156c0810e936413ac554e2883343b3b40695cfdc. I think this was the last non-bug-fix change for this core-updates cycle. :-) Thanks! Ludo’.
Re: [PATCH 2/2] gnu: perl: Enable threading support.
On 24/09/16 15:05, Ludovic Courtès wrote: Ben Woodcroft skribis: * gnu/packages/perl.scm (perl)[arguments]: Enable threading support. * gnu/packages/commencement.scm (perl-boot0): Do not inherit 'configure' phase from perl. [...] "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" "-Duseshrplib" +"-Dusethreads" Is -Dusethreads really needed? I thought the default behavior was to build pthread support if ./Configure detects it. That would greatly simplify things. Afraid so. On master: $ ./pre-inst-env guix environment -C --ad-hoc perl -- perl -e 'use threads' This Perl not built to support threads Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. If not, a variant of what Eric suggests would be to honor #:configure-flags in this phase, such that all you need is to provide different #:configure-flags in perl-boot0. I like this approach as it is it more general. Attached a 2-in-1 patch to implement it. HTH! Indeed, good idea thanks. ben >From c61c799da21f349c739f9d094d348ae429a91ffc Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 24 Sep 2016 22:44:55 +1000 Subject: [PATCH 1/2] gnu: perl: Use configure-flags. * gnu/packages/perl.scm (perl)[arguments]: Use configure-flags. --- gnu/packages/perl.scm | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index f0c4e36..aea05dd 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -60,6 +60,19 @@ (build-system gnu-build-system) (arguments '(#:tests? #f + #:configure-flags + (let ((out (assoc-ref %outputs "out")) + (libc (assoc-ref %build-inputs "libc"))) + (list + (string-append "-Dprefix=" out) + (string-append "-Dman1dir=" out "/share/man/man1") + (string-append "-Dman3dir=" out "/share/man/man3") + "-de" "-Dcc=gcc" + "-Uinstallusrbinperl" + "-Dinstallstyle=lib/perl5" + "-Duseshrplib" + (string-append "-Dlocincpth=" libc "/include") + (string-append "-Dloclibpth=" libc "/lib"))) #:phases (modify-phases %standard-phases (add-before 'configure 'setup-configure @@ -77,21 +90,9 @@ #t)) (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) -(let ((out (assoc-ref outputs "out")) - (libc (assoc-ref inputs "libc"))) - (zero? - (system* "./Configure" -(string-append "-Dprefix=" out) -(string-append "-Dman1dir=" out "/share/man/man1") -(string-append "-Dman3dir=" out "/share/man/man3") -"-de" "-Dcc=gcc" -"-Uinstallusrbinperl" -"-Dinstallstyle=lib/perl5" -"-Duseshrplib" -(string-append "-Dlocincpth=" libc "/include") -(string-append "-Dloclibpth=" libc "/lib")) - + (lambda* (#:key configure-flags #:allow-other-keys) + (zero? (apply system* (append (list "./Configure") + configure-flags) (add-before 'strip 'make-shared-objects-writable (lambda* (#:key outputs #:allow-other-keys) -- 2.10.0 >From d382e48d801406897c27b045ab1feb20cfec6db4 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 24 Sep 2016 23:22:54 +1000 Subject: [PATCH 2/2] gnu: perl: Enable threading support. * gnu/packages/perl.scm (perl)[arguments]: Configure with '-Dusethreads'. * gnu/packages/commencement.scm (perl-boot0)[arguments]: Omit inherited '-Dusethreads' flag during configure. --- gnu/packages/commencement.scm | 32 gnu/packages/perl.scm | 3 ++- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 8f1ecf8..61df290 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -275,18 +275,26 @@ (replacement #f) (arguments ;; At the very least, this must not depend on GCC & co. - (let ((args `(#:disallowed-references - ,(list %bootstrap-binutils
Re: [PATCH 2/2] gnu: perl: Enable threading support.
Ben Woodcroft skribis: > * gnu/packages/perl.scm (perl)[arguments]: Enable threading support. > * gnu/packages/commencement.scm (perl-boot0): Do not inherit 'configure' > phase from perl. [...] > "-Uinstallusrbinperl" > "-Dinstallstyle=lib/perl5" > "-Duseshrplib" > +"-Dusethreads" Is -Dusethreads really needed? I thought the default behavior was to build pthread support if ./Configure detects it. That would greatly simplify things. If not, a variant of what Eric suggests would be to honor #:configure-flags in this phase, such that all you need is to provide different #:configure-flags in perl-boot0. HTH! Ludo’.
[PATCH 2/2] gnu: perl: Enable threading support.
* gnu/packages/perl.scm (perl)[arguments]: Enable threading support. * gnu/packages/commencement.scm (perl-boot0): Do not inherit 'configure' phase from perl. --- gnu/packages/commencement.scm | 57 +-- gnu/packages/perl.scm | 4 +++ 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 8f1ecf8..60822a9 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2016 Ben Woodcroft ;;; ;;; This file is part of GNU Guix. ;;; @@ -269,24 +270,44 @@ (package-native-inputs gcc)) (define perl-boot0 - (let ((perl (package -(inherit perl) -(name "perl-boot0") -(replacement #f) -(arguments - ;; At the very least, this must not depend on GCC & co. - (let ((args `(#:disallowed-references - ,(list %bootstrap-binutils - (substitute-keyword-arguments (package-arguments perl) - ((#:phases phases) - `(modify-phases ,phases - ;; Pthread support is missing in the bootstrap compiler - ;; (broken spec file), so disable it. - (add-before 'configure 'disable-pthreads - (lambda _ - (substitute* "Configure" - (("^libswanted=(.*)pthread" _ before) -(string-append "libswanted=" before) + (let ((perl + (package + (inherit perl) + (name "perl-boot0") + (replacement #f) + (arguments +;; At the very least, this must not depend on GCC & co. +(let ((args `(#:disallowed-references + ,(list %bootstrap-binutils + (substitute-keyword-arguments (package-arguments perl) +((#:phases phases) + `(modify-phases ,phases +;; Pthread support is missing in the bootstrap compiler +;; (broken spec file), so disable it. +(add-before 'configure 'disable-pthreads + (lambda _ +(substitute* "Configure" + (("^libswanted=(.*)pthread" _ before) + (string-append "libswanted=" before) + ;; This phase is largely shared with 'perl' but we + ;; configure without threading support. +(replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) +(let ((out (assoc-ref outputs "out")) + (libc (assoc-ref inputs "libc"))) + (zero? + (system* +"./Configure" +(string-append "-Dprefix=" out) +(string-append "-Dman1dir=" out "/share/man/man1") +(string-append "-Dman3dir=" out "/share/man/man3") +"-de" "-Dcc=gcc" +"-Uinstallusrbinperl" +"-Dinstallstyle=lib/perl5" +"-Duseshrplib" +(string-append "-Dlocincpth=" libc "/include") +(string-append "-Dloclibpth=" libc + "/lib")) (package-with-bootstrap-guile (package-with-explicit-inputs perl %boot0-inputs diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index f0c4e36..273e4d0 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -77,6 +77,9 @@ #t)) (replace 'configure + ;; This configure phase is largely shared with 'perl-boot0', so if + ;; changes are made in this phase they may also be applicable + ;; there. (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (libc (assoc-ref inputs "libc"))) @@ -89,6 +92,7 @@ "-Uinstallusrbinperl" "-Dinstallstyle=lib/perl5" "-Duseshrplib" +"-Dusethreads" (string-append "-Dlocincpth=" libc "/include") (string-append "-Dloclibpth=" libc "/lib")) -- 2.10.0