Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump templexxx/cpu version and add support for linux/loong64 #4367

Merged
merged 3 commits into from
Aug 6, 2024
Merged

bump templexxx/cpu version and add support for linux/loong64 #4367

merged 3 commits into from
Aug 6, 2024

Conversation

KatyushaScarlet
Copy link
Contributor

WHY

Loong64 has been officially supported since Go 1.19. The frp is a well-known and commonly used reverse proxy project, adding loong64 port for frp will enable frp to be widely used on the new architecture.

Result

  1. Bump templexxx/cpu from V0.1.0 to latest version fix below error on linux/loong64.
go version go1.22.5 linux/loong64
go fmt ./...
env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -tags frps -o bin/frps ./cmd/frps
# github.com/templexxx/cpu
../../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:93:14: undefined array length CacheLineSize or missing type constraint
../../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:105:14: undefined array length CacheLineSize or missing type constraint
../../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:113:15: undefined array length CacheLineSize or missing type constraint
../../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:138:15: undefined array length CacheLineSize or missing type constraint
../../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:144:19: undefined array length CacheLineSize or missing type constraint
../../go/pkg/mod/github.com/templexxx/cpu@v0.1.0/cpu.go:161:19: undefined array length CacheLineSize or missing type constraint
make: *** [Makefile:32: frps] Error 1
  1. Add support for packing loong64 port by default.
go version go1.22.5 linux/loong64
go fmt ./...
env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -tags frps -o bin/frps ./cmd/frps
env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -tags frpc -o bin/frpc ./cmd/frpc
build version: 0.60.0
Build darwin-amd64...
Build darwin-amd64 done
Build darwin-arm64...
Build darwin-arm64 done
Build freebsd-amd64...
Build freebsd-amd64 done
Build linux-amd64...
Build linux-amd64 done
Build linux-arm (7)...
Build linux-arm (7) done
Build linux-arm (5)...
Build linux-arm (5) done
Build linux-arm64...
Build linux-arm64 done
Build windows-amd64...
Build windows-amd64 done
Build windows-arm64...
Build windows-arm64 done
Build linux-mips64...
Build linux-mips64 done
Build linux-mips64le...
Build linux-mips64le done
Build linux-mips (softfloat)...
Build linux-mips (softfloat) done
Build linux-mipsle (softfloat)...
Build linux-mipsle (softfloat) done
Build linux-riscv64...
Build linux-riscv64 done
Build linux-loong64...
Build linux-loong64 done
Build android-arm64...
Build android-arm64 done
  1. Tested on Loongson 3A6000, everything is fine.

@fatedier
Copy link
Owner

fatedier commented Aug 5, 2024

We prefer to use a stable version number rather than the latest commit. Additionally, could you help push for a new tag to be created in that repository?

@KatyushaScarlet
Copy link
Contributor Author

We prefer to use a stable version number rather than the latest commit. Additionally, could you help push for a new tag to be created in that repository?

OK, I will remind the repo owner.

@KatyushaScarlet
Copy link
Contributor Author

We prefer to use a stable version number rather than the latest commit. Additionally, could you help push for a new tag to be created in that repository?

Done! We are now using cpu v0.1.1.

@fatedier fatedier merged commit d47e138 into fatedier:dev Aug 6, 2024
2 checks passed
github-actions bot added a commit to aiastia-dockerhub/frp that referenced this pull request Aug 6, 2024
* https://github.com/fatedier/frp:
  bump templexxx/cpu version and add support for linux/loong64 (fatedier#4367)
@fatedier
Copy link
Owner

fatedier commented Aug 7, 2024

@KatyushaScarlet I overlooked this before; we shouldn't directly modify the indirect references. This library is introduced by github.com/xtaci/kcp-go/v5 and is not used directly in frp. This may lead to some unexpected issues in future code maintenance.

fatedier added a commit that referenced this pull request Aug 7, 2024
@fatedier
Copy link
Owner

fatedier commented Aug 7, 2024

#4373

Temporarily using replace until kcp-go import the new version.

@KatyushaScarlet
Copy link
Contributor Author

@KatyushaScarlet I overlooked this before; we shouldn't directly modify the indirect references. This library is introduced by github.com/xtaci/kcp-go/v5 and is not used directly in frp. This may lead to some unexpected issues in future code maintenance.

OK, I'll ask them if they'd be willing to bump the cpu packages to v0.1.1

aircross pushed a commit to aircross/frp that referenced this pull request Aug 13, 2024
@KatyushaScarlet
Copy link
Contributor Author

KatyushaScarlet commented Aug 16, 2024

Temporarily using replace until kcp-go import the new version.

The kcp-go package just import the new version now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants