From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cEhTF+u7JWBZLQAA0tVLHw (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 mp0 with LMTPS id +EwvE+u7JWDxPwAA1q6Kng (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 767099403D5 for ; Thu, 11 Feb 2021 23:21:14 +0000 (UTC) Received: from localhost ([::1]:40406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lALGr-00034R-A0 for larch@yhetil.org; Thu, 11 Feb 2021 18:21:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lALGg-00033n-98 for guix-patches@gnu.org; Thu, 11 Feb 2021 18:21:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lALGg-0006I0-1U 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 1lALGf-0001Gw-Tc for guix-patches@gnu.org; Thu, 11 Feb 2021 18:21:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46451] [PATCH 1/2] gnu: openjdk@9 : 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:01 +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.16130856254817 (code B ref 46451); Thu, 11 Feb 2021 23:21:01 +0000 Received: (at 46451) by debbugs.gnu.org; 11 Feb 2021 23:20:25 +0000 Received: from localhost ([127.0.0.1]:59537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lALG0-0001FZ-4v for submit@debbugs.gnu.org; Thu, 11 Feb 2021 18:20:25 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:33530 helo=bjoernhoefling.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lALFz-0001FR-48 for 46451@debbugs.gnu.org; Thu, 11 Feb 2021 18:20:19 -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 969853FC05 for <46451@debbugs.gnu.org>; Fri, 12 Feb 2021 00:20:17 +0100 (CET) Date: Fri, 12 Feb 2021 00:20:16 +0100 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Message-ID: <20210212002016.18e0debe@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_/rvoZwt.B7hjVXSZy5eH8rPl"; 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: 767099403D5 X-Spam-Score: -4.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: I3uwIx+Q6eE7 --Sig_/rvoZwt.B7hjVXSZy5eH8rPl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable * gnu/packages/java.scm (openjdk9)[arguments]: Add patch-jni-libs phase. This fixes a NullPointerException related to using fontconfig reported by Jonathan Frederickson in . --- gnu/packages/java.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index d6afb2e9d3..a63dad8755 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -10,7 +10,7 @@ ;;; Copyright =C2=A9 2018, 2019 G=C3=A1bor Boskovits ;;; Copyright =C2=A9 2018 Chris Marusich ;;; Copyright =C2=A9 2018, 2019, 2020 Efraim Flashner -;;; Copyright =C2=A9 2019, 2020 Bj=C3=B6rn H=C3=B6fling +;;; Copyright =C2=A9 2019, 2020, 2021 Bj=C3=B6rn H=C3=B6fling ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2020 Raghav Gururajan ;;; Copyright =C2=A9 2020 Maxim Cournoyer @@ -1928,6 +1928,33 @@ new Date();")) (number->string (parallel= -job-count)))) '()) ,@make-flags)))) + (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))) ;; Some of the libraries in the lib/ folder link to libjvm.so. ;; But that shared object is located in the server/ folder, so it ;; cannot be found. This phase creates a symbolic link in the --=20 2.27.0 --Sig_/rvoZwt.B7hjVXSZy5eH8rPl Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCYCW7sAAKCRC/KGy2WT5f /aA2AJ434CePc5pnj48d+AqnrZm+lCLnagCdFHYGv0ItRV5u1Bux3/FIw+sr+Yg= =BMii -----END PGP SIGNATURE----- --Sig_/rvoZwt.B7hjVXSZy5eH8rPl--