From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Mickey Subject: Re: [PATCH 0/3] WIP: Go-lang Date: Thu, 14 Jan 2016 11:14:50 -0800 Message-ID: <87egdk9dn9.fsf@codemac.net> References: <1452616298-6255-1-git-send-email-efraim@flashner.co.il> <87y4bsp5a2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJnMH-00006I-GD for guix-devel@gnu.org; Thu, 14 Jan 2016 14:14:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJnME-00014k-72 for guix-devel@gnu.org; Thu, 14 Jan 2016 14:14:57 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJnME-00014R-3F for guix-devel@gnu.org; Thu, 14 Jan 2016 14:14:54 -0500 In-Reply-To: <87y4bsp5a2.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?= , Efraim Flashner Cc: guix-devel@gnu.org * Ludovic Court=C3=A8s [2016-01-14 07:08]: > Efraim Flashner skribis: > >> It seems there's a lot of interest around getting Go packaged in Guix, s= o I >> figured I should post my work so far to the mailinglist. Currently go-1.4 >> does not have cgo enabled, the go binary keeps on trying to link against >> libgcc_s.so.1 (from gcc:lib) and can't find it in the RUNPATH. > > In GCC, we have a hack that automatically adds gcc:lib to the RUNPATH > (look for =E2=80=9Clibgcc_s=E2=80=9D in gcc.scm.) I guess we need to do = something > similar here. Aha - ok, I've had the same problem! I've tried injecting it many ways and it doesn't work due to the intersection of libgcc_s and glibc. Efraim - can you successfully run programs that link against glibc? As in anything that uses os/user, net, etc? Running the tests as part of your build is a big way to pick up on this, I've added the following to my go-1.4.3 attempts in my build steps: =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ;; these all have specific file locations they look for ;; or in the case of exec_test resets the environment ;; before executing binaries they expect. (for-each delete-file '("src/net/multicast_test.go" "src/net/parse_test.go" "src/net/port_test.go" "src/os/exec/exec_test.go")) (substitute* "src/os/os_test.go" (("/bin/pwd") (which "pwd")) (("/usr/bin") (dirname (which "pwd"))) (("TestHostname") "areturn")) =20 ;; Disable the unix socket test (substitute* "src/net/net_test.go" (("TestShutdownUnix") "areturn")) =20 (substitute* "src/net/lookup_unix.go" (("/etc/protocols") (string-append iana "protocols"))) =20 ;; ParseInLocation fails the test (substitute* "src/time/format_test.go" (("TestParseInSydney") "areturn")) =20 (substitute* "src/time/zoneinfo_unix.go" (("/usr/share/zoneinfo/") tz)) =20 ;; exec.Command on os.Args[0] from go run for whatever ;; reason doesn't work right now. libgcc_s.so link ;; missing crap occurs here as well, this may require ;; that 6l-wrapper for go run to work. (substitute* "src/syscall/syscall_unix_test.go" (("TestPassFD") "areturn")) (substitute* "src/cmd/6l/asm.c" (("char linuxdynld.*$") (string-append "char linuxdynld[] =3D \"" ld-lin= ux "\";\n"))) I'll be trying this later with your packages. I'd really hesitate on packaging this without runnning the tests, as there are lots of ugly corner cases in go's build system. // codemac