Yesterday I was developing a Qt4 application, and suddenly, the program would segfault on startup. I decided to upgrade to Qt5 and that fixed the issue.
However, I have noticed that all Qt4 apps seem to have the same behavior. An example is
$ ldd /usr/bin/simplescreenrecorder | grep Qt libQtGui.so.4 => /usr/lib/x86_64-linux-gnu/libQtGui.so.4 (0x00007fd558703000) libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007fd55820f000)
I can tell it is Qt because of this. I was only calling to Qt4 in that program, and the segfault looked the same in the debugger.
(gdb) run Starting program: /usr/bin/simplescreenrecorder Program received signal SIGSEGV, Segmentation fault. elf_dynamic_do_Rela (skip_ifunc=<optimized out>, lazy=0, nrelative=<optimized out>, relsize=662856, reladdr=<optimized out>, map=0x7ffff7fbd908) at do-rel.h:112 112 do-rel.h: No such file or directory.
Both my sample app and
simplescreenrecorder show the same in the debugger.
What I have tried
- Reinstalling all libqt4 libraries
I can tell it is something to do with Qt4 and not any other Qt version, namely Qt5, because my program running Qt5 works correctly, and so do any other Qt5 apps.
I'm running Ubuntu 17.04.
EDIT: At the moment I'm completely removing all libqt4 libraries, see if I get lucky.
EDIT 2: It worked.