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.44k stars 744 forks source link

Webview sample code #227

Closed influx6 closed 7 years ago

influx6 commented 7 years ago

Using the sample code to run the idea for webkit based view fails.

package main

import (
    "os"

    "github.com/therecipe/qt/core"
    "github.com/therecipe/qt/webengine"
    "github.com/therecipe/qt/widgets"
)

const htmlData = `<!DOCTYPE html>
<html>
<body>

<div id="div1">
<p id="p1">This is a paragraph.</p>
<p id="p2">This is another paragraph.</p>
</div>

</body>
</html>`

const jsData = `var para = document.createElement("p");
var node = document.createTextNode("This is new.");
para.appendChild(node);

var element = document.getElementById("div1");
element.appendChild(para);`

func main() {
    widgets.NewQApplication(len(os.Args), os.Args)

    var window = widgets.NewQMainWindow(nil, 0)

    var centralWidget = widgets.NewQWidget(nil, 0)
    centralWidget.SetLayout(widgets.NewQVBoxLayout())

    var view = webengine.NewQWebEngineView(nil)
    view.SetHtml(htmlData, core.NewQUrl())
    centralWidget.Layout().AddWidget(view)

    var button = widgets.NewQPushButton2("click me", nil)
    button.ConnectClicked(func(checked bool) {
        view.Page().RunJavaScript4(jsData)
    })
    centralWidget.Layout().AddWidget(button)

    window.SetCentralWidget(centralWidget)
    window.Show()

    widgets.QApplication_Exec()
}

The code above blows up with the following error on linux:

Could not initialize GLX
SIGABRT: abort
PC=0x7f75aee237ef m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4bdcb0, 0xc420051eb0, 0x4af89c)
    /home/influx6/Labs/local/src/go/src/runtime/cgocall.go:131 +0xe2 fp=0xc420051e70 sp=0xc420051e30
github.com/therecipe/qt/widgets._Cfunc_QApplication_NewQApplication(0x7fff00000001, 0x225a970, 0x0)
    github.com/therecipe/qt/widgets/_obj/_cgo_gotypes.go:362 +0x4e fp=0xc420051eb0 sp=0xc420051e70
github.com/therecipe/qt/widgets.NewQApplication(0x1, 0xc420010200, 0x1, 0x1, 0x0)
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/widgets/widgets-minimal.go:664 +0xcb fp=0xc420051f28 sp=0xc420051eb0
main.main()
    /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/qt.go:31 +0x55 fp=0xc420051f88 sp=0xc420051f28
runtime.main()
    /home/influx6/Labs/local/src/go/src/runtime/proc.go:185 +0x20a fp=0xc420051fe0 sp=0xc420051f88
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420051fe8 sp=0xc420051fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1

rax    0x0
rbx    0x2353f80
rcx    0x7f75aee237ef
rdx    0x0
rdi    0x2
rsi    0x7fff401f1320
rbp    0x7fff401f16e0
rsp    0x7fff401f1398
r8     0x0
r9     0x7fff401f1320
r10    0x8
r11    0x246
r12    0x2353fb0
r13    0x2271e30
r14    0x0
r15    0x2271e30
rip    0x7f75aee237ef
rflags 0x246
cs     0x33
fs     0x0
gs     0x0

System details

go version go1.8 linux/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/influx6/Labs/repos/go"
GORACE=""
GOROOT="/home/influx6/Labs/local/src/go"
GOTOOLDIR="/home/influx6/Labs/local/src/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build262106640=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version go1.8 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.8 X:framepointer
uname -sr: Linux 4.8.0-37-generic
Distributor ID: Ubuntu
Description:    Ubuntu 16.10
Release:    16.10
Codename:   yakkety
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.24-3ubuntu2) stable release version 2.24, by Roland McGrath et al.
gdb --version: GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git
therecipe commented 7 years ago

Hey

You probably need to call http://doc.qt.io/qt-5/qtwebengine.html#initialize, to prepare the OpenGL Context first.

Just call webengine.QtWebEngine_Initialize() directly after widgets.NewQApplication(len(os.Args), os.Args)

the function was added with https://github.com/therecipe/qt/commit/6ed0e19c1520c97b43b9cba41899cf9904d72b95

influx6 commented 7 years ago

Thanks, most grateful, will test and get back to you asap.

jeanlucmongrain commented 7 years ago

@influx6 have you tried?

influx6 commented 7 years ago

Sorry bro, will do so today. Had a long day yesterday. Not a lot of time to work on it. Byt definitely today.

On 22 Feb 2017 04:06, "Bruno Clermont" notifications@github.com wrote:

@influx6 https://github.com/influx6 have you tried?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/therecipe/qt/issues/227#issuecomment-281555168, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICLcPniCnannLal1STQNRfgjkb_2sFks5re6YigaJpZM4MFczl .

therecipe commented 7 years ago

@influx6 @bclermont

I tested it on a linuxmint 18 cinnamon 64bit vm, with go 1.7.5 and Qt 5.8. And it worked for me with and without webengine.QtWebEngine_Initialize() and also with and without 3d acceleration. I will test it tomorrow with some other distro again.

influx6 commented 7 years ago

Ya tested today and failed. Will paste the logs tomorrow

On 22 Feb 2017 11:05 pm, "therecipe" notifications@github.com wrote:

@influx6 https://github.com/influx6 @bclermont https://github.com/bclermont

I tested it on a linuxmint 18 cinnamon 64bit vm, with go 1.7.5 and Qt 5.8. And it worked for me with and without webengine.QtWebEngine_Initialize() and also with and without 3d acceleration. I will test it tomorrow with some other distro again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/therecipe/qt/issues/227#issuecomment-281819787, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICLSOPXlhiqhPh48KA9BOadbG6WHVsks5rfLExgaJpZM4MFczl .

influx6 commented 7 years ago

Am using go 1.8 although

On 22 Feb 2017 11:05 pm, "therecipe" notifications@github.com wrote:

@influx6 https://github.com/influx6 @bclermont https://github.com/bclermont

I tested it on a linuxmint 18 cinnamon 64bit vm, with go 1.7.5 and Qt 5.8. And it worked for me with and without webengine.QtWebEngine_Initialize() and also with and without 3d acceleration. I will test it tomorrow with some other distro again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/therecipe/qt/issues/227#issuecomment-281819787, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICLSOPXlhiqhPh48KA9BOadbG6WHVsks5rfLExgaJpZM4MFczl .

jeanlucmongrain commented 7 years ago

I can load the acid test, no error

influx6 commented 7 years ago

Alright. Will try to figure out why mine blows up

On 23 Feb 2017 7:59 am, "Bruno Clermont" notifications@github.com wrote:

  • Go version: 1.8
  • GOOS: linux
  • GOARCH: amd64
  • QT version: 5.8.0
  • therecipe/qt version : tip of master

I can load the acid test, no error

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/therecipe/qt/issues/227#issuecomment-281911557, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICLVjFW0wa6UDbzR7puOdzHE2JDT6Lks5rfS5hgaJpZM4MFczl .

therecipe commented 7 years ago

Also tested it again with a fresh arch vm (manjaro 16.10.3 stable 64bit), with Go 1.7.5 and 1.8 and the Qt 5.8 libs from pacman (with QT_PKG_CONFIG=true). And it worked there as well.

@influx6 It seems like you probably only need to install some missing opengl libs or headers: sudo apt-get install libgl1-mesa-dri or sudo apt-get install libgl1-mesa-dev (these are probably already there)

or maybe you need to remove some nvidia stuff: https://bugreports.qt.io/browse/QTBUG-34109 https://harishnavnit.wordpress.com/2014/03/06/removing-nvidia-x-drivers-to-solve-the-glx-error/

influx6 commented 7 years ago

Ah yes, QT_PKG_CONFIG was never said. I have installed the mesa library and header. Will look into the nvidia issues has a I have an nvidia card.

Thanks for the advice man, most appreciated.

therecipe commented 7 years ago

Did you download and install the pre-built official Qt version? If yes, then you don't need to set QT_PKG_CONFIG=true, this is only needed if you want to use your systems package mangers version of Qt. (and it's also not fully working on some distros)

I only used it, because it was faster to use "pacman", then to download and install Qt manually.

influx6 commented 7 years ago

Ah! I see. I installed some base qt packages that some other apps depended on but not the full qt pkg for ubuntu. Will reset that to false, I manually installed Qt 5.8.0.

influx6 commented 7 years ago

I unfortunately can't find webengine.QtWebEngine_Initialize() in the curent source from master.

influx6 commented 7 years ago

Also received the following error:

Could not find QtWebEngineProcess
SIGABRT: abort
PC=0x7f7169c207ef m=0 sigcode=18446744073709551610
signal arrived during cgo execution
therecipe commented 7 years ago

You probably need to clean all old "therecipe/qt" files first.

Maybe run go clean -i github.com/therecipe/qt/... && go install github.com/therecipe/qt/cmd/... and then run the full qtsetup as usual.

Do you use the *.sh to start your application? (after using qtdeploy) Or do you use go build -o test && ./test? Also you may need to start the application as non-root (if you don't do already), as there seem to be problems sometimes if you are start them as root.

influx6 commented 7 years ago

I usually run the .sh file. Thanks, I will attempt the commands you gave. Most grateful for the time.

influx6 commented 7 years ago

Left with error after qtdeploy.


# github.com/therecipe/qt/internal/examples/widgets/textedit
/tmp/go-build292190219/github.com/therecipe/qt/internal/examples/widgets/textedit/_obj/rrc.cpp.o: In function `qInitResources()':
./rrc.cpp:3652: multiple definition of `qInitResources()'
/tmp/go-build292190219/github.com/therecipe/qt/internal/examples/widgets/textedit/_obj/rcc.cpp.o:/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/rcc.cpp:7120: first defined here
/tmp/go-build292190219/github.com/therecipe/qt/internal/examples/widgets/textedit/_obj/rrc.cpp.o: In function `qCleanupResources()':
./rrc.cpp:3660: multiple definition of `qCleanupResources()'
/tmp/go-build292190219/github.com/therecipe/qt/internal/examples/widgets/textedit/_obj/rcc.cpp.o:/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/rcc.cpp:7128: first defined here
collect2: error: ld returned 1 exit status
therecipe commented 7 years ago

ah, sorry I changed the naming of the qtrcc created files to rcc. so you might need to manually remove all old `rrc.files inqt/internal/examples/widgets/texteditand keep the newrcc.*` files instead.

qtdeploying the widgets/textedit example should work after that.

influx6 commented 7 years ago

Alright.

influx6 commented 7 years ago

The build succeeded. But I seem to have set myself in a bundle. When I attempt to run most examples I end up with this error.

Cannot mix incompatible Qt library (version 0x50601) with this library (version 0x50800)
SIGABRT: abort
PC=0x7fdceeca27ef m=0 sigcode=18446744073709551610
signal arrived during cgo execution

Do you know any qt package in ubuntu that can cause this, has most packages in ubuntu do depend on some qt packages so I couldnt uninstall them, is there a means of forcing it to use the qt version I provided?

My environment for QT_PATH is set.

therecipe commented 7 years ago

is there a means of forcing it to use the qt version I provided?

Usually, thats what the *.sh file is for. It will set some paths, so that the system libs will be ignored and the bundled libs will be used instead.

But there was an issue here: https://github.com/therecipe/qt/issues/195 Where not all libs got deployed and the application therefore tried to fallback to the system libs, which then caused this Cannot mix incompatible Qt library (version 0x50601) with this library (version 0x50800) error.

Could you maybe try to set QT_DEBUG_PLUGINS=1 and run the *.sh and then watch out for plugins/libs that gets load from somewhere else, then the current folder or your QT_DIR? Probably somewhere from /usr/lib or /usr/lib64 or so.

influx6 commented 7 years ago

Alright, thank you. Will follow your advice and get back to you.

influx6 commented 7 years ago
Got keys from plugin meta data ("webp")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/imageformats" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqgif.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqicns.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqico.so"
Cannot load library /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so: (libjasper.so.1: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so" : "Cannot load library /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so: (libjasper.so.1: cannot open shared object file: No such file or directory)"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjpeg.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqsvg.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtga.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtiff.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwbmp.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwebp.so"
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats" ...
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqgif.so"
Got keys from plugin meta data ("gif")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqicns.so"
Got keys from plugin meta data ("icns")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqico.so"
Got keys from plugin meta data ("ico", "cur")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so"
"Cannot load library /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so: (libjasper.so.1: cannot open shared object file: No such file or directory)" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjpeg.so"
Got keys from plugin meta data ("jpg", "jpeg")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqsvg.so"
Got keys from plugin meta data ("svg", "svgz")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtga.so"
Got keys from plugin meta data ("tga")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtiff.so"
Got keys from plugin meta data ("tiff", "tif")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwbmp.so"
Got keys from plugin meta data ("wbmp")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwebp.so"
Got keys from plugin meta data ("webp")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/imageformats" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/accessible" ...
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/accessiblebridge" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/iconengines/libqsvgicon.so"
Cannot mix incompatible Qt library (version 0x50601) with this library (version 0x50800)
SIGABRT: abort
PC=0x7f49481197ef m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x583590, 0xc420053ef8, 0x0)
    /home/influx6/Labs/local/src/go/src/runtime/cgocall.go:131 +0xe2 fp=0xc420053ec8 sp=0xc420053e88
github.com/therecipe/qt/widgets._Cfunc_QApplication_QApplication_Exec(0x0)
    github.com/therecipe/qt/widgets/_obj/_cgo_gotypes.go:1000 +0x49 fp=0xc420053ef8 sp=0xc420053ec8
github.com/therecipe/qt/widgets.(*QApplication).Exec(0xc4200a2000, 0x607aca)
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/widgets/widgets-minimal.go:1366 +0x22 fp=0xc420053f10 sp=0xc420053ef8
main.main()
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/main.go:50 +0x2ee fp=0xc420053f88 sp=0xc420053f10
runtime.main()
    /home/influx6/Labs/local/src/go/src/runtime/proc.go:185 +0x20a fp=0xc420053fe0 sp=0xc420053f88
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420053fe8 sp=0xc420053fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1
therecipe commented 7 years ago

Thanks :)

It's probably the plugins/iconengines/libqsvgicon.so lib that pulls in something that it's not supposed to. I will try to reproduce it.

influx6 commented 7 years ago

Thanks so much.

therecipe commented 7 years ago

No problem :)

Could it somewhat reproduce: Could not find QtWebEngineProcess probably the same problem you had at https://github.com/therecipe/qt/issues/227#issuecomment-282478411

I will investigate further.

influx6 commented 7 years ago

Possibly.

therecipe commented 7 years ago

Okay, I think I got it with: https://github.com/therecipe/qt/commit/b2ff80dbde06212937031af569afe45784f37f8a

Could you try it again?

there is a bunch of stuff needed by the webengine, that was not deployed previously. http://doc.qt.io/qt-5/qtwebengine-deploying.html

influx6 commented 7 years ago

Alright, thank you. Will do. Sorry for the late reply.

influx6 commented 7 years ago

Ouput after using qtdeploy desktop for the textedit example.

Got keys from plugin meta data ("webp")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/imageformats" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqgif.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqicns.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqico.so"
Cannot load library /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so: (libjasper.so.1: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so" : "Cannot load library /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so: (libjasper.so.1: cannot open shared object file: No such file or directory)"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjpeg.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqsvg.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtga.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtiff.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwbmp.so"
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwebp.so"
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats" ...
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqgif.so"
Got keys from plugin meta data ("gif")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqicns.so"
Got keys from plugin meta data ("icns")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqico.so"
Got keys from plugin meta data ("ico", "cur")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so"
"Cannot load library /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjp2.so: (libjasper.so.1: cannot open shared object file: No such file or directory)" 
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqjpeg.so"
Got keys from plugin meta data ("jpg", "jpeg")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqsvg.so"
Got keys from plugin meta data ("svg", "svgz")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtga.so"
Got keys from plugin meta data ("tga")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqtiff.so"
Got keys from plugin meta data ("tiff", "tif")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwbmp.so"
Got keys from plugin meta data ("wbmp")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/imageformats/libqwebp.so"
Got keys from plugin meta data ("webp")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/imageformats" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/accessible" ...
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/accessiblebridge" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/deploy/linux/plugins/iconengines/libqsvgicon.so"
Cannot mix incompatible Qt library (version 0x50601) with this library (version 0x50800)
SIGABRT: abort
PC=0x7faecb2b97ef m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x583590, 0xc420053ef8, 0x0)
    /home/influx6/Labs/local/src/go/src/runtime/cgocall.go:131 +0xe2 fp=0xc420053ec8 sp=0xc420053e88
github.com/therecipe/qt/widgets._Cfunc_QApplication_QApplication_Exec(0x0)
    github.com/therecipe/qt/widgets/_obj/_cgo_gotypes.go:1000 +0x49 fp=0xc420053ef8 sp=0xc420053ec8
github.com/therecipe/qt/widgets.(*QApplication).Exec(0xc42000e028, 0x607aca)
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/widgets/widgets-minimal.go:1366 +0x22 fp=0xc420053f10 sp=0xc420053ef8
main.main()
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/internal/examples/widgets/textedit/main.go:50 +0x2ee fp=0xc420053f88 sp=0xc420053f10
runtime.main()
    /home/influx6/Labs/local/src/go/src/runtime/proc.go:185 +0x20a fp=0xc420053fe0 sp=0xc420053f88
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420053fe8 sp=0xc420053fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1

Unfortunately, still fails.

influx6 commented 7 years ago

Here is my run for the above webview code:

influx6@box ~/L/r/g/s/g/g/qt> sh deploy/linux/qt.sh 
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqeglfs.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqminimal.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqminimalegl.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqvnc.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqxcb.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/platforms" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforms/libqxcb.so"
loaded library "Xcursor"
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/xcbglintegrations" ...
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/xcbglintegrations/libqxcb-egl-integration.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
    "MetaData": {
        "Keys": [
            "xcb_egl"
        ]
    },
    "className": "QXcbEglIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("xcb_egl")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/xcbglintegrations/libqxcb-glx-integration.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
    "MetaData": {
        "Keys": [
            "xcb_glx"
        ]
    },
    "className": "QXcbGlxIntegrationPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("xcb_glx")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/xcbglintegrations" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/xcbglintegrations/libqxcb-glx-integration.so"
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platformthemes" ...
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platformthemes/libqgtk3.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platformthemes/libqgtk3.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "gtk3"
        ]
    },
    "className": "QGtk3ThemePlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("gtk3")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/platformthemes" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platformthemes/libqgtk3.so"
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts" ...
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "compose",
            "xim"
        ]
    },
    "className": "QComposePlatformInputContextPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("compose", "xim")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "ibus"
        ]
    },
    "className": "QIbusPlatformInputContextPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("ibus")
QFactoryLoader::QFactoryLoader() looking at "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so"
Found metadata in lib /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "qtvirtualkeyboard"
        ]
    },
    "className": "QVirtualKeyboardPlugin",
    "debug": false,
    "version": 329728
}

Got keys from plugin meta data ("qtvirtualkeyboard")
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/platforminputcontexts" ...
loaded library "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/plugins/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/influx6/Labs/repos/go/src/github.com/gu-io/qt/deploy/linux/styles" ...
Could not find QtWebEngineProcess
SIGABRT: abort
PC=0x7f48d5fad7ef m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4b5580, 0xc420051eb8, 0xc420051ee0)
    /home/influx6/Labs/local/src/go/src/runtime/cgocall.go:131 +0xe2 fp=0xc420051e88 sp=0xc420051e48
github.com/therecipe/qt/webengine._Cfunc_QWebEngineView_SetHtml(0x15caee0, 0x184da50, 0x184da30)
    github.com/therecipe/qt/webengine/_obj/_cgo_gotypes.go:212 +0x45 fp=0xc420051eb8 sp=0xc420051e88
github.com/therecipe/qt/webengine.(*QWebEngineView).SetHtml.func2(0x15caee0, 0x184da50, 0x184da30)
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/webengine/webengine-minimal.go:574 +0xad fp=0xc420051ef0 sp=0xc420051eb8
github.com/therecipe/qt/webengine.(*QWebEngineView).SetHtml(0xc420010460, 0x4f829b, 0x94, 0x773960, 0xc42000e038)
    /home/influx6/Labs/repos/go/src/github.com/therecipe/qt/webengine/webengine-minimal.go:574 +0xa4 fp=0xc420051f28 sp=0xc420051ef0
main.main()
    /home/influx6/Labs/repos/go/src/github.com/gu-io/qt/qt.go:40 +0x131 fp=0xc420051f88 sp=0xc420051f28
runtime.main()
    /home/influx6/Labs/local/src/go/src/runtime/proc.go:185 +0x20a fp=0xc420051fe0 sp=0xc420051f88
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420051fe8 sp=0xc420051fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /home/influx6/Labs/local/src/go/src/runtime/asm_amd64.s:2197 +0x1
therecipe commented 7 years ago

Mh, I will look into why the textedit is not working.

But the webview example should work, you probably just need to completely remove the old package files under GOPATH/pkg/github.com/therecipe before building and running the qt* tools again.

Then after deploying there should be files with *.pak extensions in the deployed folder, such as qtwebengine_resources.pak and there should also be a binary called QtWebEngineProcess.

influx6 commented 7 years ago

Alright, I perceive that this indeed can be the issue, will give this a short, thanks again for the pointers and help.

influx6 commented 7 years ago

Oddly enough after clearing my pkg for therecipe/qt, the build passed and the test completed successfully. But still am facing the same issues with the webview sample.

influx6 commented 7 years ago

Am currently running qtdeploy build desktop ./ in the package directory for the code.

influx6 commented 7 years ago

And also executed qtsetup desktop in therecipe/qt to build the therecipe/qt package which has mentioned earlier, but successfully and all test passed.

therecipe commented 7 years ago

Are you sure you removed the old pkgs and then rebuild the qt* tools in GOPATH/bin?

Maybe, you should start from scratch, I had similar problems myself, where Go would use the old cached files instead of compiling from source again.

So maybe remove everything in GOPATH/bin, GOPATH/src, GOPATH/pkg which is qt related first. And then just use go get -u -v github.com/therecipe/qt/cmd/... to get the tools.

You should also be able to test the example without running qtsetup first (but I would still run it afterwards). So just test it with qtdeploy, once you got the latest version.

This is what I have inside the deploy/linux folder when I run qtdeploy inside example/qml/webview:

tree -L 1 linux
linux
├── QtWebEngineProcess
├── icudtl.dat
├── lib
├── linux
├── plugins
├── qml
├── qtwebengine_devtools_resources.pak
├── qtwebengine_locales
├── qtwebengine_resources.pak
├── qtwebengine_resources_100p.pak
├── qtwebengine_resources_200p.pak
├── webview
└── webview.sh
influx6 commented 7 years ago

Alright sounds good.

On Fri, Mar 3, 2017 at 9:30 , therecipe notifications@github.com wrote:

Are you sure you removed the old pkgs and then rebuild the qt* tools in GOPATH/bin?

Maybe, you should start from scratch, I had similar problems myself, where Go would use the old cached files instead of compiling from source again.

So maybe remove everything in GOPATH/bin, GOPATH/src, GOPATH/pkg which is qt related first. And then just use go get -u -v github.com/therecipe/qt/cmd/... to get the tools.

You should also be able to test the example without running qtsetup first (but I would still run it afterwards). So just test it with qtdeploy, once you got the latest version.

This is what I have inside the deploy/linux folder when I run qtdeploy inside example/qml/webview:

tree -L 1 linux linux ├── QtWebEngineProcess ├── icudtl.dat ├── lib ├── linux ├── plugins ├── qml ├── qtwebengine_devtools_resources.pak ├── qtwebengine_locales ├── qtwebengine_resources.pak ├── qtwebengine_resources_100p.pak ├── qtwebengine_resources_200p.pak ├── webview └── webview.sh — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

influx6 commented 7 years ago

Halleluya!! It works. Do you think it could be the qtsetup that was messing this up.

therecipe commented 7 years ago

Halleluya!! It works.

Finally :)

Do you think it could be the qtsetup that was messing this up.

I'm not sure, but I would suspect that it was an old version of qtdeploy.

ghost commented 7 years ago

i just tried the same on OSX. But no cookie for me :)

I cleaned the bin, pkg & src first of all QT related stuff.

then i did the normal: go get -u -v github.com/therecipe/qt/cmd/...

 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
golang.org/x/crypto/ed25519/internal/edwards25519
golang.org/x/crypto/curve25519
github.com/Sirupsen/logrus
golang.org/x/crypto/ed25519
github.com/therecipe/qt/internal/utils
golang.org/x/crypto/ssh
github.com/therecipe/qt/internal/binding/parser
github.com/therecipe/qt/internal/cmd
github.com/therecipe/qt/internal/binding/converter
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/internal/cmd/setup
github.com/therecipe/qt/cmd/qtdeploy
github.com/therecipe/qt/cmd/qtsetup
x-MacBook-Pro:~ apple$ 

then i went to : internal/examples/qml/webview run: qtdeploy

its made the webview, and when i open it it does nothing.

any ideas ??

ghost commented 7 years ago

Because that did not work, i tried running "qtsetup". Its much faster now btw - great work.

x-MacBook-Pro:qt apple$ pwd
/Users/apple/workspace/go/src/github.com/therecipe/qt
x-MacBook-Pro:qt apple$ qtsetup
INFO[0000] running setup/prep                           
INFO[0000] running setup/check desktop                  
INFO[0000] VERSION: 0.0.4                               
INFO[0000] GOOS: darwin                                 
INFO[0000] GOARCH: amd64                                
INFO[0000] GOVERSION: go1.8                             
INFO[0000] GOROOT: /usr/local/opt/go/libexec            
INFO[0000] GOPATH: /Users/apple/workspace/go            
INFO[0000] GOBIN: /Users/apple/workspace/go/bin         
INFO[0000] HASH: 5200161c61f83462162852a35d8fd0883ff74a9a 
INFO[0000] QT_VERSION: 5.8.0                            
INFO[0000] QT_VERSION_MAJOR: 5.8                        
INFO[0000] QT_DIR: /Users/apple/Qt5.8.0                 
INFO[0000] QT_STUB: false                               
INFO[0000] QT_HOMEBREW:                                 
INFO[0000] IsHomeBrewQtDir: false                       
INFO[0000] UseHomebrew: false                           
INFO[0000] QT_DARWIN_DIR: /Users/apple/Qt5.8.0/5.8/clang_64 
INFO[0000] XCODE_DIR: /Applications/Xcode.app           
INFO[0000] MACOS_SDK_DIR: MacOSX10.12.sdk               
INFO[0000] IPHONEOS_SDK_DIR: iPhoneOS10.2.sdk           
INFO[0000] IPHONESIMULATOR_SDK_DIR: iPhoneSimulator10.2.sdk 
INFO[0000] running setup/generate                       
INFO[0009] generating full qt/core                      
INFO[0015] generating full qt/androidextras             
INFO[0015] generating full qt/gui                       
INFO[0022] generating full qt/network                   
INFO[0023] generating full qt/xml                       
INFO[0024] generating full qt/dbus                      
INFO[0025] generating full qt/nfc                       
INFO[0025] generating full qt/script                    
INFO[0025] generating full qt/sensors                   
INFO[0027] generating full qt/positioning               
INFO[0027] generating full qt/widgets                   
INFO[0048] generating full qt/sql                       
INFO[0049] generating full qt/macextras                 
INFO[0049] generating full qt/qml                       
INFO[0050] generating full qt/websockets                
INFO[0050] generating full qt/xmlpatterns               
INFO[0051] generating full qt/bluetooth                 
INFO[0051] generating full qt/webchannel                
INFO[0051] generating full qt/svg                       
INFO[0052] generating full qt/multimedia                
INFO[0057] generating full qt/quick                     
INFO[0059] generating full qt/help                      
INFO[0061] generating full qt/location                  
INFO[0061] generating full qt/scripttools               
INFO[0061] generating full qt/uitools                   
INFO[0061] generating full qt/webengine                 
INFO[0062] generating full qt/testlib                   
INFO[0062] generating full qt/serialport                
INFO[0063] generating full qt/serialbus                 
INFO[0063] generating full qt/printsupport              
INFO[0064] generating full qt/designer                  
INFO[0066] generating full qt/scxml                     
INFO[0066] generating full qt/gamepad                   
INFO[0067] generating full qt/purchasing                
INFO[0067] generating full qt/datavisualization         
INFO[0068] generating full qt/charts                    
INFO[0071] generating full qt/speech                    
INFO[0071] generating full qt/quickcontrols2            
INFO[0071] generating full qt/sailfish                  
INFO[0071] generating full qt/webview                   
INFO[0071] running setup/install desktop                
INFO[0071] starting to install modules (~15min)         
INFO[0071] installing full qt/core                      
INFO[0108] installing full qt/androidextras             
INFO[0109] installing full qt/gui                       
INFO[0154] installing full qt/network                   
INFO[0171] installing full qt/xml                       
INFO[0179] installing full qt/dbus                      
INFO[0185] installing full qt/nfc                       
INFO[0190] installing full qt/script                    
INFO[0195] installing full qt/sensors                   
INFO[0204] installing full qt/positioning               
INFO[0209] installing full qt/widgets                   
INFO[0328] installing full qt/sql                       
INFO[0339] installing full qt/macextras                 
INFO[0342] installing full qt/qml                       
INFO[0349] installing full qt/websockets                
INFO[0353] installing full qt/xmlpatterns               
INFO[0357] installing full qt/bluetooth                 
INFO[0365] installing full qt/webchannel                
INFO[0368] installing full qt/svg                       
INFO[0373] installing full qt/multimedia                
INFO[0407] installing full qt/quick                     
INFO[0421] installing full qt/help                      
INFO[0433] installing full qt/location                  
INFO[0438] installing full qt/scripttools               
INFO[0440] installing full qt/uitools                   
INFO[0443] installing full qt/webengine                 
INFO[0453] installing full qt/testlib                   
INFO[0456] installing full qt/serialport                
INFO[0460] installing full qt/serialbus                 
INFO[0465] installing full qt/printsupport              
INFO[0472] installing full qt/designer                  
ERRO[0476] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/designer" env= error="exit status 2" func=RunCmdOptional name=install.designer
github.com/therecipe/qt/designer
# github.com/therecipe/qt/designer
In file included from ../../workspace/go/src/github.com/therecipe/qt/designer/designer.cpp:21:
/Users/apple/Qt5.8.0/5.8/clang_64/lib/QtDesigner.framework/Headers/QDesignerCustomWidgetCollectionInterface:4:4: warning: Header <QtDesigner/QDesignerCustomWidgetCollectionInterface> is deprecated. Please include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface> instead. [-W#warnings]
/Users/apple/Qt5.8.0/5.8/clang_64/lib/QtDesigner.framework/Headers/QDesignerCustomWidgetCollectionInterface:8:10: fatal error: 'QtUiPlugin/QDesignerCustomWidgetCollectionInterface' file not found

INFO[0476] installing full qt/scxml                     
INFO[0480] installing full qt/gamepad                   
INFO[0483] installing full qt/purchasing                
INFO[0485] installing full qt/datavisualization         
INFO[0498] installing full qt/charts                    
INFO[0518] installing full qt/speech                    
INFO[0520] installing full qt/quickcontrols2            
INFO[0521] installing full qt/sailfish                  
INFO[0522] installing full qt/webview                   
INFO[0523] running setup/test desktop (~5min)           
INFO[0523] testing qml/application                      
INFO[0533] testing qml/drawer_nav_x                     
INFO[0548] testing qml/gallery                          
INFO[0562] testing quick/calc                           
INFO[0575] testing widgets/line_edits                   
INFO[0590] testing widgets/pixel_editor                 
INFO[0609] testing widgets/textedit         

then i tried the webview example again.

No dice. It opens the app, but no window opens.

therecipe commented 7 years ago

@gedw99

I think it could be the same issue as this one: https://github.com/therecipe/qt/issues/113 Or at least the errors are very similar:

./deploy/darwin/webview.app/Contents/MacOS/webview_app
QQmlApplicationEngine failed to load component
qrc:/main.qml:42 module "QtQuick.Controls" is not installed

The workaround for now is to either use: cp ./deploy/darwin/webview.app/Contents/MacOS/webview_app . && ./webview_app (after you ran qtdeploy)

or to use: qtrcc && qtmoc && qtminimal && go build -o webview_app -tags=minimal && ./webview_app

the issue seems to be that macdeployqt is not successfully bundling all dependencies as it should.

joeblew99 commented 7 years ago

works for me as you described with:

qtrcc && qtmoc && qtminimal && go build -o webview_app -tags=minimal && ./webview_app