XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
25.49k stars 3.94k forks source link

Closed #3352

Closed phenomenonRT closed 6 months ago

phenomenonRT commented 6 months ago

完整性要求

版本

No response

描述

go version go1.22.3 windows/amd64

go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" ./main go: downloading google.golang.org/protobuf v1.33.0 go: downloading google.golang.org/grpc v1.63.2 go: downloading github.com/quic-go/quic-go v0.42.0 go: downloading golang.org/x/net v0.24.0 go: downloading github.com/sagernet/sing v0.3.8 go: downloading go4.org/netipx v0.0.0-20231129151722-fdeea329fbba go: downloading golang.org/x/crypto v0.22.0 go: downloading github.com/pires/go-proxyproto v0.7.0 go: downloading github.com/refraction-networking/utls v1.6.4 go: downloading golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 go: downloading gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489 go: downloading github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19 go: downloading github.com/gorilla/websocket v1.5.1 go: downloading golang.org/x/sys v0.19.0 go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240308144416-29370a3891b7 go: downloading github.com/sagernet/sing-shadowsocks v0.2.6 go: downloading github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 go: downloading github.com/pelletier/go-toml v1.9.5 go: downloading github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 go: downloading github.com/cloudflare/circl v1.3.8 go: downloading github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb go: downloading github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e go: downloading golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 go: downloading lukechampine.com/blake3 v1.2.2 go: downloading golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 go: downloading github.com/andybalholm/brotli v1.1.0 go: downloading github.com/klauspost/compress v1.17.7 go: downloading github.com/francoispqt/gojay v1.2.13 go: downloading gopkg.in/yaml.v2 v2.4.0 go: downloading github.com/google/btree v1.1.2 go: downloading golang.org/x/time v0.5.0 go: downloading golang.org/x/text v0.14.0 go: downloading github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 go: downloading github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 go: downloading github.com/klauspost/cpuid/v2 v2.2.7 .# github.com/xtls/xray-core/main main\main.go:17:4: undefined: cmdRun

重现方式

$env:CGO_ENABLED=0 go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" ./main

日志

No response

Fangliding commented 6 months ago

本地go环境问题 这个cmdRun是有的 https://github.com/XTLS/Xray-core/blob/07350533488193175764a43f7e0bfe5c1efabed2/main/run.go#L24

phenomenonRT commented 6 months ago

@Fangliding I understand, but I've tried to build it on both Linux and Windows with freshly installed versions and I've also tried different versions. Could someone check it? Or how can I fix the error?

Fangliding commented 6 months ago

@Fangliding I understand, but I've tried to build it on both Linux and Windows with freshly installed versions and I've also tried different versions. Could someone check it? Or how can I fix the error?

What can I say? I can't take your computer and check it. This place is for providing feedback on Xray-core issues, not a golang beginner's help area. Perhaps you should go to a more suitable community.