Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build: freebsd/386 builder is not testing 32-bit tool chain or cgo #13873

Closed
4a6f656c opened this issue Jan 8, 2016 · 2 comments
Closed

x/build: freebsd/386 builder is not testing 32-bit tool chain or cgo #13873

4a6f656c opened this issue Jan 8, 2016 · 2 comments

Comments

@4a6f656c
Copy link
Contributor

4a6f656c commented Jan 8, 2016

The freebsd/386 builder is not testing cgo, since it is run on a freebsd amd64 host with GOHOST=386 and without GOHOSTARCH=386. This is generating a 64-bit tool chain with a 32-bit runtime, which has cgo disabled:

$ uname -a
FreeBSD fbsdamd64 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
$ file $(which go)
/home/joel/src/go/bin/go: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped
$ GOARCH=386 go version
go version devel +acc7161 Fri Jan 8 00:56:28 2016 +0000 freebsd/amd64
$ GOARCH=386 go env | grep CGO
CGO_ENABLED="0"
$ cat test.go
package main

import (
        "fmt"
        "runtime"
)

func main() {
        fmt.Println(runtime.GOOS, runtime.GOARCH)
}
$ GOARCH=386 go build test.go
$ file test
test: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), statically linked, not stripped
$ ./test
freebsd 386

The builder should be running with GOHOSTARCH=386 so that it generates a 32-bit tool chain with cgo enabled. However, the misc/cgo/testso currently fails with this configuration.

@4a6f656c 4a6f656c self-assigned this Jan 8, 2016
@gopherbot
Copy link

CL https://golang.org/cl/18420 mentions this issue.

4a6f656c pushed a commit that referenced this issue Jan 8, 2016
The cgoTestSO test currently fails when run on FreeBSD amd64 with
GOHOSTARCH=386. This is due to it failing to find the shared object.

On FreeBSD 64-bit architectures, the linker for 32-bit objects
looks for a separate environment variable. Export both LD_LIBRARY_PATH
and LD_32_LIBRARY_PATH on FreeBSD when GOHOSTARCH=386.

Update issue #13873.

Change-Id: I1fb20dd04eb2007061768b2e4530886521813d42
Reviewed-on: https://go-review.googlesource.com/18420
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@bradfitz
Copy link
Contributor

bradfitz commented Jan 8, 2016

All submitted and deployed.

@bradfitz bradfitz closed this as completed Jan 8, 2016
@golang golang locked and limited conversation to collaborators Jan 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants