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.37k stars 735 forks source link

Modules fail to resolve and load with GOPROXY=off #1150

Open xeals opened 4 years ago

xeals commented 4 years ago

I'm in the process of trying to package an application for a Linux distribution that uses this tool.

I'm building the application with qtdeploy build <module>. My current issue gives a build output identical to #1115, #1103, and #1081. Digging into the -debug logs provides an error around each LoadModule warning:

DEBU[0016] failed to load (optional) go: github.com/docker/docker-credential-helpers@v0.6.3: module lookup disabled by GOPROXY=off/qtwidgets.index  error="open go: github.com/docker/docker-credential-helpers@v0.6.3: module lookup disabled by GOPROXY=off/qtwidgets.index: no such file or directory"

and finally

ERRO[0009] failed to load go: github.com/docker/docker-credential-helpers@v0.6.3: module lookup disabled by GOPROXY=off/binding/files/utils-qml.go  error="open go: github.com/docker/docker-credential-helpers@v0.6.3: module lookup disabled by GOPROXY=off/binding/files/utils-qml.go: no such file or directory"

The build process requires vendoring all of the application's dependencies and disabling network access during build time. However, qt seemingly ignores the vendor folder and tries to use the network. I've attempted to look into the code to figure out what needs patching to have it resolve things correctly, but I'm not making a lot of headway.

qtsetup check: (note that GOROOT and QT_DIR don't exist)

INFO[0000] GOOS:                     *  'linux'
INFO[0000] GOARCH:                   *  'amd64'
INFO[0000] GOVERSION:                   'go1.14.4'
INFO[0000] GOROOT:                      '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.14.4/share/go'
INFO[0000] GOPATH:                   *  '/build/go'
INFO[0000] GOBIN:                       '/build/go/bin'
INFO[0000] GOMOD:                       '/build/source/go.mod'
INFO[0000] QT_HASH:                     'v0.0.0-20200126204426-5074eb6d8c41'
INFO[0000] QT_API:                      ''
INFO[0000] QT_VERSION:                  '5.12.7'
INFO[0000] QT_DIR:                      '/homeless-shelter/Qt'
INFO[0000] QT_STUB:                     'false'
INFO[0000] QT_DEBUG:                    'false'
INFO[0000] QT_QMAKE_DIR:                ''
INFO[0000] QT_WEBKIT:                   'false'
INFO[0000] QT_STATIC:                   'false'
INFO[0000] QT_GEN_TSD:                  'false'
INFO[0000] QT_GEN_OPENGL:               'false'
INFO[0000] QT_GEN_QUICK_EXTRAS:         'false'
INFO[0000] QT_RESOURCES_BIG:            'false'
INFO[0000] QT_NOT_CACHED:               'false'
INFO[0000] QT_DISTRO:                   ''
INFO[0000] QT_PKG_CONFIG:            *  'true'
INFO[0000] QT_DOC_DIR:                  ''
INFO[0000] QT_MISC_DIR:                 '/nix/store/wzwbdaa456dmiprd81maab3sd2hlqwwr-qtbase-5.12.7-dev'
juergh commented 3 years ago

@xeals I'm facing the same problem. Did you find a solution?