Go中的间歇性Qtdeploy故障

qmelpv7a  于 2023-11-14  发布在  Go
关注(0)|答案(1)|浏览(149)

我运行的是Windows 10 x64,当我尝试使用qtdeploy test desktop或qtdeploy build desktop构建应用程序时遇到问题
我得到下面列出的错误间歇.我通常能够编译,如果我尝试了几次,有时它根本不会发生.我使用VScode作为我的IDE顺便说一句.我也有我的项目生活在Dropbox目录.它似乎并不重要,如果同步是开或关.任何人都可以提供任何帮助或线索将不胜感激!!
错误中最值得注意的部分:

wm/sbs/launch/cancellations/ui
wm/sbs/launch/cancellations
# wm/sbs/launch/cancellations
C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
collect2.exe: error: ld returned 1 exit status

字符串
My Go env:

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\aellis4\AppData\Local\go-build
set GOENV=C:\Users\aellis4\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\aellis4\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\aellis4\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.3
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\aellis4\Dropbox\WM Projects\Cancellations\Source\Cancellation Process 2.0 - TEST6\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\aellis4\AppData\Local\Temp\go-build1414384863=/tmp/go-build -gno-record-gcc-switches


QtSetup检查:

time="2023-10-20T14:57:44-04:00" level=info msg="running: 'qtsetup check windows' [docker=false] [vagrant=false]"
time="2023-10-20T14:57:44-04:00" level=info msg="GOOS:                        'windows'"
time="2023-10-20T14:57:44-04:00" level=info msg="GOARCH:                      'amd64'"
time="2023-10-20T14:57:44-04:00" level=info msg="GOVERSION:                   'go1.21.3'"
time="2023-10-20T14:57:44-04:00" level=info msg="GOROOT:                   *  'C:\\Program Files\\Go'"
time="2023-10-20T14:57:44-04:00" level=info msg="GOPATH:                   *  'C:\\Users\\aellis4\\go'"
time="2023-10-20T14:57:44-04:00" level=info msg="GOBIN:                       'C:\\Users\\aellis4\\go\\bin'"
time="2023-10-20T14:57:44-04:00" level=info msg="GOMOD:                       'C:\\Users\\aellis4\\Dropbox\\WM Projects\\Cancellations\\Source\\Cancellation Process 2.0 - TEST6\\go.mod'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_HASH:                     'v0.0.0-20200817163748-494d2f8c1ebe'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_API:                      ''"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_VERSION:               *  '5.13.0'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_DIR:                      'C:\\Qt'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_STUB:                     'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_DEBUG:                    'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_QMAKE_DIR:                ''"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_WEBKIT:                   'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_STATIC:                   'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_GEN_GO:                   'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_GEN_OPENGL:               'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_GEN_QUICK_EXTRAS:         'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_RESOURCES_BIG:            'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_NOT_CACHED:               'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_DEBUG_CONSOLE:            'false'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_MSYS2:                 *  'true'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_MSYS2_DIR:                'C:\\msys64\\mingw64'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_MSYS2_ARCH:            *  'amd64'"
time="2023-10-20T14:57:44-04:00" level=info msg="QT_MSYS2_STATIC:          *  'true'"


我不知道从哪里开始,我尝试重新安装zstd库的msys 2版本,但就是这样。

92dk7w1h

92dk7w1h1#

我想我已经解决了我的问题。recipe/qt的文档说明,如果你想编译一个静态应用程序,你不必使用msys 2来设置/安装绑定或部署/编译你的应用程序。我在VSCode中使用命令提示符的运气不太好。我只用msys 2来设置/安装绑定或部署/编译应用程序的成功率更高。安装绑定以及编译我的应用程序。通过VScode中的默认命令提示符似乎很难找到zstd库。这是我的猜测。

相关问题