From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OBLYI+u7JWCiLwAA0tVLHw (envelope-from ) for ; Thu, 11 Feb 2021 23:21:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id XNhxH+u7JWDQVgAAbx9fmQ (envelope-from ) for ; Thu, 11 Feb 2021 23:21:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0A9C59404E1 for ; Thu, 11 Feb 2021 23:21:15 +0000 (UTC) Received: from localhost ([::1]:40412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lALGr-00034i-Vl for larch@yhetil.org; Thu, 11 Feb 2021 18:21:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lALGg-00033v-KR for guix-patches@gnu.org; Thu, 11 Feb 2021 18:21:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lALGg-0006I4-Cz for guix-patches@gnu.org; Thu, 11 Feb 2021 18:21:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lALGg-0001HE-9p for guix-patches@gnu.org; Thu, 11 Feb 2021 18:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46451] [PATCH 2/2] gnu: openjdk11: Add phase to hardcode libraries. Resent-From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Feb 2021 23:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46451 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46451@debbugs.gnu.org Received: via spool by 46451-submit@debbugs.gnu.org id=B46451.16130856564870 (code B ref 46451); Thu, 11 Feb 2021 23:21:02 +0000 Received: (at 46451) by debbugs.gnu.org; 11 Feb 2021 23:20:56 +0000 Received: from localhost ([127.0.0.1]:59540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lALGa-0001GT-Eg for submit@debbugs.gnu.org; Thu, 11 Feb 2021 18:20:56 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:33532 helo=bjoernhoefling.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lALGY-0001GF-Hm for 46451@debbugs.gnu.org; Thu, 11 Feb 2021 18:20:55 -0500 Received: from alma-ubu.fritz.box (pd951f307.dip0.t-ipconnect.de [217.81.243.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 0D86C3FC05 for <46451@debbugs.gnu.org>; Fri, 12 Feb 2021 00:20:54 +0100 (CET) Date: Fri, 12 Feb 2021 00:20:53 +0100 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Message-ID: <20210212002053.30ef8ea9@alma-ubu.fritz.box> In-Reply-To: <20210212001405.48cabc72@alma-ubu.fritz.box> References: <20210212001405.48cabc72@alma-ubu.fritz.box> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/dT.q4ReDN5/=OWt9TEEF77O"; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0A9C59404E1 X-Spam-Score: -4.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: QwmsZTeRNJ/y --Sig_/dT.q4ReDN5/=OWt9TEEF77O Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable * gnu/packages/java.scm (openjdk11)[arguments]: Add patch-jni-libs phase. This fixes a NullPointerException related to using fontconfig reported by Jonathan Frederickson in . --- gnu/packages/java.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a63dad8755..85ca37d8b6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2139,6 +2139,33 @@ new Date();")) (substitute* "make/data/blacklistedcertsconverter/blacklisted= .certs.pem" (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) #t)) + (add-after 'unpack 'patch-jni-libs + ;; Hardcode dynamically loaded libraries. + (lambda _ + (let* ((library-path (search-path-as-string->list + (getenv "LIBRARY_PATH"))) + (find-library (lambda (name) + (search-path + library-path + (string-append "lib" name ".so"))))) + (for-each + (lambda (file) + (catch 'decoding-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)))) + (find-files "." + "\\.c$|\\.h$")) + #t))) (add-before 'build 'write-source-revision-file (lambda _ (with-output-to-file ".src-rev" --=20 2.27.0 --Sig_/dT.q4ReDN5/=OWt9TEEF77O Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCYCW71QAKCRC/KGy2WT5f /ZeGAJ9ATd+7ruqCzfyjrncpzqa9h6numQCgrZPcEYnmK2Mo7NQP7aQrJZOGIZE= =yzKg -----END PGP SIGNATURE----- --Sig_/dT.q4ReDN5/=OWt9TEEF77O--