OSX Golang static compile, and installing gccgo

不羁岁月 提交于 2019-12-24 12:09:01

问题


To outline my end goal. I want to compile a go application, statically linking to QT5. I have statically compiled QT5. Now I need to compile my Go program.

As I understand it to do this, I have to use gccgo rather than the gc compiler. Fine.

So first I have to install the gccgo compiler, which is gcc with the go language enabled in config.

I have followed this: https://golang.org/doc/install/gccgo

and this seperately: https://solarianprogrammer.com/2016/05/10/compiling-gcc-6-mac-os-x/

to see if I could use a newer version of GCC. However in both cases I receive:

checking for isl 0.16, 0.15, or deprecated 0.14... yes
checking for isl 0.16 or 0.15... yes
configure: error:
The following requested languages could not be built: go
Supported languages are: c,c,c++,fortran,jit,lto,objc,obj-c++

when I run configure before make and make install

So apparently GCC doesn't know about Go even though the Go documentation says this is how to do it?

Anyone got any reliable source for doing this?

来源:https://stackoverflow.com/questions/41765665/osx-golang-static-compile-and-installing-gccgo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!