From 04a95a4fd6677d8bb91b9a1832c407afaa279e4b Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 19 Oct 2016 18:41:50 -0400 Subject: gnu: go-1.4: Disable cgo. * gnu/packages/golang.scm (go-1.4)[arguments]: Set "CGO_ENABLED=0" while building. (go-1.7)[arguments]: Keep "CGO_ENABLED=1". --- gnu/packages/golang.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'gnu/packages/golang.scm') diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 6b5038cf30..d5813d7903 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Andy Wingo ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2016 Petter +;;; Copyright © 2016 Leo Famulari ;;; ;;; This file is an addendum GNU Guix. ;;; @@ -139,7 +140,9 @@ (setenv "GOOS" "linux") (setenv "GOROOT" (dirname (getcwd))) (setenv "GOROOT_FINAL" output) - (setenv "CGO_ENABLED" "1") + ;; Go 1.4's cgo will not work with binutils >= 2.27: + ;; https://github.com/golang/go/issues/16906 + (setenv "CGO_ENABLED" "0") (zero? (system* "sh" "all.bash"))))) (replace 'install @@ -306,6 +309,18 @@ sequential processes (CSP) concurrent programming features added.") (setenv "GOGC" "400") (setenv "GO_TEST_TIMEOUT_SCALE" "9999") #t))) + + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; FIXME: Some of the .a files are not bit-reproducible. + (let* ((output (assoc-ref outputs "out"))) + (setenv "CC" (which "gcc")) + (setenv "GOOS" "linux") + (setenv "GOROOT" (dirname (getcwd))) + (setenv "GOROOT_FINAL" output) + (setenv "CGO_ENABLED" "1") + (zero? (system* "sh" "all.bash"))))) + (replace 'install ;; TODO: Most of this could be factorized with Go 1.4. (lambda* (#:key outputs #:allow-other-keys) -- cgit v1.2.3 From 4b0bac4b3ee6cd674b12557f397c35fadd640496 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 21 Oct 2016 16:19:46 -0400 Subject: gnu: go-1.4: Skip test that fails due to time zone name change. * gnu/packages/golang.scm (go-1.4)[arguments]: Skip test "TestLoadFixed" in 'prebuild' phase. --- gnu/packages/golang.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/packages/golang.scm') diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index d5813d7903..63e2186a28 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -114,6 +114,13 @@ ("net/dial_test.go" "(.+)(TestDialTimeout.+)") ("os/os_test.go" "(.+)(TestHostname.+)") ("time/format_test.go" "(.+)(TestParseInSydney.+)") + + ;; Tzdata 2016g changed the name of the time zone used in this + ;; test, and the patch for Go 1.7 does not work for 1.4.3: + ;; https://github.com/golang/go/issues/17545 + ;; https://github.com/golang/go/issues/17276 + ("time/time_test.go" "(.+)(TestLoadFixed.+)") + ("os/exec/exec_test.go" "(.+)(TestEcho.+)") ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)") ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)") -- cgit v1.2.3 From f08add0c5a3f1f7200b0a00e17ed880692d2244b Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 21 Oct 2016 16:31:37 -0400 Subject: gnu: go-1.7: Skip test that fails due to time zone name change. * gnu/packages/golang.scm (go-1.7)[arguments]: Skip test "TestLoadFixed" in 'prebuild' phase. --- gnu/packages/golang.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/packages/golang.scm') diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 63e2186a28..9b81f69c5d 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -282,7 +282,18 @@ sequential processes (CSP) concurrent programming features added.") ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)") ("net/lookup_test.go" "(.+)(TestLookupPort.+)") ("syscall/exec_linux_test.go" - "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)"))) + "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)") + ;; This test broke when tzdata updated to 2016g: + ;; https://github.com/golang/go/issues/17276 + + ;; Applying the upstream patch causes the failure of another + ;; test, because that test requires upstream's mtimes to be + ;; preserved, but applying the patch and re-packing the + ;; tarball causes mtimes to be set to Unix epoch. + ;; https://github.com/golang/go/issues/17535 + + ;; TODO Try re-enabling this test for Go > 1.7.3. + ("time/time_test.go" "(.+)(TestLoadFixed.+)"))) (substitute* "../misc/cgo/testsanitizers/test.bash" (("(CC=)cc" all var) (string-append var "gcc"))) -- cgit v1.2.3