Does Graphics Driver Affect Compiling?
-
Hello,
Could anybody help me?
I wonder if Graphics Driver Affect Compiling?
I compiled a Qt application on Ubuntu 16.04. And it use the default Graphics Driver(Nouveau). And I released the application.
I installed the application on a similar system which also used the default Graphics Driver(Nouveau). And it worked. I could execute the application.
But when I installed the application on a different system which used Graphics Driver NVIDIA instead of the default Graphics Driver(Nouveau). It didn't work and the error was Segmentation fault.
Does anybody encounter the same problem? Could somebody give me any advice?
Thanks in advance.
-
Are all these systems Ubuntu 16.04?
The type of driver should not play a big role here.
-
Yes, all these systems are the same Ubuntu 16.04.
I also think the driver should not play a big role, but it doesn't work.
-
Hi,
Are you using your system provided Qt ?
Which version is it ?
How did you install the application ?
Are you using OpenGL in your application ? -
Hi,
Are you using your system provided Qt ?
Which version is it ?
How did you install the application ?
Are you using OpenGL in your application ?@SGaist
I use Qt5.9.1. I installed it by running qt-opensource-linux-x64-5.9.1.run
Yes, I use OpenGL. -
Are you tied to that old version of Qt ?
-
@SGaist
You mean Qt5.9.1 is too old? I should use a newer version? -
@SGaist
You mean Qt5.9.1 is too old? I should use a newer version?@Qingshui-Kong said in Does Graphics Driver Affect Compiling?:
I should use a newer version?
Why not if you install Qt by yourself? Current Qt version is already 5.14.0. Newer Qt versions contain many bug-fixes.
-
@Qingshui-Kong said in Does Graphics Driver Affect Compiling?:
I should use a newer version?
Why not if you install Qt by yourself? Current Qt version is already 5.14.0. Newer Qt versions contain many bug-fixes.
OK. Thank you.
So if I don't install newer Qt, I have to compile for each Graphics Drivers?
I want to make sure that if newer Qt can fix this problem?
-
OK. Thank you.
So if I don't install newer Qt, I have to compile for each Graphics Drivers?
I want to make sure that if newer Qt can fix this problem?
@Qingshui-Kong said in Does Graphics Driver Affect Compiling?:
I want to make sure that if newer Qt can fix this problem?
I can't tell you. But it is easy to install the current version and rebuild your app with it.
Also, do you have stack trace of our app when it is crashing? -
@Qingshui-Kong said in Does Graphics Driver Affect Compiling?:
I want to make sure that if newer Qt can fix this problem?
I can't tell you. But it is easy to install the current version and rebuild your app with it.
Also, do you have stack trace of our app when it is crashing?OK, I will try it.
I don't have any stack trace. But my app will record log. There is no log and I can't see UI. It just crashes and outputs 'Segmentation fault'.
I think it crashes when it loads some shared libraries and it can't start. -
OK, I will try it.
I don't have any stack trace. But my app will record log. There is no log and I can't see UI. It just crashes and outputs 'Segmentation fault'.
I think it crashes when it loads some shared libraries and it can't start.@Qingshui-Kong You can start your app in a debugger, then you can get a stack trace and the location where the crash happens.
-
@Qingshui-Kong You can start your app in a debugger, then you can get a stack trace and the location where the crash happens.
@jsulm
OK. Thanks. -
The graphics drivers may also contain a bug triggered by your application. So it's also a good idea to check whether there's an issue there.
One of the first thing to test is whether your application, compiled with the Qt version provided by the distribution of the machine using the Nvidia driver works properly there.
-
The graphics drivers may also contain a bug triggered by your application. So it's also a good idea to check whether there's an issue there.
One of the first thing to test is whether your application, compiled with the Qt version provided by the distribution of the machine using the Nvidia driver works properly there.
@SGaist
Yes, it works properly.
I find this problem when execute the application on a system with Nvidia driver.I test 3 case.
- Compile the project and package the application on a system with Nouveau driver(default) and execute the application on another system with Nouveau driver(default). It works properly.
- Compile the project and package the application on a system with Nvidia driver and execute the application on another system with Nvidia driver. It works properly.
- Compile the project and package the application on a system with Nouveau driver(default) and execute the application on a system with Nvidia driver. It doesn't work.
When I package the application I will collect all the shared libraries used by the application and put them in the same folder.
-
Just copying the libraries in the same folder is not enough unless you also modified the rpath of your application. You can check whether they are you correctly using ldd.
Note that you also need to deploy the platform plugin. -
Just copying the libraries in the same folder is not enough unless you also modified the rpath of your application. You can check whether they are you correctly using ldd.
Note that you also need to deploy the platform plugin.@SGaist
Yes, I modified the rpath and deployed the platform plugin and other libraries. -
Did you also check that the platform plugin loads the expected dependencies ?
Can you post a stack trace of the crash ?
-
Did you also check that the platform plugin loads the expected dependencies ?
Can you post a stack trace of the crash ?
@SGaist
I don't know if the platform plugin loads the expected dependencies. If it doesn't, that dependencies should be related to Graphics driver.I'll try to get some stack trace of the crash after vocation.