From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: [Patch] go@1.4 Date: Thu, 02 Jun 2016 09:54:30 +0200 Message-ID: <87pos0auvd.fsf@igalia.com> References: <8737p2ynsx.fsf@mailerver.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8NSi-0002sM-Kr for guix-devel@gnu.org; Thu, 02 Jun 2016 03:54:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8NSc-0003wi-M7 for guix-devel@gnu.org; Thu, 02 Jun 2016 03:54:39 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:50479 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8NSc-0003wS-Hp for guix-devel@gnu.org; Thu, 02 Jun 2016 03:54:34 -0400 In-Reply-To: (Andy Wingo's message of "Sun, 29 May 2016 19:49:39 +0200") 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: Matthew Jordan Cc: guix-devel Hi, How goes the patching? FWIW for Go 1.5 and 1.6, if I remove this test in the linker then I can build without the LD_LIBRARY_PATH hacks and the tests work for me: On Sun 29 May 2016 19:49, Andy Wingo writes: > if Linkshared { > seenDirs := make(map[string]bool) > seenLibs := make(map[string]bool) > addshlib := func(path string) { > dir, base := filepath.Split(path) > if !seenDirs[dir] { > argv = append(argv, "-L"+dir) > if !rpath.set { > argv = append(argv, "-Wl,-rpath="+dir) > } This one. I do a substitute* of !rpath.set to "true" :) I am not sure whether this is the right fix -- I guess it seems that the intention of this code in the linker is that whatever calls the linker, if it passes the "-r" argument (yes, "-r" not "-rpath" because this is the Go internal linker that has different kinds of arguments; grrr; and yet, when linking a shared library it still shells out to the system ld), then it means that the caller is omniscient and knows the entire rpath to set. Otherwise the linker is doing magic by adding its own rpath incantations. But, that seems to me to be a bad design. I can't see why passing -r should turn off the "automatic" rpath stuff where Go adds -rpaths appropriate the -l libraries that it is linking, unless in some really strange deployment scenarios. Anyway. I think it is a sufficiently innocuous of a fix that it will allow us to merge Go. Let us call this yak shaved and get Go in. WDYT? Andy