Open Merrit opened 4 years ago
Also getting this error on Ubuntu running Go 1.15.
ljandrew@ljandrew-desktop:/opt/go-qt-gui$ export GO111MODULE=on; go get -v github.com/therecipe/qt && go install -v -tags=no_env github.com/therecipe/qt/cmd/... && go mod vendor && git clone https://github.com/therecipe/env_linux_amd64_513.git vendor/github.com/therecipe/env_linux_amd64_513 && $(go env GOPATH)/bin/qtsetup
go: github.com/therecipe/qt upgrade => v0.0.0-20200819184607-ca87f3552e22
go: finding module for package github.com/therecipe/qt/internal/binding/files/docs/5.12.0
go: finding module for package github.com/therecipe/qt/internal/binding/files/docs/5.13.0
go: found github.com/therecipe/qt/internal/binding/files/docs/5.12.0 in github.com/therecipe/qt/internal/binding/files/docs/5.12.0 v0.0.0-20200819184607-ca87f3552e22
go: found github.com/therecipe/qt/internal/binding/files/docs/5.13.0 in github.com/therecipe/qt/internal/binding/files/docs/5.13.0 v0.0.0-20200819184607-ca87f3552e22
Cloning into 'vendor/github.com/therecipe/env_linux_amd64_513'...
remote: Enumerating objects: 9446, done.
remote: Total 9446 (delta 0), reused 0 (delta 0), pack-reused 9446
Receiving objects: 100% (9446/9446), 129.24 MiB | 31.56 MiB/s, done.
Resolving deltas: 100% (4194/4194), done.
Updating files: 100% (9714/9714), done.
INFO[0001] running: 'qtsetup prep'
WARN[0001] failed to create qtrcc symlink in your PATH (/sbin/qtrcc); please use /opt/gopath/bin/qtrcc instead
WARN[0001] failed to create qtmoc symlink in your PATH (/sbin/qtmoc); please use /opt/gopath/bin/qtmoc instead
WARN[0001] failed to create qtminimal symlink in your PATH (/sbin/qtminimal); please use /opt/gopath/bin/qtminimal instead
WARN[0001] failed to create qtdeploy symlink in your PATH (/sbin/qtdeploy); please use /opt/gopath/bin/qtdeploy instead
INFO[0001] running: 'qtsetup check linux' [docker=false] [vagrant=false]
INFO[0001] GOOS: 'linux'
INFO[0001] GOARCH: 'amd64'
INFO[0001] GOVERSION: 'go1.15'
INFO[0001] GOROOT: * '/opt/go/1.15'
INFO[0001] GOPATH: * '/opt/gopath'
INFO[0001] GOBIN: '/opt/gopath/bin'
INFO[0001] GOMOD: '/opt/go-qt-gui/go.mod'
INFO[0001] QT_HASH: 'v0.0.0-20200819184607-ca87f3552e22'
INFO[0001] QT_API: ''
INFO[0001] QT_VERSION: '5.13.0'
INFO[0001] QT_DIR: * '/opt/go-qt-gui/vendor/github.com/therecipe/env_linux_amd64_513'
INFO[0001] QT_STUB: 'false'
INFO[0001] QT_DEBUG: 'false'
INFO[0001] QT_QMAKE_DIR: ''
INFO[0001] QT_WEBKIT: 'false'
INFO[0001] QT_STATIC: 'false'
INFO[0001] QT_GEN_GO: 'false'
INFO[0001] QT_GEN_OPENGL: 'false'
INFO[0001] QT_GEN_QUICK_EXTRAS: 'false'
INFO[0001] QT_RESOURCES_BIG: 'false'
INFO[0001] QT_NOT_CACHED: 'false'
INFO[0001] QT_DISTRO: 'ubuntu'
INFO[0001] QT_PKG_CONFIG: 'false'
INFO[0001] running: 'qtsetup generate linux' [docker=false] [vagrant=false]
INFO[0006] generating full qt/core
INFO[0024] generating full qt/androidextras
INFO[0024] generating full qt/gui
INFO[0047] generating full qt/network
INFO[0053] generating full qt/xml
INFO[0055] generating full qt/dbus
INFO[0057] generating full qt/nfc
INFO[0058] generating full qt/script
INFO[0059] generating full qt/sensors
INFO[0064] generating full qt/positioning
INFO[0066] generating full qt/widgets
INFO[0114] generating full qt/sql
INFO[0117] generating full qt/qml
INFO[0120] generating full qt/websockets
INFO[0121] generating full qt/xmlpatterns
INFO[0122] generating full qt/bluetooth
INFO[0125] generating full qt/webchannel
INFO[0126] generating full qt/svg
INFO[0127] generating full qt/multimedia
INFO[0146] generating full qt/quick
INFO[0151] generating full qt/help
INFO[0156] generating full qt/location
INFO[0157] generating full qt/scripttools
INFO[0158] generating full qt/uitools
INFO[0158] generating full qt/webengine
INFO[0161] generating full qt/testlib
INFO[0161] generating full qt/serialport
INFO[0162] generating full qt/serialbus
INFO[0164] generating full qt/printsupport
INFO[0167] generating full qt/designer
INFO[0171] generating full qt/scxml
INFO[0173] generating full qt/gamepad
INFO[0174] generating full qt/purchasing
INFO[0174] generating full qt/datavisualization [GPLv3]
INFO[0180] generating full qt/charts [GPLv3]
INFO[0191] generating full qt/virtualkeyboard [GPLv3]
INFO[0193] generating full qt/speech
INFO[0193] generating full qt/quickcontrols2
INFO[0194] generating full qt/sailfish
INFO[0194] generating full qt/webview
INFO[0194] generating full qt/remoteobjects
INFO[0196] running: 'qtsetup install linux' [docker=false] [vagrant=false]
INFO[0196] installing full qt/core
package github.com/therecipe/qt/core
imports github.com/therecipe/qt: no Go files in /opt/go-qt-gui/vendor/github.com/therecipe/qt
ERRO[0196] failed to install 'core'; aborting setup
Hey
I looked into this and using something like this:
FROM ubuntu:16.04
ENV USER user
ENV HOME /home/$USER
ENV GOPATH $HOME/work
ENV PATH /usr/local/go/bin:$PATH
## Those are only needed on docker ##
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install build-essential libglib2.0-dev libglu1-mesa-dev libpulse-dev \
&& apt-get --no-install-recommends -qq -y install fontconfig libasound2 libegl1-mesa libnss3 libpci3 libxcomposite1 libxcursor1 libxi6 libxrandr2 libxtst6 && apt-get -qq clean && apt-get -qq update && apt-get --no-install-recommends -qq -y install fcitx-frontend-qt5 && apt-get -qq clean
#####################################
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
RUN GO=go1.13.4.linux-amd64.tar.gz && curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/$GO && tar -xzf $GO -C /usr/local
RUN git clone https://github.com/therecipe/examples.git
ENV GO111MODULE on
RUN cd examples && go get -v github.com/therecipe/qt && go install -v -tags=no_env github.com/therecipe/qt/cmd/... && go mod vendor && git clone https://github.com/therecipe/env_linux_amd64_513.git vendor/github.com/therecipe/env_linux_amd64_513 && $(go env GOPATH)/bin/qtsetup
should work, it could be that you need to remove your old vendor folder first thought.
Also btw, I'm currently working on an experimental mode that greatly simplifies the support for go modules and makes it possible to simply go get
the repo without any additional requirements or installation steps.
To test it, you can use something like this:
FROM ubuntu:16.04
ENV USER user
ENV HOME /home/$USER
ENV GOPATH $HOME/work
ENV PATH /usr/local/go/bin:$PATH
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
RUN GO=go1.15.linux-amd64.tar.gz && curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/$GO && tar -xzf $GO -C /usr/local
RUN git clone https://github.com/therecipe/examples.git
ENV GO111MODULE on
RUN cd examples && go get -v github.com/therecipe/qt && go build -o widgets ./basic/widgets && ./widgets
On another note, it seems like Go 1.14 in module mode, breaks using go install
outside of the GOPATH and you would need to move your repo inside the go path to have qtsetup run successfully.
I will probably start to advise against using go modules in the future, since they seem to find a way to make the usage for people using cgo in their project, more tedious with each release.
On another note, it seems like Go 1.14 in module mode, breaks using
go install
outside of the GOPATH and you would need to move your repo inside the go path to have qtsetup run successfully.
This fixed the issue for me. Did not find it in the installation notes. Should probably be included.
Thanks!
go env