therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.49k stars 748 forks source link

qtsetup on win7 (too many slashes?) #266

Closed 5k3105 closed 7 years ago

5k3105 commented 7 years ago
time="2017-03-31T21:56:08-06:00" level=info msg="running setup/test desktop (~10min)"
time="2017-03-31T21:56:08-06:00" level=info msg="testing widgets\\line_edits"
time="2017-03-31T21:56:08-06:00" level=panic msg="failed to run command" cmd="C:\\Go\\bin\\qtdeploy test desktop C:\\goworksp\\src\\github.com\\therecipe\\qt\\internal\\examples\\widgets\\line_edits " error="exec: \"C:\\\\Go\\\\bin\\\\qtdeploy\": file does not exist" func=RunCmd name="test widgets\\line_edits" output=
panic: (*logrus.Entry) (0x5ddf40,0xc0470a3b80)

goroutine 1 [running]:
panic(0x5ddf40, 0xc0470a3b80)
        C:/Go/src/runtime/panic.go:500 +0x1af
github.com/Sirupsen/logrus.Entry.log(0xc04200e3c0, 0xc045ae23c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc044879400, ...)
        C:/goworksp/src/github.com/Sirupsen/logrus/entry.go:124 +0x42a
github.com/Sirupsen/logrus.(*Entry).Panic(0xc0470a39a0, 0xc044879490, 0x1, 0x1)
        C:/goworksp/src/github.com/Sirupsen/logrus/entry.go:169 +0x12b
github.com/therecipe/qt/internal/utils.RunCmd(0xc045fb78c0, 0xc0453fba60, 0x17, 0x1, 0x1)
        C:/goworksp/src/github.com/therecipe/qt/internal/utils/utils.go:76 +0x575
main.test(0x5e7488, 0x7)
        C:/goworksp/src/github.com/therecipe/qt/cmd/qtsetup/test.go:46 +0x12b5
main.main()
        C:/goworksp/src/github.com/therecipe/qt/cmd/qtsetup/qtsetup.go:82 +0x3ff
therecipe commented 7 years ago

Yeah, that's logrus escaping the string. It shouldn't be a problem, even though it looks bad.

msg="failed to run command" cmd="C:\\Go\\bin\\qtdeploy

It seems like you are using an pretty old version, maybe try to update the repo and then try again. (Could be that you need to export QT_VERSION=5.7.0 and QT_DIR=path/to/Qt5.7.0, if you want to keep using Qt 5.7.0)

5k3105 commented 7 years ago

Ok, sorry.

I uninstalled 5.7 and installed 5.8 and set QT_DIR to 5.8.

Completely removed old version, go get -u -v github.com/therecipe/qt/cmd/... and qtsetup

It 'compiles' applications but I get: 2017-04-01 12_42_05-program manager

C:\Users\clott
λ go get -u -v github.com/therecipe/qt/cmd/...
github.com/therecipe/qt (download)
github.com/Sirupsen/logrus (download)
Fetching https://golang.org/x/crypto/ssh?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh?go-get=1
get "golang.org/x/crypto/ssh": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://golang.org/x/crypto/curve25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/curve25519?go-get=1 (status code 200)
get "golang.org/x/crypto/curve25519": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/curve25519?go-get=1
get "golang.org/x/crypto/curve25519": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/ed25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ed25519?go-get=1 (status code 200)
get "golang.org/x/crypto/ed25519": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ed25519?go-get=1
get "golang.org/x/crypto/ed25519": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/ed25519/internal/edwards25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ed25519/internal/edwards25519?go-get=1 (status code 200)
get "golang.org/x/crypto/ed25519/internal/edwards25519": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ed25519/internal/edwards25519?go-get=1
get "golang.org/x/crypto/ed25519/internal/edwards25519": verifying non-authoritative meta tag
github.com/therecipe/qt/cmd/qtminimal
github.com/therecipe/qt/cmd/qtmoc
github.com/therecipe/qt/cmd/qtrcc
github.com/therecipe/qt/cmd/qtdeploy

C:\Users\clott
λ qtsetup
INFO[0000] running: 'qtsetup prep'
ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtrcc.exe C:\Go\bin\qtrcc.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtrcc symlink in your PATH (C:\Go\bin\qtrcc.exe); please use C:\Go\bin\qtrcc.exe instead"
The system cannot find the file specified.

ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtmoc.exe C:\Go\bin\qtmoc.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtmoc symlink in your PATH (C:\Go\bin\qtmoc.exe); please use C:\Go\bin\qtmoc.exe instead"
The system cannot find the file specified.

ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtminimal.exe C:\Go\bin\qtminimal.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtminimal symlink in your PATH (C:\Go\bin\qtminimal.exe); please use C:\Go\bin\qtminimal.exe instead"
The system cannot find the file specified.

ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtdeploy.exe C:\Go\bin\qtdeploy.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtdeploy symlink in your PATH (C:\Go\bin\qtdeploy.exe); please use C:\Go\bin\qtdeploy.exe instead"
The system cannot find the file specified.

INFO[0000] running: 'qtsetup check windows' [docker=false]
INFO[0000] GOOS:                        'windows'
INFO[0000] GOARCH:                      'amd64'
INFO[0000] GOVERSION:                   'go1.7.5'
INFO[0000] GOROOT:                   *  'C:\Go\'
INFO[0000] GOPATH:                   *  'C:\goworksp'
INFO[0000] GOBIN:                    *  'C:\Go\bin'
INFO[0000] QT_HASH:                     'dbb5e1d7d95d809925aace4c9b42c21f6e991b06'
INFO[0000] QT_VERSION:                  '5.8.0'
INFO[0000] QT_VERSION_MAJOR:            '5.8'
INFO[0000] QT_DIR:                   *  'c:\qt\Qt5.8.0'
INFO[0000] QT_STUB:                  *  'true'
INFO[0000] QT_DEBUG:                    'false'
INFO[0000] QT_QMAKE_DIR:                ''
INFO[0000] QT_MSYS2:                    'false'
INFO[0000] running: 'qtsetup generate windows' [docker=false]
INFO[0012] generating stub qt/core
INFO[0015] generating stub qt/androidextras
INFO[0015] generating stub qt/gui
INFO[0018] generating stub qt/network
INFO[0019] generating stub qt/xml
INFO[0019] generating stub qt/dbus
INFO[0020] generating stub qt/nfc
INFO[0020] generating stub qt/script
INFO[0020] generating stub qt/sensors
INFO[0021] generating stub qt/positioning
INFO[0021] generating stub qt/widgets
INFO[0029] generating stub qt/sql
INFO[0030] generating stub qt/qml
INFO[0030] generating stub qt/websockets
INFO[0030] generating stub qt/xmlpatterns
INFO[0030] generating stub qt/bluetooth
INFO[0031] generating stub qt/webchannel
INFO[0031] generating stub qt/svg
INFO[0031] generating stub qt/multimedia
INFO[0033] generating stub qt/quick
INFO[0034] generating stub qt/help
INFO[0034] generating stub qt/location
INFO[0035] generating stub qt/scripttools
INFO[0035] generating stub qt/uitools
INFO[0035] generating stub qt/winextras
INFO[0035] generating stub qt/testlib
INFO[0035] generating stub qt/serialport
INFO[0035] generating stub qt/serialbus
INFO[0036] generating stub qt/printsupport
INFO[0036] generating stub qt/designer
INFO[0037] generating stub qt/scxml
INFO[0037] generating stub qt/gamepad
INFO[0037] generating stub qt/purchasing
INFO[0037] generating stub qt/datavisualization
INFO[0038] generating stub qt/charts
INFO[0039] generating stub qt/speech
INFO[0039] generating stub qt/quickcontrols2
INFO[0039] generating stub qt/sailfish
INFO[0039] running: 'qtsetup install windows' [docker=false]
INFO[0039] installing stub qt/core
INFO[0043] installing stub qt/androidextras
INFO[0044] installing stub qt/gui
INFO[0049] installing stub qt/network
INFO[0050] installing stub qt/xml
INFO[0051] installing stub qt/dbus
INFO[0052] installing stub qt/nfc
INFO[0053] installing stub qt/script
INFO[0054] installing stub qt/sensors
INFO[0056] installing stub qt/positioning
INFO[0057] installing stub qt/widgets
INFO[0111] installing stub qt/sql
INFO[0113] installing stub qt/qml
INFO[0113] installing stub qt/websockets
INFO[0114] installing stub qt/xmlpatterns
INFO[0115] installing stub qt/bluetooth
INFO[0116] installing stub qt/webchannel
INFO[0117] installing stub qt/svg
INFO[0118] installing stub qt/multimedia
INFO[0123] installing stub qt/quick
INFO[0126] installing stub qt/help
INFO[0128] installing stub qt/location
INFO[0129] installing stub qt/scripttools
INFO[0130] installing stub qt/uitools
INFO[0131] installing stub qt/winextras
INFO[0132] installing stub qt/testlib
INFO[0133] installing stub qt/serialport
INFO[0134] installing stub qt/serialbus
INFO[0134] installing stub qt/printsupport
INFO[0136] installing stub qt/designer
INFO[0139] installing stub qt/scxml
INFO[0140] installing stub qt/gamepad
INFO[0140] installing stub qt/purchasing
INFO[0141] installing stub qt/datavisualization
INFO[0142] installing stub qt/charts
INFO[0145] installing stub qt/speech
INFO[0145] installing stub qt/quickcontrols2
INFO[0146] installing stub qt/sailfish
INFO[0147] running: 'qtsetup test windows' [docker=false]
INFO[0147] testing qml\application
INFO[0181] testing qml\drawer_nav_x
INFO[0224] testing qml\gallery
INFO[0262] testing quick\calc
INFO[0299] testing widgets\line_edits
INFO[0343] testing widgets\pixel_editor
INFO[0385] testing widgets\textedit
therecipe commented 7 years ago

Mh, that's strange.

I guess there are still some leftovers from you old installation, either in: GOPATH/pkg/.../qt or in GOPATH/src/.../qt

You probably need to do the following:

It may be that you can already run: qtsetup -debug upgrade && qtsetup to do this automatically, but I'm not sure.

5k3105 commented 7 years ago
C:\Users\clott
λ go clean -i github.com/therecipe/qt/...

C:\Users\clott
λ go get -v github.com/therecipe/qt/cmd/...
github.com/therecipe/qt (download)
github.com/therecipe/qt/internal/utils
github.com/therecipe/qt/internal/binding/parser
github.com/therecipe/qt/internal/binding/converter
github.com/therecipe/qt/internal/cmd
github.com/therecipe/qt/internal/binding/templater
github.com/therecipe/qt/internal/cmd/minimal
github.com/therecipe/qt/internal/cmd/moc
github.com/therecipe/qt/internal/cmd/rcc
github.com/therecipe/qt/cmd/qtrcc
github.com/therecipe/qt/cmd/qtminimal
github.com/therecipe/qt/internal/cmd/deploy
github.com/therecipe/qt/cmd/qtmoc
github.com/therecipe/qt/cmd/qtdeploy
github.com/therecipe/qt/internal/cmd/setup
github.com/therecipe/qt/cmd/qtsetup

C:\Users\clott
λ qtsetup
INFO[0000] running: 'qtsetup prep'
ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtrcc.exe C:\Go\bin\qtrcc.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtrcc symlink in your PATH (C:\Go\bin\qtrcc.exe); please use C:\Go\bin\qtrcc.exe instead"
The system cannot find the file specified.

ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtmoc.exe C:\Go\bin\qtmoc.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtmoc symlink in your PATH (C:\Go\bin\qtmoc.exe); please use C:\Go\bin\qtmoc.exe instead"
The system cannot find the file specified.

ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtminimal.exe C:\Go\bin\qtminimal.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtminimal symlink in your PATH (C:\Go\bin\qtminimal.exe); please use C:\Go\bin\qtminimal.exe instead"
The system cannot find the file specified.

ERRO[0000] failed to run command                         cmd="cmd /C mklink /H C:\Go\bin\qtdeploy.exe C:\Go\bin\qtdeploy.exe" env= error="exit status 1" func=RunCmdOptional name="failed to create qtdeploy symlink in your PATH (C:\Go\bin\qtdeploy.exe); please use C:\Go\bin\qtdeploy.exe instead"
The system cannot find the file specified.

INFO[0000] running: 'qtsetup check windows' [docker=false]
INFO[0000] GOOS:                        'windows'
INFO[0000] GOARCH:                      'amd64'
INFO[0000] GOVERSION:                   'go1.7.5'
INFO[0000] GOROOT:                   *  'C:\Go\'
INFO[0000] GOPATH:                   *  'C:\goworksp'
INFO[0000] GOBIN:                    *  'C:\Go\bin'
INFO[0000] QT_HASH:                     '87e59bbdaaedf162e58b1e996a044136e196da58'
INFO[0000] QT_VERSION:                  '5.8.0'
INFO[0000] QT_VERSION_MAJOR:            '5.8'
INFO[0000] QT_DIR:                   *  'c:\qt\Qt5.8.0'
INFO[0000] QT_STUB:                  *  'true'
INFO[0000] QT_DEBUG:                    'false'
INFO[0000] QT_QMAKE_DIR:                ''
INFO[0000] QT_MSYS2:                    'false'
INFO[0000] running: 'qtsetup generate windows' [docker=false]

Same thing.

Here's what I noticed. I had setup a QT_DIR to 5.7 since I had none the first time. Then when I removed 5.7 I also removed the QT_DIR completely. But when Installed 5.8, erased your qt binding completely, 'go get' it again -- it still displayed QT_DIR = 5.7 when it was starting qtsetup -- even though I had removed the env var, removed the old qt version and your binding and had deleted my old command line client 'cmder' and replaced it with a new one.

I then manually set QT_DIR to 5.8 and then it took the new setting. I really don't know where it got that env var before though.

I've observed when I go get the bindings it creates the qtsetup, qtdeploy, qtrcc etc in go/bin but when I run qtsetup and it can't 'create sysmlink' those files are no longer in go/bin (deleted by something).

Also in previous versions of qt binding I thought the qtdeploy, etc were in the gopath/bin folder?

5k3105 commented 7 years ago

Deleted gopath/pkg and rebuilding - seems to be working now

5k3105 commented 7 years ago

arg.. but there is no qtdeploy.exe or qtrcc etc. I don't know how it built those examples...

5k3105 commented 7 years ago

so it creates qtdeploy etc during go get then erases it at the beginning of qtsetup.

therecipe commented 7 years ago

so it creates qtdeploy etc during go get then erases it at the beginning of qtsetup.

ah, yes if you set GOBIN to GOROOT/bin then this can happen you could run go install github.com/therecipe/qt/cmd/... after you are done with the setup, to get them in your GOBIN again.

I will fix this.

therecipe commented 7 years ago

Should be fixed with: https://github.com/therecipe/qt/commit/a94e900cd5fa88051b477754307465e020003537

5k3105 commented 7 years ago

Thank you !! :+1: :+1: