From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: icedtea-8: Hardcode dynamically loaded libraries. Date: Tue, 13 Sep 2016 13:25:31 +0200 Message-ID: <874m5k82j8.fsf@gnu.org> References: <87zini4d8h.fsf@member.fsf.org> <871t0sy206.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjlqQ-00073S-AK for guix-devel@gnu.org; Tue, 13 Sep 2016 07:25:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjlqK-00081u-73 for guix-devel@gnu.org; Tue, 13 Sep 2016 07:25:40 -0400 In-Reply-To: <871t0sy206.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Sat, 10 Sep 2016 09:31:05 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > From 1d0dce6f0c40fa35162ecb441b53b32f77dd5b8d Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?=3DE5=3DAE=3D8B=3DE6=3D96=3D87=3DE6=3DAD=3DA6?=3D > Date: Thu, 8 Sep 2016 23:25:23 +0800 > Subject: [PATCH] gnu: icedtea-8: Hardcode dynamically loaded libraries. > > Fixes . > > * gnu/packages/java.scm (icedtea-8)[arguments]: Add 'patch-jni-libs' phas= e. I=E2=80=99m 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 (=E2=80=9CLatin-1=E2=80=9D), which is a =E2=80=9Ccatch-all=E2=80=9D encodin= g (it=E2=80=99s an 8-bit encoding that covers the 256 values): (with-fluids ((%default-port-encoding "ISO-8859-1")) (substitute* file-in-arbitrary-ascii-compatible-encoding =E2=80=A6)) Ludo=E2=80=99.