Skip to content

Commit

Permalink
Update go-bootstrap package
Browse files Browse the repository at this point in the history
The last C based Go src tree was the 1.4 series.  For a while they
were cutting new releases so that people could bootstrap from a C only
system.  Now they're recommending that you either use the release-1.4
branch or that you use a date-stamped tarball that they'll produce on
an as-needed basis.

There are several issues that keep 1.4.2 from building on a CentOS 7
system.

I've switched to the date based tarball.

The cgo bits were also mis-behaving, but they're not needed for the
bootstrapping task so I've set an environment variable that disables
them.

Details [on the install-from-source
page](https://golang.org/doc/install/source#go14) and these issues:

- golang/go#17545
- golang/go#16352.
  • Loading branch information
hartzell committed Nov 19, 2016
1 parent a5fb33b commit 397fc68
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions var/spack/repos/builtin/packages/go-bootstrap/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ class GoBootstrap(Package):

extendable = True

# NOTE: [email protected].2 is the only supported bootstrapping compiler because all
# NOTE: [email protected].x is the only supported bootstrapping compiler because all
# later versions require a Go compiler to build.
# See: https://golang.org/doc/install/source
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
# See: https://golang.org/doc/install/source#go14 and
# https://github.com/golang/go/issues/17545 and
# https://github.com/golang/go/issues/16352
version('1.4-bootstrap-20161024', '76e42c8152e8560ded880a6d1d1f53cb',
url='https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz')

variant('test', default=True, description='Build and run tests as part of the build.')

provides('golang@:1.4.2')
provides('golang@:1.4-bootstrap-20161024')

depends_on('git', type='alldeps')

Expand All @@ -69,6 +72,7 @@ def patch(self):
pass

def install(self, spec, prefix):
env['CGO_ENABLED'] = '0'
bash = which('bash')
with working_dir('src'):
bash('{0}.bash'.format('all' if '+test' in spec else 'make'))
Expand Down

0 comments on commit 397fc68

Please sign in to comment.