Skip to content

build: remove -Werror from cmd/dist build for Go 1.4 release branch #12345

Closed
madisongh/meta-golang
#4
@jlaffaye

Description

@jlaffaye

This is a serious issue as clang is the default compiler of FreeBSD, and go 1.4 is needed to bootstrap Go 1.5+

The bug on FreeBSD bugtracker (include error logs and proposed patchs): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202662

Activity

minux

minux commented on Aug 26, 2015

@minux
Member
bradfitz

bradfitz commented on Aug 26, 2015

@bradfitz
Contributor

FreeBSD should feel free to silence any clang undefined behavior warnings from versions of clang that are newer than we ever built Go 1.4 with.

Because Go 1.5 is now out, and because Go 1.5 no longer contains any C code, we probably won't be making such changes upstream, nor in the Go 1.4 release branch (which we only use for critical problems).

If you'd like us to review any patches, please email golang-dev@ or ping this bug and somebody can take a look.

/cc @ianlancetaylor for the linker parts.

added this to the Unplanned milestone on Aug 26, 2015
changed the title [-]Go 1.4 fails to compile with clang 3.7[/-] [+]build: Go 1.4 fails to compile with clang 3.7[/+] on Aug 26, 2015
bradfitz

bradfitz commented on Aug 26, 2015

@bradfitz
Contributor

@minux, that is a fair point.

jlaffaye

jlaffaye commented on Aug 26, 2015

@jlaffaye
Author

I could apply patches to Go source files in the FreeBSD port, but having fixes in upstream would avoid every package maintainer to maintain their own set of patches.

minux

minux commented on Aug 26, 2015

@minux
Member
minux

minux commented on Aug 26, 2015

@minux
Member
ianlancetaylor

ianlancetaylor commented on Aug 26, 2015

@ianlancetaylor
Contributor

In general I agree with minux that we need to ensure that Go 1.4 builds at least well enough to build Go 1.5. I actually think that we might need to make new point release in some cases.

In this case, I think we should consider a patch for 1.4 that drops -Werror from the list of command line options. And I think that the FreeBSD build process should set CGO_ENABLED=0 when building Go 1.4. I think those two steps should fix the FreeBSD build.

minux

minux commented on Aug 26, 2015

@minux
Member
rsc

rsc commented on Aug 26, 2015

@rsc
Contributor

I don't believe that Go 1.4 needs to build anywhere except linux/amd64 and darwin/amd64 (just to take an extreme position). We did not backport linux/ppc64 to Go 1.4 just to make Go 1.5 build there. The requirement is "Go 1.4 or later". The or later is implemented nearly trivially by bootstrap.bash.

ianlancetaylor

ianlancetaylor commented on Aug 26, 2015

@ianlancetaylor
Contributor

Building only on GNU/Linux and Darwin works for us but seems a little unfair to FreeBSD. In any case these particular issues are presumably going to arise on other platforms too as they move to newer versions of clang.

I'm only proposing one patch to 1.4 at this time: drop -Werror from cmd/dist/build.c.

@minux I agree that only a new source release is needed, if anything is needed.

21 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @bradfitz@jlaffaye@rsc@minux@jaguilar

      Issue actions

        build: remove -Werror from cmd/dist build for Go 1.4 release branch · Issue #12345 · golang/go