如何使 thrift 0.8 构建 go 库?

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

How to make thrift 0.8 build go library?

问题

我下载了thrift 0.8的压缩包,我的GOROOT是"/home/alex/go",为了确保在编译thrift时能够构建go库,应该修改什么?

目前,运行./configure时得到以下输出:

.......
Building PHP Library ......... : no
Building Erlang Library ...... : yes
Building Go Library .......... : no     (这是说go库不会被构建吗?)
英文:

I download thrift 0.8 tarball,and my GOROOT is "/home/alex/go",what should be modified to make sure go library got built when compile thrift?

Currently,when run ./configure got

.......
Building PHP Library ......... : no
Building Erlang Library ...... : yes
Building Go Library .......... : no     (is this saying go library won't be built?)

答案1

得分: 1

configure:19244: 检查是否有6g
configure:19274: 结果: /home/jarod/dev/go/go-hg/bin//6g
configure:19284: 检查是否有6l
configure:19314: 结果: /home/jarod/dev/go/go-hg/bin//6l
configure:19324: 检查是否有gomake
configure:19354: 结果: /home/jarod/dev/go/go-hg/bin//gomake
configure:19364: 检查是否有goinstall
configure:19394: 结果: /home/jarod/dev/go/go-hg/bin//goinstall

英文:

thrift do not support Go 1 yet. The configure script try to find the old go commands to build go library.

configure:19244: checking for 6g
configure:19274: result: /home/jarod/dev/go/go-hg/bin//6g
configure:19284: checking for 6l
configure:19314: result: /home/jarod/dev/go/go-hg/bin//6l
configure:19324: checking for gomake
configure:19354: result: /home/jarod/dev/go/go-hg/bin//gomake
configure:19364: checking for goinstall
configure:19394: result: /home/jarod/dev/go/go-hg/bin//goinstall

答案2

得分: 0

首先,运行./configure --help,查找类似--enable-go--with-go的命令行选项,可能构建Go库默认情况下并没有尝试。我从未尝试过自己构建thrift,所以不清楚是否正确;请自行检查。

如果你确定默认情况下启用了构建Go库,你需要检查为什么configure对你的环境不满意。查看由./configure运行产生的config.log文件,并在其中搜索“Building go Library”子字符串,大约在其出现附近,你会找到configure脚本执行的测试以及失败的原因。

如果调查后仍然不清楚原因,请查看configure脚本代码,它只是一个shell脚本(复杂但对于程序员来说仍然可读)。

英文:

First of all, run ./configure --help and look for something like --enable-go or --with-go command line options — it may well happen that building of the Go library is just not attempted by default. I have never tried to build thrift myself so I have no idea about whether it's true or not; check yourself.

If you're sure building of the Go library is enabled by default, you'll have to check why configure was not satisfied with your environment. Look at the config.log file produced by the ./configure run and search for the "Building go Library" substring in there — somewhere around its occurence, you'll find what test the configure script performed, and why it failed.

If the cause is still unclear after investigation, look at the configure script code — it's just a shell script after all (complex but still readable for a programmer).

huangapple
  • 本文由 发表于 2012年6月25日 17:43:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/11186871.html
匿名

发表评论

匿名网友

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

确定