Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Does Graphics Driver Affect Compiling?
QtWS25 Last Chance

Does Graphics Driver Affect Compiling?

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 4 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qingshui Kong
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Are all these systems Ubuntu 16.04?

      The type of driver should not play a big role here.

      (Z(:^

      Q 1 Reply Last reply
      0
      • sierdzioS sierdzio

        Are all these systems Ubuntu 16.04?

        The type of driver should not play a big role here.

        Q Offline
        Q Offline
        Qingshui Kong
        wrote on last edited by
        #3

        @sierdzio

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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 ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          Q 1 Reply Last reply
          0
          • SGaistS SGaist

            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 ?

            Q Offline
            Q Offline
            Qingshui Kong
            wrote on last edited by
            #5

            @SGaist
            I use Qt5.9.1. I installed it by running qt-opensource-linux-x64-5.9.1.run
            Yes, I use OpenGL.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Are you tied to that old version of Qt ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              Q 1 Reply Last reply
              0
              • SGaistS SGaist

                Are you tied to that old version of Qt ?

                Q Offline
                Q Offline
                Qingshui Kong
                wrote on last edited by
                #7

                @SGaist
                You mean Qt5.9.1 is too old? I should use a newer version?

                jsulmJ 1 Reply Last reply
                0
                • Q Qingshui Kong

                  @SGaist
                  You mean Qt5.9.1 is too old? I should use a newer version?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

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

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  Q 1 Reply Last reply
                  0
                  • jsulmJ jsulm

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

                    Q Offline
                    Q Offline
                    Qingshui Kong
                    wrote on last edited by
                    #9

                    @jsulm

                    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?

                    jsulmJ 1 Reply Last reply
                    0
                    • Q Qingshui Kong

                      @jsulm

                      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?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @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?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      Q 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @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?

                        Q Offline
                        Q Offline
                        Qingshui Kong
                        wrote on last edited by
                        #11

                        @jsulm

                        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.

                        jsulmJ 1 Reply Last reply
                        0
                        • Q Qingshui Kong

                          @jsulm

                          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.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @Qingshui-Kong You can start your app in a debugger, then you can get a stack trace and the location where the crash happens.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          Q 1 Reply Last reply
                          1
                          • jsulmJ jsulm

                            @Qingshui-Kong You can start your app in a debugger, then you can get a stack trace and the location where the crash happens.

                            Q Offline
                            Q Offline
                            Qingshui Kong
                            wrote on last edited by
                            #13

                            @jsulm
                            OK. Thanks.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              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.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              Q 1 Reply Last reply
                              1
                              • SGaistS SGaist

                                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.

                                Q Offline
                                Q Offline
                                Qingshui Kong
                                wrote on last edited by
                                #15

                                @SGaist
                                Yes, it works properly.
                                I find this problem when execute the application on a system with Nvidia driver.

                                I test 3 case.

                                1. 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.
                                2. 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.
                                3. 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.

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  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.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  Q 1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    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.

                                    Q Offline
                                    Q Offline
                                    Qingshui Kong
                                    wrote on last edited by
                                    #17

                                    @SGaist
                                    Yes, I modified the rpath and deployed the platform plugin and other libraries.

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      Did you also check that the platform plugin loads the expected dependencies ?

                                      Can you post a stack trace of the crash ?

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      Q 1 Reply Last reply
                                      0
                                      • SGaistS SGaist

                                        Did you also check that the platform plugin loads the expected dependencies ?

                                        Can you post a stack trace of the crash ?

                                        Q Offline
                                        Q Offline
                                        Qingshui Kong
                                        wrote on last edited by
                                        #19

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

                                        1 Reply Last reply
                                        0

                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups
                                        • Search
                                        • Get Qt Extensions
                                        • Unsolved