From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:48977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0w54-0001AH-1t for guix-patches@gnu.org; Mon, 04 Mar 2019 17:29:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0w52-0005eH-3O for guix-patches@gnu.org; Mon, 04 Mar 2019 17:29:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0w50-0005dL-9x for guix-patches@gnu.org; Mon, 04 Mar 2019 17:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h0w50-0004Cr-1Y for guix-patches@gnu.org; Mon, 04 Mar 2019 17:29:02 -0500 Subject: [bug#34752] [PATCH] WIP: Update Go to 1.12. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:48910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0w4H-00015P-8o for guix-patches@gnu.org; Mon, 04 Mar 2019 17:28:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0w4B-00051J-I3 for guix-patches@gnu.org; Mon, 04 Mar 2019 17:28:16 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:48941) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0w48-0004uP-3I for guix-patches@gnu.org; Mon, 04 Mar 2019 17:28:10 -0500 Received: from jasmine.lan (c-76-124-202-137.hsd1.pa.comcast.net [76.124.202.137]) by mail.messagingengine.com (Postfix) with ESMTPA id ADF36100E5 for ; Mon, 4 Mar 2019 17:28:04 -0500 (EST) From: Leo Famulari Date: Mon, 4 Mar 2019 17:28:00 -0500 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 34752@debbugs.gnu.org This patch depends on the removal of Go 1.9 in bug #34280. Any ideas about these new test failures? Something fails to find some kernel headers for reasons that I don't understand. * gnu/packages/golang.scm (go-1.11): Replace with ... (go-1.12): ... new variable. [arguments]: Remove the Go 1.11.5 'tarbomb-workaround' phase. Move 'set-bootstrap-variables' into the 'build' phase. Disable some more tests in the 'prebuild' phase. Set $HOME because Go 1.12 actually tries to use it. (go): Update to go-1.12. * guix/build/go-build-system.scm (setup-environment): Set $HOME. --- gnu/packages/golang.scm | 39 ++++++++++++---------------------- guix/build/go-build-system.scm | 1 + 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index da8ad3d7fe..ff21bcdba9 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -223,11 +223,11 @@ in the style of communicating sequential processes (@dfn{CSP}).") (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")) (license license:bsd-3))) -(define-public go-1.11 +(define-public go-1.12 (package (inherit go-1.4) (name "go") - (version "1.11.5") + (version "1.12") (source (origin (method url-fetch) @@ -235,23 +235,11 @@ in the style of communicating sequential processes (@dfn{CSP}).") name version ".src.tar.gz")) (sha256 (base32 - "0gllmbjvp12iszwils8id78mvjxwviwf98lh2gdkb236n4mz07mw")))) + "1wl8kq21fbzmv4plnaza5acz8dhbaaq6smjzk3r6cf3l6qrkvi09")))) (arguments (substitute-keyword-arguments (package-arguments go-1.4) ((#:phases phases) `(modify-phases ,phases - ;; XXX Work around the Go 1.11.5 tarbomb. - ;; - (add-after 'unpack 'tarbomb-workaround - (lambda _ - (chdir "..") - (delete-file-recursively "gocache") - (delete-file-recursively "tmp") - #t)) - (replace 'chdir - (lambda _ - (chdir "go/src") - #t)) (replace 'prebuild (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")) @@ -276,8 +264,10 @@ in the style of communicating sequential processes (@dfn{CSP}).") ;; can not find crt1.o despite being present. "cmd/go/testdata/script/list_compiled_imports.txt" "cmd/go/testdata/script/mod_case_cgo.txt" - ;; https://github.com/golang/go/issues/24884 - "os/user/user_test.go")) + ;; XXX fails to find "asm/socket.h" + "cmd/go/testdata/script/list_find.txt" + ;; XXX fails to find "linux/errno.h" + "cmd/go/testdata/script/cgo_syso_issue29253.txt")) (substitute* "os/os_test.go" (("/usr/bin") (getcwd)) @@ -352,19 +342,16 @@ in the style of communicating sequential processes (@dfn{CSP}).") (substitute* (find-files "cmd" "\\.go") (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader)) #t))) - (add-before 'build 'set-bootstrap-variables - (lambda* (#:key outputs inputs #:allow-other-keys) - ;; Tell the build system where to find the bootstrap Go. - (let ((go (assoc-ref inputs "go"))) - (setenv "GOROOT_BOOTSTRAP" go) - (setenv "GOGC" "400") - #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"))) + (let ((go (assoc-ref inputs "go")) + (output (assoc-ref outputs "out"))) + (setenv "HOME" "/tmp") + (setenv "GOGC" "400") ; XXX necessary? (setenv "CC" (which "gcc")) (setenv "GOOS" "linux") + (setenv "GOROOT_BOOTSTRAP" go) (setenv "GOROOT" (dirname (getcwd))) (setenv "GOROOT_FINAL" output) (setenv "CGO_ENABLED" "1") @@ -415,7 +402,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") ,@(package-native-inputs go-1.4))) (supported-systems %supported-systems))) -(define-public go go-1.11) +(define-public go go-1.12) (define-public go-github-com-alsm-ioprogress (let ((commit "063c3725f436e7fba0c8f588547bee21ffec7ac5") diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 022d4fe16b..c4f55b06ee 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -172,6 +172,7 @@ respectively." (if (getenv "GOPATH") (setenv "GOPATH" (string-append (getcwd) ":" (getenv "GOPATH"))) (setenv "GOPATH" (getcwd))) + (setenv "HOME" "/tmp") ;; Where to install compiled executable files ('commands' in Go parlance'). (setenv "GOBIN" (string-append out "/bin")) #t)) -- 2.21.0