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

[Bug]: 编译错误 #2744

Closed
sjkhsl opened this issue Sep 5, 2023 · 3 comments
Closed

[Bug]: 编译错误 #2744

sjkhsl opened this issue Sep 5, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sjkhsl
Copy link

sjkhsl commented Sep 5, 2023

描述您遇到的bug

make[3]: Entering directory '/home/sjkhsl/openwrt-main/package/chajianbao/openwrt-passwall/brook'
rm -f /home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.built
touch /home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.built_check
CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="" GO_BUILD_CACHE_DIR="/home/sjkhsl/openwrt-main/tmp/go-build" GO_MOD_CACHE_DIR="/home/sjkhsl/openwrt-main/dl/go-mod-cache" GO_MOD_ARGS="-modcacherw" GO_PKG="github.com/txthinking/brook" GO_INSTALL_EXTRA="" GO_INSTALL_ALL="" GO_SOURCE_ONLY="" GO_BUILD_PKG="github.com/txthinking/brook/cli/brook" GO_EXCLUDES="" GO_GO_GENERATE="" GO_INSTALL_BIN_PATH="/usr/bin" BUILD_DIR="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606" GO_BUILD_DIR="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.go_work/build" GO_BUILD_BIN_DIR="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.go_work/build/bin" GO_BUILD_DEPENDS_PATH="/usr/share/gocode" GO_BUILD_DEPENDS_SRC="/home/sjkhsl/openwrt-main/staging_dir/target-x86_64_musl/usr/share/gocode/src" GOOS="linux" GOARCH="amd64" GO386="" GOAMD64="v1" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606=brook-20230606 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/include -I/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/include/fortify -I/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606=brook-20230606 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -fuse-ld=bfd -znow -zrelro" GOPATH="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.go_work/build" GOCACHE="/home/sjkhsl/openwrt-main/tmp/go-build" GOMODCACHE="/home/sjkhsl/openwrt-main/dl/go-mod-cache" GOENV=off GOTOOLCHAIN=local /usr/bin/env bash /home/sjkhsl/openwrt-main/feeds/packages/lang/golang//golang-build.sh build -v -buildvcs=false -trimpath -ldflags "all=-buildid '1693899643' -linkmode external -extldflags '-L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -fuse-ld=bfd -Wl,-z,now -Wl,-z,relro'"
Finding targets

Building targets
github.com/quic-go/quic-go/internal/qtls
# github.com/quic-go/quic-go/internal/qtls
../../../../../dl/go-mod-cache/github.com/quic-go/quic-go@v0.32.0/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration

make[3]: *** [Makefile:48: /home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.built] Error 1
make[3]: Leaving directory '/home/sjkhsl/openwrt-main/package/chajianbao/openwrt-passwall/brook'
time: package/chajianbao/openwrt-passwall/brook/compile#0.30#5.94#1.88
    ERROR: package/chajianbao/openwrt-passwall/brook failed to build.
make[2]: *** [package/Makefile:120: package/chajianbao/openwrt-passwall/brook/compile] Error 1
make[2]: Leaving directory '/home/sjkhsl/openwrt-main'
make[1]: *** [package/Makefile:114: /home/sjkhsl/openwrt-main/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/sjkhsl/openwrt-main'
make: *** [/home/sjkhsl/openwrt-main/include/toplevel.mk:232: world] Error 2

复现此Bug的步骤

编译时报错

您想要实现的目的

修正错误

日志信息

make[3]: Entering directory '/home/sjkhsl/openwrt-main/package/chajianbao/openwrt-passwall/brook'
rm -f /home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.built
touch /home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.built_check
CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="" GO_BUILD_CACHE_DIR="/home/sjkhsl/openwrt-main/tmp/go-build" GO_MOD_CACHE_DIR="/home/sjkhsl/openwrt-main/dl/go-mod-cache" GO_MOD_ARGS="-modcacherw" GO_PKG="github.com/txthinking/brook" GO_INSTALL_EXTRA="" GO_INSTALL_ALL="" GO_SOURCE_ONLY="" GO_BUILD_PKG="github.com/txthinking/brook/cli/brook" GO_EXCLUDES="" GO_GO_GENERATE="" GO_INSTALL_BIN_PATH="/usr/bin" BUILD_DIR="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606" GO_BUILD_DIR="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.go_work/build" GO_BUILD_BIN_DIR="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.go_work/build/bin" GO_BUILD_DEPENDS_PATH="/usr/share/gocode" GO_BUILD_DEPENDS_SRC="/home/sjkhsl/openwrt-main/staging_dir/target-x86_64_musl/usr/share/gocode/src" GOOS="linux" GOARCH="amd64" GO386="" GOAMD64="v1" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606=brook-20230606 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/include -I/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/include/fortify -I/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606=brook-20230606 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -fuse-ld=bfd -znow -zrelro" GOPATH="/home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.go_work/build" GOCACHE="/home/sjkhsl/openwrt-main/tmp/go-build" GOMODCACHE="/home/sjkhsl/openwrt-main/dl/go-mod-cache" GOENV=off GOTOOLCHAIN=local /usr/bin/env bash /home/sjkhsl/openwrt-main/feeds/packages/lang/golang//golang-build.sh build -v -buildvcs=false -trimpath -ldflags "all=-buildid '1693899643' -linkmode external -extldflags '-L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/sjkhsl/openwrt-main/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -fuse-ld=bfd -Wl,-z,now -Wl,-z,relro'"
Finding targets

Building targets
github.com/quic-go/quic-go/internal/qtls
# github.com/quic-go/quic-go/internal/qtls
../../../../../dl/go-mod-cache/github.com/quic-go/quic-go@v0.32.0/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration

make[3]: *** [Makefile:48: /home/sjkhsl/openwrt-main/build_dir/target-x86_64_musl/brook-20230606/.built] Error 1
make[3]: Leaving directory '/home/sjkhsl/openwrt-main/package/chajianbao/openwrt-passwall/brook'
time: package/chajianbao/openwrt-passwall/brook/compile#0.30#5.94#1.88
    ERROR: package/chajianbao/openwrt-passwall/brook failed to build.
make[2]: *** [package/Makefile:120: package/chajianbao/openwrt-passwall/brook/compile] Error 1
make[2]: Leaving directory '/home/sjkhsl/openwrt-main'
make[1]: *** [package/Makefile:114: /home/sjkhsl/openwrt-main/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/sjkhsl/openwrt-main'
make: *** [/home/sjkhsl/openwrt-main/include/toplevel.mk:232: world] Error 2

截图

No response

系统相关信息

Unfortunately, quic-go is tied to the version of the Go compiler. Any release that we cut supports the two most recent Go version.

This is because the Go standard library TLS implementation, crypto/tls, doesn't expose the APIs necessary for QUIC. We therefore maintain our own fork of crypto/tls, in a separate repository. For example, the qtls code for Go 1.18 lives in https://github.com/marten-seemann/qtls-go1-18.

On the other hand, we really don't want to expose the qtls.Config in the quic-go API. For applications, switching from TLS/TCP to QUIC should be as easy as replacing tls.Listen with quic.Listen with the same tls.Config (or rather, adding quic.Listen, since they probably want to support both).

There have been discussions with the Go team at Google about this design quirk (for example in quic-go#2727), and proposals to add QUIC-capable APIs to crypto/tls in the standard library (see golang/go#44886 and golang/go#32204). Unfortunately, little progress has been made on these issues so far.

其他信息

No response

@sjkhsl sjkhsl added the bug Something isn't working label Sep 5, 2023
@sjkhsl
Copy link
Author

sjkhsl commented Sep 6, 2023

官方openwrt的golang升级到1.21了,退回1.20后可以编译了,大佬,看看是哪里的问题,更新一下呗!

@smallprogram
Copy link
Collaborator

参考
#2773

@smallprogram
Copy link
Collaborator

@sjkhsl 如果你不想用新的op源码,可以先删除feeds\packages\lang\golang目录,再将这个文件解压到feeds\packages\lang目录中。
golang.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants