Qt: Segfault in 'qtsetup generate linux'

Created on 24 May 2018  路  6Comments  路  Source: therecipe/qt

This is on Kubuntu 17.10 Artful running under WMWare. Shouldn't really matter.
```$ qtsetup
INFO[0000] running: 'qtsetup prep'
WARN[0000] failed to create qtrcc symlink in your PATH (/usr/lib/go-1.10/bin/qtrcc); please use ~/go/bin/qtrcc instead
WARN[0000] failed to create qtmoc symlink in your PATH (/usr/lib/go-1.10/bin/qtmoc); please use ~/go/bin/qtmoc instead
WARN[0000] failed to create qtminimal symlink in your PATH (/usr/lib/go-1.10/bin/qtminimal); please use ~/go/bin/qtminimal instead
WARN[0000] failed to create qtdeploy symlink in your PATH (/usr/lib/go-1.10/bin/qtdeploy); please use ~/go/bin/qtdeploy instead
INFO[0000] running: 'qtsetup check linux' [docker=false] [vagrant=false]
INFO[0000] GOOS: 'linux'
INFO[0000] GOARCH: 'amd64'
INFO[0000] GOVERSION: 'go1.10'
INFO[0000] GOROOT: '/usr/lib/go-1.10'
INFO[0000] GOPATH: * '~/go'
INFO[0000] GOBIN: '~/go/bin'
INFO[0000] QT_HASH: '7038382d6c7bb5fd3957df56bbedf8ec4ca6b67c'
INFO[0000] QT_VERSION: * '5.11.0'
INFO[0000] QT_VERSION_MAJOR: '5.11.0'
INFO[0000] QT_DIR: * '~/Qt'
INFO[0000] QT_STUB: 'false'
INFO[0000] QT_DEBUG: 'false'
INFO[0000] QT_QMAKE_DIR: ''
INFO[0000] QT_WEBKIT: 'false'
INFO[0000] QT_DISTRO: 'ubuntu'
INFO[0000] QT_PKG_CONFIG: 'false'
INFO[0000] running: 'qtsetup generate linux' [docker=false] [vagrant=false]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x5286c6]

goroutine 1 [running]:
github.com/therecipe/qt/internal/binding/parser.(Class).GetBases(0x0, 0x0, 0x0, 0xa914e8)
~/go/src/github.com/therecipe/qt/internal/binding/parser/class.go:70 +0x26
github.com/therecipe/qt/internal/binding/parser.(
Class).GetAllBasesRecursiveCheckFailed(0x0, 0x1, 0xc421c076a8, 0xf, 0xa92100, 0x0)
~/go/src/github.com/therecipe/qt/internal/binding/parser/class.go:92 +0x96
github.com/therecipe/qt/internal/binding/parser.(Class).GetAllBases(0x0, 0x0, 0x0, 0x0)
~/go/src/github.com/therecipe/qt/internal/binding/parser/class.go:80 +0x34
github.com/therecipe/qt/internal/binding/parser.(
Function).IsDerivedFromVirtual(0xc42c7856c0, 0x8f00000000000000)
~/go/src/github.com/therecipe/qt/internal/binding/parser/function.go:496 +0x7b
github.com/therecipe/qt/internal/binding/parser.(Function).fixGeneral_AfterClasses(0xc42c7856c0)
~/go/src/github.com/therecipe/qt/internal/binding/parser/function_fix.go:58 +0xb4
github.com/therecipe/qt/internal/binding/parser.(
Class).fixFunctions(0xc42c51fba0, 0x84eab8)
~/go/src/github.com/therecipe/qt/internal/binding/parser/class_fix.go:33 +0x52
github.com/therecipe/qt/internal/binding/parser.(Class).fix(0xc42c51fba0)
~/go/src/github.com/therecipe/qt/internal/binding/parser/class_fix.go:28 +0xcd
github.com/therecipe/qt/internal/binding/parser.(
Module).Prepare(0xc4201ac300, 0x84ead0, 0xc42001b6d0)
~/go/src/github.com/therecipe/qt/internal/binding/parser/module.go:84 +0x1033
github.com/therecipe/qt/internal/binding/parser.LoadModules()
~/go/src/github.com/therecipe/qt/internal/binding/parser/parser.go:48 +0x1ac
github.com/therecipe/qt/internal/cmd/setup.Generate(0x803c27, 0x5, 0x800000)
~/go/src/github.com/therecipe/qt/internal/cmd/setup/generate.go:23 +0x147
main.main()
~/go/src/github.com/therecipe/qt/cmd/qtsetup/main.go:97 +0x2ae
```

I'm assuming the failure to create symlinks in the prep step may have something to do with this, but why is the setup tool attempting to create stuff in /usr/lib anyway?

Most helpful comment

Sorry, the binding isn't working with 5.11 yet.
So better stay on 5.10.x for the moment.

I was on vacation the last few weeks and haven't had time to get much done, but I already fixed most issues regarding 5.11 when I tested the beta release in april.

I will try to push the necessary changes for 5.11 mid June at least.

All 6 comments

These error popped up in my system also after an upgrade of some Qt packages

You have to wait for the maintainer to fix the issue. Till then

  • don't run qtsetup
  • build using docker

Same here, I use Manjaro with Qt 5.11.0. Probably it is with the Qt version.

Sorry, the binding isn't working with 5.11 yet.
So better stay on 5.10.x for the moment.

I was on vacation the last few weeks and haven't had time to get much done, but I already fixed most issues regarding 5.11 when I tested the beta release in april.

I will try to push the necessary changes for 5.11 mid June at least.

@therecipe any updates for 5.11 so far?

@kvnxiao The changes from https://github.com/therecipe/qt/commit/5355937d17e9eee62460706cb9a033180014400e should make the binding work with 5.11.x

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quantonganh picture quantonganh  路  6Comments

Litarvan picture Litarvan  路  3Comments

joeblew99 picture joeblew99  路  7Comments

StarAurryon picture StarAurryon  路  5Comments

adneg picture adneg  路  6Comments