'Go' windows port build problems: 8l linker crashes

时光毁灭记忆、已成空白 提交于 2019-12-13 05:45:32

问题


I'm looking to give the 'Go' programming language a try but I'm having trouble getting even a simple test example to work. I think it's probably an issue with the port so I've submitted a ticket under issues in gomingw project page.


What steps will reproduce the problem?

  1. Create any simple go test program
  2. compile it with 8g. ie. 8g hello.go
  3. link it with 8l. ie. 8l hello.8

What is the expected output? What do you see instead?

I expect 8l to link successfully with no errors. Instead I see the follow errors output followed with a crash.

>        goos is not known: mingw
>        warning: uanble to find runtime.a
>        runtime.morestack not defined

What version of the product are you using? On what operating system?

This is on windows 7 with gowin32_2010-12-02.zip

Please provide any additional information below.

I have set the 4 standard go variables on my environment as follows: goos = mingw, gobin = G:\oss\go\bin, goarch = 386, goroot = G:\oss\go

From looking at the error, I'm going to say it looks like it needs something from mingw gcc toolset? Though I see no mention of this requirement anywhere, neither in the readme or install. What is the runtime.a that is missing? Is it part of mingw? I've also tried one version before this latest one and the problem is present on that version as well.


Has anyone else that's tried Go's port of windows encountered an issue like this? What could be causing this?

Thanks


回答1:


The reason for the failure is stated in the error message: goos is not known: mingw. Read the instructions for setting the GOOS environment variable. Set GOOS=windows.

You should also be using the latest release of the Go Windows port binary.



来源:https://stackoverflow.com/questions/4383377/go-windows-port-build-problems-8l-linker-crashes

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