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. How start compiler in Ubuntu 20
Forum Updated to NodeBB v4.3 + New Features

How start compiler in Ubuntu 20

Scheduled Pinned Locked Moved Solved General and Desktop
33 Posts 5 Posters 5.1k Views 3 Watching
  • 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.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on 1 Jun 2020, 07:22 last edited by
    #1

    Hi!
    How start compiler in Ubuntu 20.
    I install "xcb" and and some other packages, but I get this error:

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 1 Jun 2020, 09:06 last edited by
      #2

      Hi
      What Qt version ?
      And how did you install it ?

      This i just experinced in older linux mint upgrading to Qt5.15

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mikeeeeee
        wrote on 1 Jun 2020, 10:08 last edited by
        #3

        I use Qt 5.15, I use online installer.
        When installing on Windows, files did not arrive due to poor server speed and they had to be reinstalled. Maybe with Linux the same trouble.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Jun 2020, 10:35 last edited by
          #4

          Hi,

          Set QT_DEBUG_PLUGINS environment variable to 1 and restart your application. You shall have more information about why it fails to load.

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

          1 Reply Last reply
          1
          • M Offline
            M Offline
            Mikeeeeee
            wrote on 1 Jun 2020, 11:04 last edited by
            #5

            @SGaist said in How start compiler in Ubuntu 20:

            QT_DEBUG_PLUGINS

            I write in .pro file:

            QT_DEBUG_PLUGINS = 1
            

            But the debag didn't record anything else.

            M 1 Reply Last reply 1 Jun 2020, 11:17
            0
            • M Mikeeeeee
              1 Jun 2020, 11:04

              @SGaist said in How start compiler in Ubuntu 20:

              QT_DEBUG_PLUGINS

              I write in .pro file:

              QT_DEBUG_PLUGINS = 1
              

              But the debag didn't record anything else.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 1 Jun 2020, 11:17 last edited by
              #6

              @Mikeeeeee
              Hi
              You must do that in a shell.
              Not in the .pro file

              So open a shell
              type
              export QT_DEBUG_PLUGINS = 1
              and then start creator in this shell.

              If you dont know where creator is, you can right click its icon and edit it and see path there.

              1 Reply Last reply
              3
              • M Offline
                M Offline
                Mikeeeeee
                wrote on 1 Jun 2020, 11:37 last edited by
                #7

                I don't understand you. Do I need to register this in the console?

                J 1 Reply Last reply 1 Jun 2020, 11:49
                0
                • M Mikeeeeee
                  1 Jun 2020, 11:37

                  I don't understand you. Do I need to register this in the console?

                  J Offline
                  J Offline
                  JonB
                  wrote on 1 Jun 2020, 11:49 last edited by JonB 6 Jan 2020, 12:23
                  #8

                  @Mikeeeeee
                  You need to do just what @mrjj stated:

                  1. Open a console/terminal.
                  2. Type: export QT_DEBUG_PLUGINS=1
                  3. Type the path to the Qt Creator executable to run it.

                  Because it has been run from a shell with that environment variable exported, you will get debug output showing you where it's looking for what, to diagnose your problem.

                  1 Reply Last reply
                  2
                  • M Offline
                    M Offline
                    Mikeeeeee
                    wrote on 1 Jun 2020, 12:13 last edited by
                    #9

                    @JonB said in How start compiler in Ubuntu 20:

                    export QT_DEBUG_PLUGINS = 1

                    this

                    export QT_DEBUG_PLUGINS = 1
                    

                    return errors:

                    bash: export: «=»: this is an invalid identifier
                    bash: export: «1»: this is an invalid identifier
                    
                    
                    J 1 Reply Last reply 1 Jun 2020, 12:23
                    0
                    • M Mikeeeeee
                      1 Jun 2020, 12:13

                      @JonB said in How start compiler in Ubuntu 20:

                      export QT_DEBUG_PLUGINS = 1

                      this

                      export QT_DEBUG_PLUGINS = 1
                      

                      return errors:

                      bash: export: «=»: this is an invalid identifier
                      bash: export: «1»: this is an invalid identifier
                      
                      
                      J Offline
                      J Offline
                      JonB
                      wrote on 1 Jun 2020, 12:23 last edited by
                      #10

                      @Mikeeeeee said in How start compiler in Ubuntu 20:
                      I just copied what @mrjj typed. Correct is to remove the spaces:

                      export QT_DEBUG_PLUGINS=1
                      

                      If it had been me, I would have typed man bash and searched for export for myself:

                      export [-fn] [name[=word]] ...

                      1 Reply Last reply
                      3
                      • M Offline
                        M Offline
                        Mikeeeeee
                        wrote on 1 Jun 2020, 12:57 last edited by
                        #11

                        I write this in folder "Qt", but qt did not issue any new errors. Still, maybe this is because the installer might not have downloaded the files?

                        J 1 Reply Last reply 1 Jun 2020, 12:59
                        0
                        • M Mikeeeeee
                          1 Jun 2020, 12:57

                          I write this in folder "Qt", but qt did not issue any new errors. Still, maybe this is because the installer might not have downloaded the files?

                          J Offline
                          J Offline
                          JonB
                          wrote on 1 Jun 2020, 12:59 last edited by
                          #12

                          @Mikeeeeee
                          Prior to the qt.qpa.plugin: Could not load ... error message, because of the environment variable you should have output (in the terminal) on where it looked for plugin xcb but failed to find it.

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            Mikeeeeee
                            wrote on 1 Jun 2020, 13:17 last edited by Mikeeeeee 6 Jan 2020, 13:18
                            #13

                            It doesn't issue any more errors.
                            I have only this build log:

                            /home/admin1/Qt/5.15.0/gcc_64/bin/uic ../test/mainwindow.ui -o ui_mainwindow.h
                            g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o main.o ../test/main.cpp
                            g++ -pipe -g -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h ../../Qt/5.15.0/gcc_64/mkspecs/features/data/dummy.cpp
                            g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o mainwindow.o ../test/mainwindow.cpp
                            /home/admin1/Qt/5.15.0/gcc_64/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/admin1/QtProjects/build-test-Desktop_Qt_5_15_0_GCC_64bit-Debug/moc_predefs.h -I/home/admin1/Qt/5.15.0/gcc_64/mkspecs/linux-g++ -I/home/admin1/QtProjects/test -I/home/admin1/Qt/5.15.0/gcc_64/include -I/home/admin1/Qt/5.15.0/gcc_64/include/QtWidgets -I/home/admin1/Qt/5.15.0/gcc_64/include/QtGui -I/home/admin1/Qt/5.15.0/gcc_64/include/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../test/mainwindow.h -o moc_mainwindow.cpp
                            g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o moc_mainwindow.o moc_mainwindow.cpp
                            g++ -Wl,-rpath,/home/admin1/Qt/5.15.0/gcc_64/lib -o test main.o mainwindow.o moc_mainwindow.o   /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Widgets.so /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Gui.so /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Core.so -lGL -lpthread   
                            
                            J 1 Reply Last reply 1 Jun 2020, 13:38
                            0
                            • M Mikeeeeee
                              1 Jun 2020, 13:17

                              It doesn't issue any more errors.
                              I have only this build log:

                              /home/admin1/Qt/5.15.0/gcc_64/bin/uic ../test/mainwindow.ui -o ui_mainwindow.h
                              g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o main.o ../test/main.cpp
                              g++ -pipe -g -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h ../../Qt/5.15.0/gcc_64/mkspecs/features/data/dummy.cpp
                              g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o mainwindow.o ../test/mainwindow.cpp
                              /home/admin1/Qt/5.15.0/gcc_64/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/admin1/QtProjects/build-test-Desktop_Qt_5_15_0_GCC_64bit-Debug/moc_predefs.h -I/home/admin1/Qt/5.15.0/gcc_64/mkspecs/linux-g++ -I/home/admin1/QtProjects/test -I/home/admin1/Qt/5.15.0/gcc_64/include -I/home/admin1/Qt/5.15.0/gcc_64/include/QtWidgets -I/home/admin1/Qt/5.15.0/gcc_64/include/QtGui -I/home/admin1/Qt/5.15.0/gcc_64/include/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../test/mainwindow.h -o moc_mainwindow.cpp
                              g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../../Qt/5.15.0/gcc_64/include -I../../Qt/5.15.0/gcc_64/include/QtWidgets -I../../Qt/5.15.0/gcc_64/include/QtGui -I../../Qt/5.15.0/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I. -I../../Qt/5.15.0/gcc_64/mkspecs/linux-g++ -o moc_mainwindow.o moc_mainwindow.cpp
                              g++ -Wl,-rpath,/home/admin1/Qt/5.15.0/gcc_64/lib -o test main.o mainwindow.o moc_mainwindow.o   /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Widgets.so /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Gui.so /home/admin1/Qt/5.15.0/gcc_64/lib/libQt5Core.so -lGL -lpthread   
                              
                              J Offline
                              J Offline
                              JonB
                              wrote on 1 Jun 2020, 13:38 last edited by JonB 6 Jan 2020, 13:38
                              #14

                              @Mikeeeeee
                              I don't understand. Your output now shows a compilation. I thought your problem as reported by you was when you tried to start an application:

                              qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                              This application failed to start ....

                              I have not seen you reproduce that error message with the environment variable switched on.

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                Mikeeeeee
                                wrote on 1 Jun 2020, 15:51 last edited by
                                #15

                                This error persists. The error was always there and never changed.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 1 Jun 2020, 16:24 last edited by
                                  #16

                                  That's why we are asking you to start your application with the QT_DEBUG_PLUGINS environment variable set so that it provides more information at run time about what is happening to the xcb plugin.

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

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    Mikeeeeee
                                    wrote on 1 Jun 2020, 17:02 last edited by
                                    #17

                                    I started using QT_DEBUG_PLUGINS, but nothing has changed. QT_DEBUG_PLUGINS need to be registered in the "Qt" folder?

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 1 Jun 2020, 17:05 last edited by
                                      #18

                                      How are you using exactly ?

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

                                      1 Reply Last reply
                                      1
                                      • M Offline
                                        M Offline
                                        Mikeeeeee
                                        wrote on 1 Jun 2020, 17:22 last edited by
                                        #19

                                        I write in folder "Qt" in console

                                        export QT_DEBUG_PLUGINS=1
                                        
                                        
                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 1 Jun 2020, 19:14 last edited by
                                          #20

                                          The folder has no influence on that environment variable. And are you starting your application from the same terminal were you defined the variable ?

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

                                          1 Reply Last reply
                                          0

                                          3/33

                                          1 Jun 2020, 10:08

                                          topic:navigator.unread, 30
                                          • Login

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