0

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 simplescreenrecorder.

$ 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.

0

Completely removing the libs sudo apt-get remove libqt4* and installing again sudo apt-get install libqt4* worked.

There seems to be a different between that and sudo apt-get install --reinstall. I still don't know the cause of the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.