[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/3] WIP: Go-lang
From: |
Jeff Mickey |
Subject: |
Re: [PATCH 0/3] WIP: Go-lang |
Date: |
Thu, 14 Jan 2016 11:14:50 -0800 |
User-agent: |
Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) |
* Ludovic Courtès <address@hidden> [2016-01-14 07:08]:
> Efraim Flashner <address@hidden> skribis:
>
>> It seems there's a lot of interest around getting Go packaged in Guix, so 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 “libgcc_s” 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:
;; 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"))
;; Disable the unix socket test
(substitute* "src/net/net_test.go"
(("TestShutdownUnix") "areturn"))
(substitute* "src/net/lookup_unix.go"
(("/etc/protocols") (string-append iana "protocols")))
;; ParseInLocation fails the test
(substitute* "src/time/format_test.go"
(("TestParseInSydney") "areturn"))
(substitute* "src/time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tz))
;; 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[] = \"" ld-linux
"\";\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
- Re: [PATCH 2/3] gnu: Add go-1.4., (continued)
[PATCH 1/3] gnu: gccgo: Update to 4.9., Efraim Flashner, 2016/01/12
[PATCH 3/3] gnu: Add go-1.5., Efraim Flashner, 2016/01/12
Re: [PATCH 0/3] WIP: Go-lang, Ludovic Courtès, 2016/01/14
Re: [PATCH 0/3] WIP: Go-lang, Jeff Mickey, 2016/01/14