Lafeng / deblocus

An Excellent Proxy.
MIT License
185 stars 42 forks source link

32位无法编译(手动修改MaxUint32为0xFffFFff也无效) #38

Closed mebest100 closed 8 years ago

mebest100 commented 8 years ago

编译平台:

  1. WIN XP SP3
  2. go1.5.3

先运行: go get github.com/Lafeng/deblocus 然后报错:

C:\mygo>go get github.com/Lafeng/deblocus

github.com/cloudflare/golibs/bytepool

src\github.com\cloudflare\golibs\bytepool\bytepool.go:28: constant 4294967295 ov erflows int src\github.com\cloudflare\golibs\bytepool\bytepool.go:29: constant 4294967295 ov erflows int

然后手动修改src/github.com/cloudflare/golibs/bytepool/bytepool.go 28,29行MaxUint32为0xFffFFff

if tp.maxSize > math.0xFffFFff { tp.maxSize = math.0xFffFFff }

继续运行:go build github.com/Lafeng/deblocus,还是报错:

C:\mygo>go build github.com/Lafeng/deblocus

github.com/cloudflare/golibs/bytepool

src\github.com\cloudflare\golibs\bytepool\bytepool.go:28: syntax error: unexpect ed literal .0, expecting { src\github.com\cloudflare\golibs\bytepool\bytepool.go:31: non-declaration statem ent outside function body src\github.com\cloudflare\golibs\bytepool\bytepool.go:39: non-declaration statem ent outside function body src\github.com\cloudflare\golibs\bytepool\bytepool.go:40: syntax error: unexpect ed }

然后尝试用git clone的方法check out dev分支:

C:\Documents and Settings\Administrator>git clone https://github.com/Lafeng/debl ocus.git Cloning into 'deblocus'... remote: Counting objects: 1997, done. Rremote: Total 1997 (delta 0), reused 0 (delta 0), pack-reused 1997eceiving obje

Receiving objects: 100% (1997/1997), 11.90 MiB | 222.00 KiB/s, done. Resolving deltas: 100% (1352/1352), done. Checking connectivity... done.

C:\Documents and Settings\Administrator>cd deblocus

C:\Documents and Settings\Administrator\deblocus>git checkout dev Branch dev set up to track remote branch dev from origin. Switched to a new branch 'dev'

但是在github.com目录下找不到cloudflare目录,根本无法修改bytepool.go。

这个到底怎么搞?请指教,谢谢!

vickery commented 8 years ago

删掉这几句 if tp.maxSize > math.0xFffFFff { tp.maxSize = math.0xFffFFff } 和import math 还有,非常不建议用在32位系统,wiki里面也有说明。