Congratulations to our 2022 Qt Champions!

Deploying Qt 5 application on Ubuntu, getting segmentation fault (core dumped)

  • Hi there,

    Here is the situation: I have an Ubuntu 15.10 macine, with a Qt 5.3. Everything works smoothly on that machine. I compile my app and generate my executable.

    I have another clean Ubuntu 15.10 machine, whithout Qt installed this time. Using the "ldd" command, i copied all Qt related libraries that are needed by my application, but when i run my app, i get the error:
    cannot mix incompatible qt library.
    I double checked with ldd, and my application is only using the libraries that i have provided. I can't find at what point libraries are mixed.

    Then, i tried to remove the libraries i provided and let my app only use system libraries, but then it complains that it can't find When i copy that file from the Qt machine, i get: "segmentation fault (cure dumped)"

    Could it be becuase the is not compatible with Qt version used to compile Ubuntu 15.10? If that the case, how to direct the system to install the suitable "" that coexists with the system?

    Any other idea how to debug that?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    The Qt libraries are one thing, you also need to deploy the Qt plugins

  • Hi! Thanks.

    I forget to mention them, but they are all there there..

  • Lifetime Qt Champion

    By the way, are you building your application with your distribution's Qt ? If not, then consider doing it, that will simplify things a bit since you are testing on the same Ubuntu version.

  • @SGaist I guess i could do that, but then, what will happen when user "lambda" tries to launch the application on his Ubuntu that is not the same as mine?

  • Lifetime Qt Champion

    In that case follow the Linux deployment guide

  • @SGaist :)

    I knew that famous link would come up at some point..

    Well, what if i tried everything on that page (expect static linking) and failed?

    Let's assume i did something wrong, is there some methodology to try to find the source of the problem?

    Should i try building a simple "hello world" application, and then add modules one by one, until i find the problem? How would you deal with that?

    Thanks a lot for your help and advice!

  • Lifetime Qt Champion

    Yes, start with a hello world and verify that it's working correctly, then go on with your application.

Log in to reply