[pkg-golang-devel] Bug#818651: golang: cannot use net package without CGO
Ayke van Laethem
aykevanlaethem at gmail.com
Sat Mar 19 09:03:40 UTC 2016
Package: golang
Version: 2:1.6-1
Severity: normal
Dear Maintainer,
Golang 1.3 (jessie) can build this file just fine without CGO, but golang 1.5
and 1.6 throws an error:
package main
import (
"fmt"
"net"
)
func main() {
fmt.Println("HostPort:", net.JoinHostPort("google.com", "80"))
}
To reproduce, compile this with the environment variable CGO_ENABLED=0. It
fails with golang 1.5 (jessie-backports) and golang 1.6 (testing) but succeeds
in golang 1.3 (jessie).
The exact (but cryptic) error reported is:
go install net: open /usr/lib/go/pkg/linux_amd64/net.a: permission denied
Since Go 1.2 (according to the docs [1]) it should be possible to use the net
package without CGO on some systems.
My system is linux-amd64 (one with jessie and one with testing).
[1] https://golang.org/doc/go1.2
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages golang depends on:
ii golang-doc 2:1.6-1
ii golang-go 2:1.6-1
ii golang-src 2:1.6-1
golang recommends no packages.
golang suggests no packages.
-- no debconf information
More information about the pkg-golang-devel
mailing list