From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uP5oHFuKemBSswAAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 09:12:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QERbFluKemC7QQAA1q6Kng (envelope-from ) for ; Sat, 17 Apr 2021 07:12:27 +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 A3A4F10704 for ; Sat, 17 Apr 2021 09:12:25 +0200 (CEST) Received: from localhost ([::1]:35030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXf7v-0004kY-Ih for larch@yhetil.org; Sat, 17 Apr 2021 03:12:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXf7b-0004kL-0e for bug-guix@gnu.org; Sat, 17 Apr 2021 03:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXf7a-00056g-Bi for bug-guix@gnu.org; Sat, 17 Apr 2021 03:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXf7a-0004wN-7Q for bug-guix@gnu.org; Sat, 17 Apr 2021 03:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#31719: Chains of dependencies getting longer Resent-From: Carlo Zancanaro Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 17 Apr 2021 07:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31719 X-GNU-PR-Package: guix X-GNU-PR-Keywords: X-Debbugs-Original-Cc: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= , rekado@elephly.net, 31719@debbugs.gnu.org, bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161864350018961 (code B ref -1); Sat, 17 Apr 2021 07:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2021 07:11:40 +0000 Received: from localhost ([127.0.0.1]:42189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXf7A-0004vg-EN for submit@debbugs.gnu.org; Sat, 17 Apr 2021 03:11:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:36642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXf74-0004vP-Kh for submit@debbugs.gnu.org; Sat, 17 Apr 2021 03:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXf74-0004ih-F8 for bug-guix@gnu.org; Sat, 17 Apr 2021 03:11:30 -0400 Received: from zancanaro.com.au ([45.76.117.151]:50282) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXf72-0004jP-Be for bug-guix@gnu.org; Sat, 17 Apr 2021 03:11:30 -0400 Received: by zancanaro.com.au (Postfix, from userid 116) id 5A91C34140; Sat, 17 Apr 2021 07:11:25 +0000 (UTC) Received: from jolteon (n175-37-31-147.bla1.nsw.optusnet.com.au [175.37.31.147]) by zancanaro.com.au (Postfix) with ESMTPSA id 9B2DB33C10; Sat, 17 Apr 2021 07:11:22 +0000 (UTC) References: <877end1pda.fsf@mdc-berlin.de> <87mtvntckt.fsf@gnu.org> <87o8g2pni4.fsf@gnu.org> <20210301231534.1d4e440a@alma-ubu.fritz.box> <878s5ltj0o.fsf@elephly.net> <20210416212233.05ac87de@alma-ubu.fritz.box> <87fszpc1du.fsf@zancanaro.id.au> User-agent: mu4e 1.4.15; emacs 27.2 From: Carlo Zancanaro In-reply-to: <87fszpc1du.fsf@zancanaro.id.au> Date: Sat, 17 Apr 2021 17:11:20 +1000 Message-ID: <87czutbd2f.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=45.76.117.151; envelope-from=carlo@zancanaro.id.au; helo=zancanaro.com.au X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, MISSING_HEADERS=1.021, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rekado@elephly.net, 31719@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618643546; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=ET4vnc+4hTXuFQs5PKeudxG8PcTIOBreAob6deb22UE=; b=bwY6DFdm2WmvPgQ/7ApDPLH0Cy4Xz5WqwLDKOmKVH23RIacyVeECJ6MgQtpS7dIHF//HPe 1IDAkhU2/D1rYA4RjoY9wOjMTeNNdr9zGEOZ1Qhn7kxyLWOoF7tncjKS/P/cknPxQdEzU7 wpwDlwj8VQcBFSyiWECjWqUtRV04ew5MJ7go56cGP9u0qkmO9Azn4FFRTfAiufpgmUG771 VR2Ogddnydgi8v8rGpEWEK4tePST4uZohOPkEl7hLtjININlHf32AxBYek61ObQJ/AUSam +65JYlOPs8dca2vszv0ZOCpIpl/F9DYF1e5W0Y89egP4+aSs6uSKeSdUrxMzAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618643546; a=rsa-sha256; cv=none; b=q/9j9Cy3gFIOlOVa9sVs1bJDoWNafMNFKv1/2Y2IQunhNoynNeAvYGAYNRvfmEpJd+6tny Z190dvoquVTkuH9qIFwczTr6GFBN/QOfgsvoWWW4hhRucLz0+mH+7MV811hCrPcgUzFPi1 V/6ROGv5JIOEXM7q1ywKPi0B5lgblW9baXnzK7JP6/sATOmqqtxrKn7cdff5gVyQzgtX5M UkJyIZPYWpxh5Zh7BkcI9zCcp3APBQd60K+cajCSaJDy9sOWGRsUYW14cboPC2rb/nUYVR 0PMBDzhFD1xSWiOh4JUjQPzVogtviYjNY1/wVBNty76cfvbbGIHAFaguem8m0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: 1.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: A3A4F10704 X-Spam-Score: 1.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: eJnodEvl4ufC --=-=-= Content-Type: text/plain; format=flowed Here's a patch that should clean up these runtime dependencies. It's a bit specific to this particular case, but I think that might be fine for now. I think it would make more sense for native inputs to not have their paths included in LIBRARY_PATH. Does it even make sense for them to be there? I thought LIBRARY_PATH was for compilers to find dependencies when compiling so they can link their output binaries against them. Having native inputs show up there seems wrong. I'm in the process of rebuilding Java from icedtea-8 upwards to check, but I have already tested that modifying openjdk 9 and 10 leads to "guix gc --references" show that openjdk 10 does not depend on openjdk 9. I have also tested that I can run some complex Java programs on my machine using the openjdk 10 built using this patch. Carlo --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Clean-up-runtime-dependencies-between-Java-versi.patch Content-Transfer-Encoding: quoted-printable >From f98dc5ad5662cc62f198d8f50e7dd719cf941315 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Sat, 17 Apr 2021 16:33:06 +1000 Subject: [PATCH] gnu: Clean up runtime dependencies between Java versions. * gnu/packages/java.scm (icedtea-8, openjdk9, openjdk11): Don't consider icedtea/openjdk input paths when rewriting JNI libraries. --- gnu/packages/java.scm | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 207f136513..3c4013ab6f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2,7 +2,7 @@ ;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurm= us ;;; Copyright =C2=A9 2016 Leo Famulari ;;; Copyright =C2=A9 2016, 2017 Roel Janssen -;;; Copyright =C2=A9 2017, 2019 Carlo Zancanaro +;;; Copyright =C2=A9 2017, 2019, 2021 Carlo Zancanaro ;;; Copyright =C2=A9 2017-2020 Julien Lepiller ;;; Copyright =C2=A9 2017 Thomas Danckaert ;;; Copyright =C2=A9 2016, 2017, 2018 Alex Vong @@ -1792,8 +1792,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->= list + (getenv "LIBRARY_PATH")= ))) (find-library (lambda (name) (search-path library-path @@ -1931,12 +1936,18 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) - (search-path - library-path - (string-append "lib" name ".so"))))) + (or (search-path + library-path + (string-append "lib" name ".so")) + (string-append "lib" name ".so")))= )) (for-each (lambda (file) (catch 'decoding-error @@ -2139,8 +2150,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) (search-path library-path --=20 2.31.1 --=-=-=--