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]: 因brook、v2ray-core、v2ray-plugin 的quic-go模块版本不支持go 1.21导致编译失败 #2837

Closed
chenmozhijin opened this issue Oct 1, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@chenmozhijin
Copy link

chenmozhijin commented Oct 1, 2023

描述您遇到的bug

拉取openwrt官方v23.05.0-rc4编译brook、v2ray-core、v2ray-plugin 时报错

复现此Bug的步骤

拉取最新pallwall源码编译

您想要实现的目的

希望更新 xiaorouji/openwrt-passwall-packages 中的brook到 txthinking/brook@ac855e6 及以后的提交,v2ray-plugin到 teddysun/v2ray-plugin@2d154db 及以后的提交。
不行打个补丁升级一下也可以。
brook-ac855e6dbc46f0e085734836556da2cdb9386fa3.patch
v2ray-plugin-2d154dbd36e97819b1c8a112c896b7a0b1931462.patch
目前brook 20230606不支持golang 1.20及以上版本

日志信息

2023-09-30T23:22:44.5106444Z CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="" GO_BUILD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GO_MOD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/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/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/brook-20230606" GO_BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/brook-20230606/.go_work/build" GO_BUILD_BIN_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/brook-20230606/.go_work/build/bin/linux_arm64" GO_BUILD_DEPENDS_PATH="/usr/share/gocode" GO_BUILD_DEPENDS_SRC="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/share/gocode/src" GOOS="linux" GOARCH="arm64" GO386="" GOAMD64="" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_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/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/include -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/include/fortify -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_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/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -znow -zrelro" GOPATH="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/brook-20230606/.go_work/build" GOCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GOMODCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GOENV=off GOTOOLCHAIN=local /usr/bin/env bash /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/feeds/packages/lang/golang//golang-build.sh build -v -buildvcs=false -trimpath -ldflags "all=-buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"          
2023-09-30T23:22:44.5159797Z Finding targets
2023-09-30T23:22:44.8954238Z 
2023-09-30T23:22:44.8954795Z Building targets
2023-09-30T23:22:45.5456383Z github.com/quic-go/quic-go/internal/qtls
2023-09-30T23:22:45.6182501Z # github.com/quic-go/quic-go/internal/qtls
2023-09-30T23:22:45.6184592Z ../../../../../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
2023-09-30T23:22:45.7279788Z 
2023-09-30T23:22:45.7804513Z make[2]: *** [Makefile:48: /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/brook-20230606/.built] Error 1
2023-09-30T23:22:45.7805363Z make[2]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/brook'
2023-09-30T23:22:45.7813881Z time: package/cmzj_package/openwrt-passwall-packages/brook/compile#0.61#0.48#1.45
2023-09-30T23:22:45.7817257Z     ERROR: package/cmzj_package/openwrt-passwall-packages/brook failed to build.
2023-09-30T23:22:45.7820244Z make[1]: *** [package/Makefile:120: package/cmzj_package/openwrt-passwall-packages/brook/compile] Error 1
2023-09-30T23:22:45.7829040Z make[1]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt'
2023-09-30T23:22:45.7834353Z make: *** [/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/include/toplevel.mk:232: package/compile] Error 2
2023-09-30T23:22:45.7888818Z ##[error]Process completed with exit code 2.

截图

No response

系统相关信息

openwrt: v23.05.0-rc4
brook: 20230606

其他信息

No response

@chenmozhijin chenmozhijin added the bug Something isn't working label Oct 1, 2023
chenmozhijin added a commit to chenmozhijin/OpenWrt-K that referenced this issue Oct 1, 2023
@chenmozhijin
Copy link
Author

新错误:

2023-10-01T18:06:29.6383853Z make[2]: Entering directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/v2ray-plugin'
2023-10-01T18:06:29.8036923Z rm -f /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.built
2023-10-01T18:06:29.8069287Z touch /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.built_check
2023-10-01T18:06:29.8103460Z CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="" GO_BUILD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GO_MOD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GO_MOD_ARGS="-modcacherw" GO_PKG="github.com/shadowsocks/v2ray-plugin" GO_INSTALL_EXTRA="" GO_INSTALL_ALL="" GO_SOURCE_ONLY="" GO_BUILD_PKG="github.com/shadowsocks/v2ray-plugin/..." GO_EXCLUDES="" GO_GO_GENERATE="" GO_INSTALL_BIN_PATH="/usr/bin" BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0" GO_BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.go_work/build" GO_BUILD_BIN_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.go_work/build/bin/linux_arm64" GO_BUILD_DEPENDS_PATH="/usr/share/gocode" GO_BUILD_DEPENDS_SRC="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/share/gocode/src" GOOS="linux" GOARCH="arm64" GO386="" GOAMD64="" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0=v2ray-plugin-5.7.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/include -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/include/fortify -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0=v2ray-plugin-5.7.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -znow -zrelro" GOPATH="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.go_work/build" GOCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GOMODCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GOENV=off GOTOOLCHAIN=local /usr/bin/env bash /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/feeds/packages/lang/golang//golang-build.sh build -v -buildvcs=false -trimpath -ldflags "all=-buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"        -ldflags " -X main.VERSION=v5.7.0 -buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"  
2023-10-01T18:06:29.8151618Z Finding targets
2023-10-01T18:06:30.0900272Z 
2023-10-01T18:06:30.0901115Z Building targets
2023-10-01T18:06:30.5639348Z github.com/quic-go/quic-go/internal/qtls
2023-10-01T18:06:30.6200521Z # github.com/quic-go/quic-go/internal/qtls
2023-10-01T18:06:30.6202487Z ../../../../../dl/go-mod-cache/github.com/quic-go/quic-go@v0.33.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
2023-10-01T18:06:30.6356107Z 
2023-10-01T18:06:30.8128897Z make[2]: *** [Makefile:44: /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.built] Error 1
2023-10-01T18:06:30.8130994Z make[2]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/v2ray-plugin'
2023-10-01T18:06:30.8140005Z time: package/cmzj_package/openwrt-passwall-packages/v2ray-plugin/compile#0.70#0.44#1.18
2023-10-01T18:06:30.8141332Z     ERROR: package/cmzj_package/openwrt-passwall-packages/v2ray-plugin failed to build.
2023-10-01T18:06:30.8146881Z make[1]: *** [package/Makefile:120: package/cmzj_package/openwrt-passwall-packages/v2ray-plugin/compile] Error 1
2023-10-01T18:06:30.8157585Z make[1]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt'
2023-10-01T18:06:30.8168141Z make: *** [/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/include/toplevel.mk:232: package/compile] Error 2
2023-10-01T18:06:30.8278424Z ##[error]Process completed with exit code 2.

@Gzxhwq
Copy link
Collaborator

Gzxhwq commented Oct 2, 2023

新错误:

2023-10-01T18:06:29.6383853Z make[2]: Entering directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/v2ray-plugin'
2023-10-01T18:06:29.8036923Z rm -f /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.built
2023-10-01T18:06:29.8069287Z touch /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.built_check
2023-10-01T18:06:29.8103460Z CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="" GO_BUILD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GO_MOD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GO_MOD_ARGS="-modcacherw" GO_PKG="github.com/shadowsocks/v2ray-plugin" GO_INSTALL_EXTRA="" GO_INSTALL_ALL="" GO_SOURCE_ONLY="" GO_BUILD_PKG="github.com/shadowsocks/v2ray-plugin/..." GO_EXCLUDES="" GO_GO_GENERATE="" GO_INSTALL_BIN_PATH="/usr/bin" BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0" GO_BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.go_work/build" GO_BUILD_BIN_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.go_work/build/bin/linux_arm64" GO_BUILD_DEPENDS_PATH="/usr/share/gocode" GO_BUILD_DEPENDS_SRC="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/share/gocode/src" GOOS="linux" GOARCH="arm64" GO386="" GOAMD64="" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0=v2ray-plugin-5.7.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/include -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/include/fortify -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0=v2ray-plugin-5.7.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -znow -zrelro" GOPATH="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.go_work/build" GOCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GOMODCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GOENV=off GOTOOLCHAIN=local /usr/bin/env bash /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/feeds/packages/lang/golang//golang-build.sh build -v -buildvcs=false -trimpath -ldflags "all=-buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"        -ldflags " -X main.VERSION=v5.7.0 -buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"  
2023-10-01T18:06:29.8151618Z Finding targets
2023-10-01T18:06:30.0900272Z 
2023-10-01T18:06:30.0901115Z Building targets
2023-10-01T18:06:30.5639348Z github.com/quic-go/quic-go/internal/qtls
2023-10-01T18:06:30.6200521Z # github.com/quic-go/quic-go/internal/qtls
2023-10-01T18:06:30.6202487Z ../../../../../dl/go-mod-cache/github.com/quic-go/quic-go@v0.33.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
2023-10-01T18:06:30.6356107Z 
2023-10-01T18:06:30.8128897Z make[2]: *** [Makefile:44: /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-aarch64_cortex-a72_musl/v2ray-plugin-5.7.0/.built] Error 1
2023-10-01T18:06:30.8130994Z make[2]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/v2ray-plugin'
2023-10-01T18:06:30.8140005Z time: package/cmzj_package/openwrt-passwall-packages/v2ray-plugin/compile#0.70#0.44#1.18
2023-10-01T18:06:30.8141332Z     ERROR: package/cmzj_package/openwrt-passwall-packages/v2ray-plugin failed to build.
2023-10-01T18:06:30.8146881Z make[1]: *** [package/Makefile:120: package/cmzj_package/openwrt-passwall-packages/v2ray-plugin/compile] Error 1
2023-10-01T18:06:30.8157585Z make[1]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt'
2023-10-01T18:06:30.8168141Z make: *** [/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/include/toplevel.mk:232: package/compile] Error 2
2023-10-01T18:06:30.8278424Z ##[error]Process completed with exit code 2.

这个要等v2ray发布新版才能适配go 1.21

@chenmozhijin
Copy link
Author

好像都是 github.com/quic-go/quic-go 版本的问题,能不能加个补丁,把 quic-go 版本更新一下?

@Gzxhwq
Copy link
Collaborator

Gzxhwq commented Oct 2, 2023

私下怎么搞都可以,公开仓库只能跟随上游的正规发布版,最起码也要用有tag的,不可能用git commit,更积极的方法是去上游提意见发新版

@chenmozhijin
Copy link
Author

teddysun/v2ray-plugin@2d154db
v2ray-plugin 最新提交已经支持go 1.21了

@chenmozhijin
Copy link
Author

chenmozhijin commented Oct 3, 2023

v2ray-core还是不行

https://github.com/v2fly/v2ray-core/blob/99c9beac4e0c4fe1216ab801a1b375626fd16502/go.mod#L69C2-L69C51

v2fly/v2ray-core#2701

2023-10-01T23:16:48.8727808Z make[2]: Entering directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/v2ray-core'
2023-10-01T23:16:49.0445236Z rm -f /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0/.built
2023-10-01T23:16:49.0475872Z touch /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0/.built_check
2023-10-01T23:16:49.0509079Z CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="" GO_BUILD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GO_MOD_CACHE_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GO_MOD_ARGS="-modcacherw" GO_PKG="github.com/v2fly/v2ray-core/v5" GO_INSTALL_EXTRA="" GO_INSTALL_ALL="" GO_SOURCE_ONLY="" GO_BUILD_PKG="github.com/v2fly/v2ray-core/v5/main" GO_EXCLUDES="" GO_GO_GENERATE="" GO_INSTALL_BIN_PATH="/usr/bin" BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0" GO_BUILD_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0/.go_work/build" GO_BUILD_BIN_DIR="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0/.go_work/build/bin" GO_BUILD_DEPENDS_PATH="/usr/share/gocode" GO_BUILD_DEPENDS_SRC="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/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/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0=v2ray-core-5.7.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/include -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/include/fortify -I/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/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/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0=v2ray-core-5.7.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -znow -zrelro" GOPATH="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0/.go_work/build" GOCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/tmp/go-build" GOMODCACHE="/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/dl/go-mod-cache" GOENV=off GOTOOLCHAIN=local /usr/bin/env bash /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/feeds/packages/lang/golang//golang-build.sh build -v -buildvcs=false -trimpath -ldflags "all=-buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"        -ldflags " -X github.com/v2fly/v2ray-core/v5.build=OpenWrt -X github.com/v2fly/v2ray-core/v5.version=5.7.0 -buildid '1695979776' -linkmode external -extldflags '-L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib -Wl,-z,now -Wl,-z,relro'"  
2023-10-01T23:16:49.0570198Z Finding targets
2023-10-01T23:16:49.4380469Z 
2023-10-01T23:16:49.4382015Z Building targets
2023-10-01T23:16:49.8979026Z github.com/quic-go/quic-go/internal/qtls
2023-10-01T23:16:49.9527335Z # github.com/quic-go/quic-go/internal/qtls
2023-10-01T23:16:49.9528673Z ../../../../../dl/go-mod-cache/github.com/quic-go/quic-go@v0.33.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
2023-10-01T23:16:50.3258435Z 
2023-10-01T23:16:50.5710213Z make[2]: *** [Makefile:113: /home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/build_dir/target-x86_64_musl/v2ray-core-5.7.0/.built] Error 1
2023-10-01T23:16:50.5712325Z make[2]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/package/cmzj_package/openwrt-passwall-packages/v2ray-core'
2023-10-01T23:16:50.5720674Z time: package/cmzj_package/openwrt-passwall-packages/v2ray-core/compile#0.94#0.74#1.70
2023-10-01T23:16:50.5722135Z     ERROR: package/cmzj_package/openwrt-passwall-packages/v2ray-core failed to build.
2023-10-01T23:16:50.5725889Z make[1]: *** [package/Makefile:120: package/cmzj_package/openwrt-passwall-packages/v2ray-core/compile] Error 1
2023-10-01T23:16:50.5733154Z make[1]: Leaving directory '/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt'
2023-10-01T23:16:50.5738551Z make: *** [/home/runner/work/OpenWrt-K/OpenWrt-K/workspace/openwrt/include/toplevel.mk:232: package/compile] Error 2
2023-10-01T23:16:50.5909648Z ##[error]Process completed with exit code 2.

@chenmozhijin chenmozhijin changed the title [Bug]: openwrt v23.05.0-rc4编译失败 [Bug]: 因brook、v2ray-core、v2ray-plugin 的quic-go模块版本不支持go 1.21导致编译失败 Oct 3, 2023
@Gzxhwq
Copy link
Collaborator

Gzxhwq commented Oct 5, 2023

Fixed.

@Gzxhwq Gzxhwq closed this as completed Oct 5, 2023
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