<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some reminiscences, some memories &#187; gfw</title>
	<atom:link href="http://www.mikespook.com/index.php/tag/gfw/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mikespook.com</link>
	<description>Just another boring day</description>
	<lastBuildDate>Tue, 10 Jan 2012 03:14:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>网络原因引起的 Golang 编译错误</title>
		<link>http://www.mikespook.com/2011/04/%e7%bd%91%e7%bb%9c%e5%8e%9f%e5%9b%a0%e5%bc%95%e8%b5%b7%e7%9a%84-golang-%e7%bc%96%e8%af%91%e9%94%99%e8%af%af/</link>
		<comments>http://www.mikespook.com/2011/04/%e7%bd%91%e7%bb%9c%e5%8e%9f%e5%9b%a0%e5%bc%95%e8%b5%b7%e7%9a%84-golang-%e7%bc%96%e8%af%91%e9%94%99%e8%af%af/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 03:21:27 +0000</pubDate>
		<dc:creator>mikespook</dc:creator>
				<category><![CDATA[Golang]]></category>
		<category><![CDATA[gfw]]></category>
		<category><![CDATA[golang]]></category>
		<category><![CDATA[编译]]></category>
		<category><![CDATA[错误]]></category>

		<guid isPermaLink="false">http://www.mikespook.com/?p=955</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
由于众所周知的原因，强大的 GFW 会引起 Go 语言编译时在对DNS相关进行测试时失败。当然如果人品不错，没有公网连接，不受GFW的影响……还是会在网络相关的那部分包的测试中失败。导致无法正常安装 Golang。

错误信息类似如下形式：



<span class="readmore"><a href="http://www.mikespook.com/2011/04/%e7%bd%91%e7%bb%9c%e5%8e%9f%e5%9b%a0%e5%bc%95%e8%b5%b7%e7%9a%84-golang-%e7%bc%96%e8%af%91%e9%94%99%e8%af%af/" title="网络原因引起的 Golang 编译错误">阅读全文——共1449字</a></span>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
<p>由于众所周知的原因，强大的 GFW 会引起 Go 语言编译时在对DNS相关进行测试时失败。当然如果人品不错，没有公网连接，不受GFW的影响……还是会在网络相关的那部分包的测试中失败。导致无法正常安装 Golang。</p>
<p>错误信息类似如下形式：</p>
<pre class="brush: bash; title: ; notranslate">
...
test math
test mime
test mime/multipart
test net
TEST FAIL net
make[1]: Entering directory `/home/mikespook/bin/go/src/pkg/net'
gotest -test.short -test.timeout=120
rm -f _test/net.a
8g -o _gotest_.8 cgo_stub.go dial.go dnsmsg.go fd_linux.go hosts.go ip.go ipsock.go iprawsock.go lookup.go net.go parse.go pipe.go sock.go tcpsock.go udpsock.go unixsock.go  newpollserver.go fd.go file.go dnsconfig.go dnsclient.go port.go  dialgoogle_test.go dnsname_test.go file_test.go hosts_test.go ip_test.go ipraw_test.go multicast_test.go net_test.go parse_test.go pipe_test.go port_test.go server_test.go srv_test.go timeout_test.go
rm -f _test/net.a
gopack grc _test/net.a _gotest_.8
--- FAIL: net.TestLookupCNAME (0.02 seconds)
	LookupCNAME(&quot;www.google.com.&quot;) = &quot;www-g-com-chn.l.google.com.&quot;, &lt;nil&gt;, want &quot;www.l.google.com.&quot;, nil
FAIL
gotest: &quot;./8.out -test.short=true -test.timeout=120&quot; failed: exit status 1
make[1]: *** [testshort] Error 2
make[1]: Leaving directory `/home/mikespook/bin/go/src/pkg/net'
make: *** [net.testshort] 错误 1
</pre>
<p>解决这个问题的办法很简单，之前在推上我也有发过。但是自己安装 Golang 的时候遇到网络异常，却经常忘记这个设置，接二连三的要动手查 Makefile 。随记录于此，方便备查。<br />
<span id="more-955"></span><br />
按照 Golang weekly.2011-04-13 版本来说，$GOROOT/src/pkg/Makefile 文件、205-208 行是用于屏蔽无外网情况下测试的：</p>
<pre class="brush: bash; title: ; notranslate">
# Disable tests that depend on an external network.
ifeq ($(DISABLE_NET_TESTS),1)
NOTEST+=net syslog
endif
</pre>
<p>我们看到一个环境变量 $DISABLE_NET_TESTS，当其等于 1 时就可以屏蔽外部网络测试。</p>
<p>因此，在 shell 中设定这个环境变量：</p>
<pre class="brush: bash; title: ; notranslate">
export DISABLE_NET_TESTS=1
</pre>
<p>即可正常编译 Golang 了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespook.com/2011/04/%e7%bd%91%e7%bb%9c%e5%8e%9f%e5%9b%a0%e5%bc%95%e8%b5%b7%e7%9a%84-golang-%e7%bc%96%e8%af%91%e9%94%99%e8%af%af/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>google 挂了？</title>
		<link>http://www.mikespook.com/2008/07/google-%e6%8c%82%e4%ba%86%ef%bc%9f/</link>
		<comments>http://www.mikespook.com/2008/07/google-%e6%8c%82%e4%ba%86%ef%bc%9f/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 13:58:37 +0000</pubDate>
		<dc:creator>mikespook</dc:creator>
				<category><![CDATA[My life]]></category>
		<category><![CDATA[gfw]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.mikespook.com/?p=140</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
刚才访问 google.com 提示是 MYSQL ERROR，之后再刷新就成了 114 的那个域名未找到。但是 google.cn 是好的。

google 挂了？还是特殊时期的 gfw 的功劳？鬼知道！！！

]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
<p>刚才访问 google.com 提示是 MYSQL ERROR，之后再刷新就成了 114 的那个域名未找到。但是 google.cn 是好的。</p>
<p>google 挂了？还是特殊时期的 gfw 的功劳？鬼知道！！！</p>
<p><a href="http://www.mikespook.com/wp-content/uploads/2008/07/google-error.png"><img class="alignnone size-medium wp-image-141" title="google-error" src="http://www.mikespook.com/wp-content/uploads/2008/07/google-error-300x172.png" alt="" width="300" height="172" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespook.com/2008/07/google-%e6%8c%82%e4%ba%86%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

