[Bug 221297] Crossbuidling of lang/go explicitly requires CGO_ENABLED=1
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Aug 7 05:45:29 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221297
Bug ID: 221297
Summary: Crossbuidling of lang/go explicitly requires
CGO_ENABLED=1
Product: Ports & Packages
Version: Latest
Hardware: arm
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: jlaffaye at FreeBSD.org
Reporter: tagattie at yandex.com
CC: freebsd-arm at FreeBSD.org
Assignee: jlaffaye at FreeBSD.org
CC: freebsd-arm at FreeBSD.org
Flags: maintainer-feedback?(jlaffaye at FreeBSD.org)
Created attachment 185109
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=185109&action=edit
A patch for Makefile
Crossbuilding of lang/go (using Poudriere) ends up with the following error:
=======================<phase: package >============================
===> Building package for go-1.8.3,1
pkg-static: Unable to access file
/wrkdirs/usr/ports/lang/go/work/stage/usr/loca
l/go/pkg/freebsd_arm/runtime/cgo.a:No such file or directory
*** Error code 1
According to the Go source code at
https://github.com/golang/go/blob/master/src/go/build/build.go#L307, "cgo must
be explicitly enabled for cross compilation builds".
I tried attached the patch and crossbuilding succeeded without an error.
(GOARM=7 is to cope with the bug #205820)
I'm not sure how I can know host arch of crossbuilding (target arch is
${ARCH}), so I just simply put the line there, which should be better only when
crossbuilding.
Thanks,
Hiroki Tagato
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list