From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: gcj: remove broken symlink and stump binaries. Date: Sat, 2 May 2015 18:14:08 +0200 Message-ID: <87h9rvx8hb.fsf@mango.localdomain> References: <87pp6ly52e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yoa3c-0007ni-1E for guix-devel@gnu.org; Sat, 02 May 2015 12:14:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yoa3W-0003Il-WE for guix-devel@gnu.org; Sat, 02 May 2015 12:14:23 -0400 In-Reply-To: <87pp6ly52e.fsf@gnu.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> + (for-each delete-file >> + (map (cut string-append out <>) >> + '("/lib/jvm/jre/lib/amd64/libjawt.so" >> + "/bin/c++" >> + "/bin/cpp" >> + "/bin/g++" >> + "/bin/gcc" >> + "/bin/gcc-ar" >> + "/bin/gcc-nm" >> + "/bin/gcc-ranlib" >> + "/bin/x86_64-unknown-linux-gnu-c++" >> + "/bin/x86_64-unknown-linux-gnu-g++" >> + "/bin/x86_64-unknown-linux-gnu-gcc" >> + "/bin/x86_64-unknown-linux-gnu-gcc-4= .8.4" >> + "/bin/x86_64-unknown-linux-gnu-gcc-a= r" >> + "/bin/x86_64-unknown-linux-gnu-gcc-n= m" >> + "/bin/x86_64-unknown-linux-gnu-gcc-r= anlib")))) > > This is specific to x86_64-linux-gnu though. Wouldn=E2=80=99t it be be= tter to > use a white list instead, or maybe keep it a black list but use > find-files and regexps? Attached is a new patch using find-files and regular expressions. The results look fine in the REPL, but I have not yet finished compiling the gcj package (it takes a very long time on my machine). ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-gcj-Remove-broken-symlink-and-conflicting-files.patch" >From 86f2b4e7f182b5ea734eea4d72ef868b6a25f7eb Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 30 Apr 2015 17:11:39 +0200 Subject: [PATCH] gnu: gcj: Remove broken symlink and conflicting files. * gnu/packages/gcc.scm (gcj)[arguments]: Add a build phase to remove a broken symlink and generic stump binaries. --- gnu/packages/gcc.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index e712e43..aa3e046 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -435,7 +435,18 @@ Go. It also includes runtime support libraries for these languages.") (string-append jvm "/lib/tools.jar"))) (chmod target #o755) #t)) - ,phases)))))) + (alist-cons-after + 'install 'remove-broken-or-conflicting-files + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (for-each + delete-file + (append (find-files (string-append out "/lib/jvm/jre/lib") + "libjawt.so") + (find-files (string-append out "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) + #t) + ,phases))))))) (define ecj-bootstrap-4.8 (origin -- 2.1.0 --=-=-=--