From: rennes <rennes@openmailbox.org>
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: 26582@debbugs.gnu.org
Subject: bug#26582: [PATCH] gnu: pcre: Fix Check for Hurd systems.
Date: Thu, 20 Apr 2017 14:31:51 -0500 [thread overview]
Message-ID: <7cNcVrtMKJzzpdMgOTPW3i@Jrt62lb7BFa+Aa7uPD4Kw> (raw)
In-Reply-To: <e22f9c74-66f0-5340-a9c7-e88590f3bc96@gmail.com> (from manolis837@gmail.com on Thu Apr 20 09:08:01 2017)
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
Hi,
> Also this
>
> > ,@(if (hurd-triplet? ((or %current-system
> > %current-target-system)))
>
> should be this
>
> > ,@(if (hurd-triplet? (or (%current-system)
> > (%current-target-system)))
>
Fixed!
> Btw trying to build it with `./pre-inst-env guix build
> --target=i586-pc-gnu pcre' fails with
>
> ** Cannot --enable-pcregrep-libz because zlib.h was not found
>
> Maybe the inputs should become native-inputs?
I moved zlib and readline to 'native-inputs'.
Finally './pre-inst-env guix build pcre --target=i586-pc-gnu' built
successfully.
[-- Attachment #2: 0001-gnu-pcre-Fix-Check-for-Hurd-systems.patch --]
[-- Type: text/x-patch, Size: 4204 bytes --]
From 5eb24c23eba8c5d259e3a4c39e19ae1321c59863 Mon Sep 17 00:00:00 2001
From: rennes <rennes@openmailbox.org>
Date: Thu, 20 Apr 2017 13:58:57 -0500
Subject: [PATCH] gnu: pcre: Fix Check for Hurd systems.
* gnu/packages/pcre.scm (pcre)[arguments]: Add "--disable-stack-for-recursion".
(readline, zlib): Add 'native-inputs' field.
---
gnu/packages/pcre.scm | 51 +++++++++++++++++++++++++++++++++++++++------------
1 file changed, 39 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index 1946f5229..266f16ce5 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
(define-module (gnu packages pcre)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages hurd)
#:use-module (gnu packages readline)
#:use-module (gnu packages)
#:use-module (guix packages)
@@ -50,19 +52,44 @@
(outputs '("out" ;library & headers
"bin" ;depends on Readline (adds 20MiB to the closure)
"doc")) ;1.8 MiB of HTML
- (inputs `(("bzip2" ,bzip2)
- ("readline" ,readline)
- ("zlib" ,zlib)))
+ (inputs `(("bzip2" ,bzip2)))
+ (native-inputs
+ `(;; When cross-compiling with target i586-pc-gnu does not detect
+ ;; zlib/readline packages as input, then we need the packages
+ ;; as native inputs.
+ ("readline" ,readline)
+ ("zlib" ,zlib)))
(arguments
- '(#:disallowed-references ("doc")
- #:configure-flags '("--enable-utf"
- "--enable-pcregrep-libz"
- "--enable-pcregrep-libbz2"
- "--enable-pcretest-libreadline"
- "--enable-unicode-properties"
- "--enable-pcre16"
- "--enable-pcre32"
- "--enable-jit")))
+ `(#:disallowed-references ("doc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (assoc-ref outputs "bin"))
+ (doc (assoc-ref outputs "doc")))
+ (setenv "CONFIG_SHELL" (which "bash"))
+ (zero?
+ (system* "./configure"
+ (string-append "--prefix=" out)
+ (string-append "--bindir=" bin)
+ (string-append "--docdir=" doc)
+ "--enable-utf"
+ "--enable-pcregrep-libz"
+ "--enable-pcregrep-libbz2"
+ "--enable-pcretest-libreadline"
+ "--enable-unicode-properties"
+ "--enable-pcre16"
+ "--enable-pcre32"
+ "--enable-jit"
+ ;; On GNU/Hurd systems FAIL 'RunTest' with 'segmentation
+ ;; fault' in Check phase, to pass the test we can disable
+ ;; "--enable-jit" or set "--disable-stack-for-recursion"
+ ;; argument.
+ ,@(if (hurd-triplet? (or (%current-system)
+ ( %current-target-system)))
+ '("--disable-stack-for-recursion")
+ '())))))))))
(synopsis "Perl Compatible Regular Expressions")
(description
"The PCRE library is a set of functions that implement regular expression
--
2.12.0
next prev parent reply other threads:[~2017-04-20 19:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 5:12 bug#26575: [PATCH] gnu: pcre: Fix Check for Hurd systems rennes
2017-04-20 14:08 ` Manolis Ragkousis
2017-04-20 19:31 ` rennes [this message]
2017-04-20 21:27 ` bug#26582: " Ludovic Courtès
2017-04-21 2:38 ` rennes
2017-04-22 2:40 ` rennes
2017-04-22 22:13 ` Ludovic Courtès
2017-04-29 22:25 ` rennes
2017-05-01 13:34 ` rennes
2019-02-13 11:58 ` Manolis Ragkousis
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=7cNcVrtMKJzzpdMgOTPW3i@Jrt62lb7BFa+Aa7uPD4Kw \
--to=rennes@openmailbox.org \
--cc=26582@debbugs.gnu.org \
--cc=manolis837@gmail.com \
/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).