'Go' Windows端口构建问题:8l链接器崩溃

huangapple go评论95阅读模式
英文:

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

问题

我想尝试一下Go编程语言,但是我在尝试一个简单的测试示例时遇到了问题。我认为这可能是一个端口的问题,所以我在gomingw项目页面上提交了一个问题票。


重现问题的步骤是什么?

  1. 创建任何简单的Go测试程序
  2. 使用8g编译它。例如:8g hello.go
  3. 使用8l链接它。例如:8l hello.8

期望的输出是什么?实际看到的是什么?

我期望8l能够成功链接并且没有错误。但是实际上,我看到以下错误输出,然后程序崩溃。

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

你使用的产品版本是什么?在什么操作系统上?

这是在Windows 7上使用gowin32_2010-12-02.zip。

请提供任何其他信息。

我已经在我的环境中设置了4个标准的Go变量,如下所示:
goos = mingw, gobin = G:\oss\go\bin, goarch = 386, goroot = G:\oss\go

从错误信息来看,我认为它似乎需要mingw gcc工具集的一些东西?尽管我在自述文件或安装说明中没有看到对此要求的提及。缺失的runtime.a是什么?它是mingw的一部分吗?我之前也尝试过一个版本,但是问题在那个版本上也存在。


有没有其他尝试过Go的Windows端口的人遇到过类似的问题?可能是什么原因引起的?

谢谢

英文:

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

得分: 3

失败的原因在错误信息中已经说明了:goos is not known: mingw。请阅读设置GOOS环境变量的说明,将GOOS设置为windows。

您还应该使用最新版本的Go Windows端口二进制文件

英文:

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.

huangapple
  • 本文由 发表于 2010年12月8日 09:26:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/4383377.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定