[MacPorts] #54797: go-1.4: clang: error: no such file or directory
MacPorts
noreply at macports.org
Tue Sep 26 17:07:33 UTC 2017
#54797: go-1.4: clang: error: no such file or directory
------------------------+------------------------
Reporter: conradwt | Owner: ci42
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.99
Resolution: | Keywords: highsierra
Port: go go-1.4 |
------------------------+------------------------
Comment (by kimuraw):
https://github.com/golang/go/issues/21908
this golang's issue says we need to disable cgo with environment
CGO_ENABLED=0.
I tried the following patch and succeeded to install port:go and
port:go-1.4 on High Sierra 10.13.
{{{
diff --git a/lang/go-1.4/Portfile b/lang/go-1.4/Portfile
index a37873670..7106678e5 100644
--- a/lang/go-1.4/Portfile
+++ b/lang/go-1.4/Portfile
@@ -62,6 +62,11 @@ build.env GOROOT=${GOROOT} \
GOROOT_FINAL=${GOROOT_FINAL} \
CC=${configure.cc} \
GCC=${configure.cc}
+# disable cgo
+# https://github.com/golang/go/issues/21908
+if {${os.major} >= 17} {
+ build.env-append CGO_ENABLED=0
+}
use_parallel_build no
}}}
--
Ticket URL: <https://trac.macports.org/ticket/54797#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list