From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: gold linker and collect2: fatal error: cannot find 'ld' Date: Mon, 18 Mar 2019 16:28:49 +0100 Message-ID: <20190318152849.n3jzwrbyfd7fd3db@thebird.nl> References: <20190317160616.cyv5z7lbsrvbajur@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([209.51.188.92]:34312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5uK9-0001xg-5n for guix-devel@gnu.org; Mon, 18 Mar 2019 11:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5uK8-0008Jb-GU for guix-devel@gnu.org; Mon, 18 Mar 2019 11:37:13 -0400 Received: from mail.thebird.nl ([94.142.245.5]:50062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5uK8-0008J7-64 for guix-devel@gnu.org; Mon, 18 Mar 2019 11:37:12 -0400 Content-Disposition: inline In-Reply-To: <20190317160616.cyv5z7lbsrvbajur@thebird.nl> 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" To: Pjotr Prins Cc: guix-devel@gnu.org On Sun, Mar 17, 2019 at 05:06:16PM +0100, Pjotr Prins wrote: > Unfortunately the runtime of compiled software fails because the rpath is > not updated either. So that requires adding in the RPATH explicitly on > the ldc command line. When I set the RPATH the runtime is fine. Reading up on the ld-wrapper code - that is exactly what happens. A gold-wrapper can do same. I think, like with rustc, I need to wrap the ldc compiler build with ld-wrapper and the ldc tests with gold-wrapper (yet to be written). gold does not honour LIBRARY_PATH so that means we'll have to use LD_LIBRARY_PATH or pass the lib path(s) on the command line. Does this make sense? If it does we can make an attempt. Pj.