[GH-ISSUE #521] 用gomini的go-mips32来编译最新版的frp #402

Closed
opened 2026-05-05 12:12:56 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @Nick-Hopps on GitHub (Nov 13, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/521

因为我的路由器是mipsle架构的,如果lede的内核不开FPU用不了。于是之前我自己编译Lede,开启FPU,但是使用过程中还是发现很多问题,于是现在又用回了官方版本,但是这样就用不了FRP了,不过听说用gomini编译是不会要求开启FPU,因此我就按照网上的教程操作:

编译在openwrt上运行的frp

并且把安装脚本修改了一下:

#设置环境变量
export GOROOT=~/go-mips32
export GOPATH=~/go-mips32/src/gocode
export PATH=~/go-mips32/bin:$PATH
export GOOS=linux
export GOARCH=mips32le
#下载依赖
go get -v github.com/docopt/docopt-go
go get -v github.com/fatedier/frp/client
go get -v github.com/fatedier/frp/models/config
go get -v github.com/fatedier/frp/utils/log
go get -v github.com/fatedier/frp/utils/version
go get -v github.com/vaughan0/go-ini
#编译
go fmt ./...
go fmt ./tests/echo_server.go
go fmt ./tests/http_server.go
go fmt ./tests/func_test.go
go build -o bin/frps ./cmd/frps
go build -o bin/frpc ./cmd/frpc
go build -o tests/bin/echo_server ./tests/echo_server.go
go build -o tests/bin/http_server ./tests/http_server.go

在运行 go get -v github.com/fatedier/frp/client 的过程中会遇到这样的问题:

golang.org/x/net/internal/socket
# golang.org/x/net/internal/socket
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:8: sysRECVMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_arm64.go:8
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:9: sysSENDMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_arm64.go:9
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:8: sysRECVMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:8
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:9: sysSENDMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:9
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:8: sysRECVMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:8
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:9: sysSENDMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:9
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:8: sysRECVMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:8
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:9: sysSENDMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:9
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_ppc64.go:8: sysRECVMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:8
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_ppc64.go:9: sysSENDMMSG redeclared in this block
        previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:9
../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_ppc64.go:9: too many errors

然后编译也会出现这样的问题,网上也找不到解决的办法,求各位大神帮助一下。

Originally created by @Nick-Hopps on GitHub (Nov 13, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/521 因为我的路由器是mipsle架构的,如果lede的内核不开FPU用不了。于是之前我自己编译Lede,开启FPU,但是使用过程中还是发现很多问题,于是现在又用回了官方版本,但是这样就用不了FRP了,不过听说用gomini编译是不会要求开启FPU,因此我就按照网上的教程操作: [编译在openwrt上运行的frp](http://www.jianshu.com/p/e83223af906a) 并且把安装脚本修改了一下: ```sh #设置环境变量 export GOROOT=~/go-mips32 export GOPATH=~/go-mips32/src/gocode export PATH=~/go-mips32/bin:$PATH export GOOS=linux export GOARCH=mips32le #下载依赖 go get -v github.com/docopt/docopt-go go get -v github.com/fatedier/frp/client go get -v github.com/fatedier/frp/models/config go get -v github.com/fatedier/frp/utils/log go get -v github.com/fatedier/frp/utils/version go get -v github.com/vaughan0/go-ini #编译 go fmt ./... go fmt ./tests/echo_server.go go fmt ./tests/http_server.go go fmt ./tests/func_test.go go build -o bin/frps ./cmd/frps go build -o bin/frpc ./cmd/frpc go build -o tests/bin/echo_server ./tests/echo_server.go go build -o tests/bin/http_server ./tests/http_server.go ``` 在运行 `go get -v github.com/fatedier/frp/client` 的过程中会遇到这样的问题: ```sh golang.org/x/net/internal/socket # golang.org/x/net/internal/socket ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:8: sysRECVMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_arm64.go:8 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:9: sysSENDMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_arm64.go:9 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:8: sysRECVMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:8 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:9: sysSENDMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips.go:9 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:8: sysRECVMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:8 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:9: sysSENDMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64.go:9 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:8: sysRECVMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:8 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:9: sysSENDMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mips64le.go:9 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_ppc64.go:8: sysRECVMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:8 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_ppc64.go:9: sysSENDMMSG redeclared in this block previous declaration at ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_mipsle.go:9 ../go-mips32/src/gocode/src/golang.org/x/net/internal/socket/sys_linux_ppc64.go:9: too many errors ``` 然后编译也会出现这样的问题,网上也找不到解决的办法,求各位大神帮助一下。
Author
Owner

@Nick-Hopps commented on GitHub (Nov 13, 2017):

现在应该只能等go的官方解决这个问题了

<!-- gh-comment-id:343990813 --> @Nick-Hopps commented on GitHub (Nov 13, 2017): 现在应该只能等go的官方解决这个问题了
Author
Owner

@IxsCN commented on GitHub (Nov 19, 2017):

我编译了未开启 FPU emulator 也能使用的版本,现在只有 mipsle (MTK 762x)。
需要的可以试试
https://github.com/IxsCN/frpc_mipsle_noFPU

<!-- gh-comment-id:345501511 --> @IxsCN commented on GitHub (Nov 19, 2017): 我编译了未开启 FPU emulator 也能使用的版本,现在只有 mipsle (MTK 762x)。 需要的可以试试 https://github.com/IxsCN/frpc_mipsle_noFPU
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#402
No description provided.