From: ludo@gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong@member.fsf.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: icedtea-8: Hardcode dynamically loaded libraries.
Date: Tue, 13 Sep 2016 13:25:31 +0200 [thread overview]
Message-ID: <874m5k82j8.fsf@gnu.org> (raw)
In-Reply-To: <871t0sy206.fsf@member.fsf.org> ("宋文武"'s message of "Sat, 10 Sep 2016 09:31:05 +0800")
iyzsong@member.fsf.org (宋文武) skribis:
> From 1d0dce6f0c40fa35162ecb441b53b32f77dd5b8d Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
> Date: Thu, 8 Sep 2016 23:25:23 +0800
> Subject: [PATCH] gnu: icedtea-8: Hardcode dynamically loaded libraries.
>
> Fixes <https://bugs.gnu.org/24327>.
>
> * gnu/packages/java.scm (icedtea-8)[arguments]: Add 'patch-jni-libs' phase.
I’m a bit late, but thanks for fixing it!
> + (lambda (file)
> + (catch 'encoding-error
> + (lambda ()
> + (substitute* file
> + (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
> + _ name version)
> + (format #f "\"~a\"" (find-library name)))
> + (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
> + (format #f "\"~a\"" (find-library name)))))
> + (lambda _
> + ;; Those are safe to skip.
> + (format (current-error-port)
> + "warning: failed to substitute: ~a~%"
> + file))))
What often works in such cases is to force ISO-8859-1 encoding
(“Latin-1”), which is a “catch-all” encoding (it’s an 8-bit encoding
that covers the 256 values):
(with-fluids ((%default-port-encoding "ISO-8859-1"))
(substitute* file-in-arbitrary-ascii-compatible-encoding
…))
Ludo’.
next prev parent reply other threads:[~2016-09-13 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 15:34 [PATCH] gnu: icedtea: Patch dynamically loaded libraries with absolute paths 宋文武
2016-09-10 1:31 ` [PATCH] gnu: icedtea-8: Hardcode dynamically loaded libraries 宋文武
2016-09-13 11:25 ` Ludovic Courtès [this message]
2016-09-14 9:05 ` 宋文武
2016-09-14 14:50 ` Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874m5k82j8.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=iyzsong@member.fsf.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.