From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QBbeOfi7fmCAgQAAgWs5BA (envelope-from ) for ; Tue, 20 Apr 2021 13:33:12 +0200 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 8J2qNfi7fmAYMAAA1q6Kng (envelope-from ) for ; Tue, 20 Apr 2021 11:33:12 +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 B89451AD54 for ; Tue, 20 Apr 2021 13:33:11 +0200 (CEST) Received: from localhost ([::1]:56866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYocv-0007A0-RQ for larch@yhetil.org; Tue, 20 Apr 2021 07:33:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYoco-00079b-QP for bug-guix@gnu.org; Tue, 20 Apr 2021 07:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYoco-0003TT-I6 for bug-guix@gnu.org; Tue, 20 Apr 2021 07:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYoco-0004Ww-DT for bug-guix@gnu.org; Tue, 20 Apr 2021 07:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#31719: icedtea-3 binaries contain references to icedtea-2 Resent-From: Carlo Zancanaro Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 20 Apr 2021 11:33: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: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 31719-submit@debbugs.gnu.org id=B31719.161891833616536 (code B ref 31719); Tue, 20 Apr 2021 11:33:02 +0000 Received: (at 31719) by debbugs.gnu.org; 20 Apr 2021 11:32:16 +0000 Received: from localhost ([127.0.0.1]:53121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYoc3-0004IG-P2 for submit@debbugs.gnu.org; Tue, 20 Apr 2021 07:32:16 -0400 Received: from zancanaro.com.au ([45.76.117.151]:51346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYoc1-0004Fj-OS for 31719@debbugs.gnu.org; Tue, 20 Apr 2021 07:32:14 -0400 Received: by zancanaro.com.au (Postfix, from userid 116) id A0DAF34226; Tue, 20 Apr 2021 11:32:11 +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 A2B9934224; Tue, 20 Apr 2021 11:32:10 +0000 (UTC) References: <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> <87czutbd2f.fsf@zancanaro.id.au> <87a6pxb69o.fsf@zancanaro.id.au> <87wnsym944.fsf@elephly.net> <878s5de2ac.fsf_-_@gnu.org> User-agent: mu4e 1.4.15; emacs 27.2 From: Carlo Zancanaro In-reply-to: <878s5de2ac.fsf_-_@gnu.org> Date: Tue, 20 Apr 2021 21:32:10 +1000 Message-ID: <87tuo18a4l.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Ricardo Wurmus , 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=1618918392; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to: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=SssSAKVJfq+KyEI7gaLhxgcU+iexbOXlJ3uTC+mbTvY=; b=WOeSVKfhUrtctfJcWuI+XK2CuVCkTYyuY1K8E8Z/0bk8UfaImB4bT2oN/WDy54jHcgXWEF wcxWfna53NZiG7ouW+PMpPGbTi0WWLw1WE0+8pYQYT2+hSl4RKLfSolGQrAUWTVk4ty7X9 UqpXri+cRO43fLaXLOPQG8+jQxXMzr4mRV+Bom22eOH9pGcfJC8kBGAaxRYN/8ZfVgQJYL K5yWHh6C/fAReKabh+YwUdsn+tCnhbtFZQIKeefmkKqsNJwrR/zHlCmxGFez6byqGRYhNF C2WLrpv7/6bjnwQByzX24B9yYTlANiS/lMHhGfoO7cQOCX6sKfJh/AIZZEeZAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618918392; a=rsa-sha256; cv=none; b=kmofCUyicmAo0Vhk6GLwfofJ96xObKpgafvNAwUyZ0k/qI1u+K162JjEYEEXAhW8KcLZ/t O4YFrwaiju2STG4/7Mcn4hpPeIQzzt9DlceQ6IfZTH/PE1DBDUQB/eJrREuOPC/WihoN3K uxy+4tf9b42JmYIBVtp5eNI6IbfS0gTATutpQvBytsFIf6mraQtemopp0JhOyrYebUKHY6 4ej6OKUkLDUGPnt9/jef3ntBzHieq2nqwGPmzFMfpiBi65ByRov4rTaV/OSswgcwHfzNnX Wt1NL53UI2/4M+HOKojWxMi1p4QuEavzLk+ufcaZA72pNljAk2tmHfqhVYKRrw== 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: -2.44 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: B89451AD54 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: uRYmy090UlWi --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Ludo! On Tue, Apr 20 2021, Ludovic Court=C3=A8s wrote: > (find-library (lambda (name) > - (or (search-path > - library-path > - (string-append "lib"=20 > name ".so")) > - (string-append "lib"=20 > name ".so"))))) > + (search-path > + library-path > + (string-append "lib" name=20 > ".so"))))) > (for-each As discussed on IRC, the "or" is actually important here to avoid=20 substituting #f as the library name. I've attached a patch on top=20 of yours that adds the "or" back (including the other two that I=20 missed in my earlier patch), and also switches to "string-append"=20 which is less sensitive to this problem. I have built up to openjdk11 with this patch, and I see less #f's=20 in the result. There are still some in the compiled libraries, but=20 I haven't investigated thoroughly as to whether they're correct or=20 not. Carlo --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Fix-openjdk-library-substitution-when-libraries-.patch >From 60101b27543b7cc41a052d5bec95234ea4977d35 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 20 Apr 2021 21:22:20 +1000 Subject: [PATCH] gnu: Fix openjdk library substitution when libraries aren't found * gnu/packages/java.scm (icedtea-8, openjdk9, openjdk11): Fix JNI library substitution to not substitute #f if the library can't be found. --- gnu/packages/java.scm | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b780f7a85f..8a1ba5f262 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1806,9 +1806,10 @@ new Date();")) (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 @@ -1816,9 +1817,9 @@ new Date();")) (substitute* file (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" _ name version) - (format #f "\"~a\"" (find-library name))) + (string-append "\"" (find-library name) "\"")) (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) - (format #f "\"~a\"" (find-library name))))) + (string-append "\"" (find-library name) "\"")))) (lambda _ ;; Those are safe to skip. (format (current-error-port) @@ -1956,9 +1957,10 @@ new Date();")) (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 @@ -1966,9 +1968,9 @@ new Date();")) (substitute* file (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" _ name version) - (format #f "\"~a\"" (find-library name))) + (string-append "\"" (find-library name) "\"")) (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) - (format #f "\"~a\"" (find-library name))))) + (string-append "\"" (find-library name) "\"")))) (lambda _ ;; Those are safe to skip. (format (current-error-port) @@ -2177,9 +2179,10 @@ new Date();")) (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 @@ -2187,9 +2190,9 @@ new Date();")) (substitute* file (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" _ name version) - (format #f "\"~a\"" (find-library name))) + (string-append "\"" (find-library name) "\"")) (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) - (format #f "\"~a\"" (find-library name))))) + (string-append "\"" (find-library name) "\"")))) (lambda _ ;; Those are safe to skip. (format (current-error-port) -- 2.31.1 --=-=-=--