Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to build Qt on system without a GUI?
Forum Updated to NodeBB v4.3 + New Features

How to build Qt on system without a GUI?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
92 Posts 7 Posters 29.4k Views 2 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.
  • Pavel_47P Pavel_47

    I did as you suggested:
    (1) resync host wit RPi:
    rsync -avz pi@raspberrypi.local:/lib sysroot
    rsync -avz pi@raspberrypi.local:/usr/include sysroot/usr
    rsync -avz pi@raspberrypi.local:/usr/lib sysroot/usr
    rsync -avz pi@raspberrypi.local:/opt/vc sysroot/opt

    (2) update symbolic names:
    ./sysroot-relativelinks.py sysroot
    Then rebuild Qt (rather tried to rebuild).
    Here is what I got:
    alt text

    This time it's different ... but still fails

    Pablo J. RoginaP Offline
    Pablo J. RoginaP Offline
    Pablo J. Rogina
    wrote on last edited by
    #48

    @Pavel_47 two things please:

    1. Your last screenshot doesn't seem to show exact error, I guess you should scroll up
    2. stop posting screenshots, paste text instead (it's easier for others to comment back on any line of output for instance...)

    Upvote the answer(s) that helped you solve the issue
    Use "Topic Tools" button to mark your post as Solved
    Add screenshots via postimage.org
    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

    1 Reply Last reply
    1
    • Pavel_47P Offline
      Pavel_47P Offline
      Pavel_47
      wrote on last edited by
      #49

      The log is huge.
      I scrolled up a few hundred lines - nothing that indicatedŝ errors.
      Concerning text instead of screenshots - Ok, I took note.

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

        Run the build with only one process you'll have the error closer.

        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
        • Pavel_47P Offline
          Pavel_47P Offline
          Pavel_47
          wrote on last edited by
          #51

          Yes, with one core the the log is more verbose.
          Here is what I got at the end:

          rm -f libcomposeplatforminputcontextplugin.so
          /home/pavel/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/pavel/raspi/sysroot -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../../lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/pavel/raspi/sysroot/lib/arm-linux-gnueabihf -shared -o libcomposeplatforminputcontextplugin.so .obj/qcomposeplatforminputcontextmain.o .obj/qcomposeplatforminputcontext.o .obj/moc_qcomposeplatforminputcontext.o  -L=/opt/vc/lib /home/pavel/raspi/qtbase/lib/libQt5Gui.so /home/pavel/raspi/qtbase/lib/libQt5Core.so /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so -lpthread /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so   
          .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::~QComposeInputContext()':
          qcomposeplatforminputcontext.cpp:(.text+0x34): undefined reference to `xkb_compose_state_unref'
          qcomposeplatforminputcontext.cpp:(.text+0x3c): undefined reference to `xkb_compose_table_unref'
          .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::reset()':
          qcomposeplatforminputcontext.cpp:(.text+0x80): undefined reference to `xkb_compose_state_reset'
          .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::ensureInitialized()':
          qcomposeplatforminputcontext.cpp:(.text+0x3bc): undefined reference to `xkb_compose_table_new_from_locale'
          qcomposeplatforminputcontext.cpp:(.text+0x3d0): undefined reference to `xkb_compose_state_new'
          .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::filterEvent(QEvent const*)':
          qcomposeplatforminputcontext.cpp:(.text+0x6ac): undefined reference to `xkb_compose_state_feed'
          qcomposeplatforminputcontext.cpp:(.text+0x6b4): undefined reference to `xkb_compose_state_get_status'
          qcomposeplatforminputcontext.cpp:(.text+0x6f8): undefined reference to `xkb_compose_state_get_utf8'
          qcomposeplatforminputcontext.cpp:(.text+0x72c): undefined reference to `xkb_compose_state_get_utf8'
          collect2: error: ld returned 1 exit status
          Makefile:247: recipe for target '../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so' failed
          make[4]: *** [../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so] Error 1
          make[4]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts/compose'
          Makefile:47: recipe for target 'sub-compose-make_first' failed
          make[3]: *** [sub-compose-make_first] Error 2
          make[3]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts'
          Makefile:129: recipe for target 'sub-platforminputcontexts-make_first' failed
          make[2]: *** [sub-platforminputcontexts-make_first] Error 2
          make[2]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins'
          Makefile:778: recipe for target 'sub-plugins-make_first' failed
          make[1]: *** [sub-plugins-make_first] Error 2
          make[1]: Leaving directory '/home/pavel/raspi/qtbase/src'
          Makefile:50: recipe for target 'sub-src-make_first' failed
          make: *** [sub-src-make_first] Error 2
          
          

          Seem that problem is still related to xkb staff ...

          jsulmJ 1 Reply Last reply
          0
          • Pavel_47P Pavel_47

            Yes, with one core the the log is more verbose.
            Here is what I got at the end:

            rm -f libcomposeplatforminputcontextplugin.so
            /home/pavel/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/pavel/raspi/sysroot -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../../lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/pavel/raspi/sysroot/lib/arm-linux-gnueabihf -shared -o libcomposeplatforminputcontextplugin.so .obj/qcomposeplatforminputcontextmain.o .obj/qcomposeplatforminputcontext.o .obj/moc_qcomposeplatforminputcontext.o  -L=/opt/vc/lib /home/pavel/raspi/qtbase/lib/libQt5Gui.so /home/pavel/raspi/qtbase/lib/libQt5Core.so /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so -lpthread /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so   
            .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::~QComposeInputContext()':
            qcomposeplatforminputcontext.cpp:(.text+0x34): undefined reference to `xkb_compose_state_unref'
            qcomposeplatforminputcontext.cpp:(.text+0x3c): undefined reference to `xkb_compose_table_unref'
            .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::reset()':
            qcomposeplatforminputcontext.cpp:(.text+0x80): undefined reference to `xkb_compose_state_reset'
            .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::ensureInitialized()':
            qcomposeplatforminputcontext.cpp:(.text+0x3bc): undefined reference to `xkb_compose_table_new_from_locale'
            qcomposeplatforminputcontext.cpp:(.text+0x3d0): undefined reference to `xkb_compose_state_new'
            .obj/qcomposeplatforminputcontext.o: In function `QComposeInputContext::filterEvent(QEvent const*)':
            qcomposeplatforminputcontext.cpp:(.text+0x6ac): undefined reference to `xkb_compose_state_feed'
            qcomposeplatforminputcontext.cpp:(.text+0x6b4): undefined reference to `xkb_compose_state_get_status'
            qcomposeplatforminputcontext.cpp:(.text+0x6f8): undefined reference to `xkb_compose_state_get_utf8'
            qcomposeplatforminputcontext.cpp:(.text+0x72c): undefined reference to `xkb_compose_state_get_utf8'
            collect2: error: ld returned 1 exit status
            Makefile:247: recipe for target '../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so' failed
            make[4]: *** [../../../../plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so] Error 1
            make[4]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts/compose'
            Makefile:47: recipe for target 'sub-compose-make_first' failed
            make[3]: *** [sub-compose-make_first] Error 2
            make[3]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins/platforminputcontexts'
            Makefile:129: recipe for target 'sub-platforminputcontexts-make_first' failed
            make[2]: *** [sub-platforminputcontexts-make_first] Error 2
            make[2]: Leaving directory '/home/pavel/raspi/qtbase/src/plugins'
            Makefile:778: recipe for target 'sub-plugins-make_first' failed
            make[1]: *** [sub-plugins-make_first] Error 2
            make[1]: Leaving directory '/home/pavel/raspi/qtbase/src'
            Makefile:50: recipe for target 'sub-src-make_first' failed
            make: *** [sub-src-make_first] Error 2
            
            

            Seem that problem is still related to xkb staff ...

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

            @Pavel_47 said in How to build Qt on system without a GUI?:

            undefined reference to `xkb_compose_state_get_utf8'

            You're not linking against xkb lib

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

            1 Reply Last reply
            0
            • Pavel_47P Offline
              Pavel_47P Offline
              Pavel_47
              wrote on last edited by
              #53

              So, problems in Makefile ?

              jsulmJ 1 Reply Last reply
              0
              • Pavel_47P Pavel_47

                So, problems in Makefile ?

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

                @Pavel_47 Try

                file /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so
                

                and post the output here.

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

                1 Reply Last reply
                0
                • Pavel_47P Offline
                  Pavel_47P Offline
                  Pavel_47
                  wrote on last edited by
                  #55

                  here it is:

                  pavel@ALABAMA:~/raspi/qtbase$ file ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so
                  /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so: symbolic link to libxkbcommon.so.0.0.0
                  
                  jsulmJ 1 Reply Last reply
                  0
                  • Pavel_47P Pavel_47

                    here it is:

                    pavel@ALABAMA:~/raspi/qtbase$ file ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so
                    /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so: symbolic link to libxkbcommon.so.0.0.0
                    
                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #56

                    @Pavel_47 Then please do

                    file /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0
                    

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

                    1 Reply Last reply
                    0
                    • Pavel_47P Offline
                      Pavel_47P Offline
                      Pavel_47
                      wrote on last edited by
                      #57
                      pavel@ALABAMA:~/raspi/qtbase$ file ~/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0
                      /home/pavel/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0: cannot open `/home/pavel/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0' (No such file or directory)
                      
                      Pablo J. RoginaP 1 Reply Last reply
                      0
                      • Pavel_47P Pavel_47

                        I've just checked libxkbcommon-dev and libxkbcommon-x11-dev on RPi. As on Ubuntu they are installed and are newest versions.

                        Pablo J. RoginaP Offline
                        Pablo J. RoginaP Offline
                        Pablo J. Rogina
                        wrote on last edited by
                        #58

                        @Pavel_47 said in How to build Qt on system without a GUI?:

                        I've just checked libxkbcommon-dev and libxkbcommon-x11-dev on RPi.

                        So sync them to your sysroot in the host PC!

                        As on Ubuntu they are installed and are newest versions.

                        Forget about that, it doesn't matter.

                        For cross-compilation you need your libraries + headers installed properly in target device (RPi), then copy (synchronize) some folders from your target device into the sysroot folder in your host PC (with Ubuntu) and only then attempt to build (Qt framework, modules, your application).

                        Please take a look at this guide for cross-compiling Qt for RPi

                        Upvote the answer(s) that helped you solve the issue
                        Use "Topic Tools" button to mark your post as Solved
                        Add screenshots via postimage.org
                        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                        Pavel_47P 1 Reply Last reply
                        1
                        • Pablo J. RoginaP Pablo J. Rogina

                          @Pavel_47 said in How to build Qt on system without a GUI?:

                          I've just checked libxkbcommon-dev and libxkbcommon-x11-dev on RPi.

                          So sync them to your sysroot in the host PC!

                          As on Ubuntu they are installed and are newest versions.

                          Forget about that, it doesn't matter.

                          For cross-compilation you need your libraries + headers installed properly in target device (RPi), then copy (synchronize) some folders from your target device into the sysroot folder in your host PC (with Ubuntu) and only then attempt to build (Qt framework, modules, your application).

                          Please take a look at this guide for cross-compiling Qt for RPi

                          Pavel_47P Offline
                          Pavel_47P Offline
                          Pavel_47
                          wrote on last edited by
                          #59

                          @Pablo-J-Rogina said in How to build Qt on system without a GUI?:

                          Please take a look at this guide for cross-compiling Qt for RPi

                          I proceeded exactly as described on the page you mentioned.
                          Sure I performed the resync with RPi

                          1 Reply Last reply
                          0
                          • Pavel_47P Pavel_47
                            pavel@ALABAMA:~/raspi/qtbase$ file ~/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0
                            /home/pavel/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0: cannot open `/home/pavel/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0' (No such file or directory)
                            
                            Pablo J. RoginaP Offline
                            Pablo J. RoginaP Offline
                            Pablo J. Rogina
                            wrote on last edited by
                            #60

                            @Pavel_47 said in How to build Qt on system without a GUI?:

                            Sure I performed the resync with RPi

                            I'm not going to argue in contrary, so your next task is to figure out why even having rsync'd the file is missing from your sysroot folder...

                            /home/pavel/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0: cannot open

                            Upvote the answer(s) that helped you solve the issue
                            Use "Topic Tools" button to mark your post as Solved
                            Add screenshots via postimage.org
                            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                            1 Reply Last reply
                            0
                            • Pavel_47P Offline
                              Pavel_47P Offline
                              Pavel_47
                              wrote on last edited by
                              #61

                              The file isn't missing. It's there:
                              alt text

                              Pablo J. RoginaP 1 Reply Last reply
                              0
                              • Pavel_47P Pavel_47

                                The file isn't missing. It's there:
                                alt text

                                Pablo J. RoginaP Offline
                                Pablo J. RoginaP Offline
                                Pablo J. Rogina
                                wrote on last edited by
                                #62

                                @Pavel_47

                                The file isn't missing. It's there:

                                Well, it's somewhere else but not in the expected location it seems...

                                /home/pavel/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0

                                is different from the location in your last post (again, please stop posting screenshots!)

                                /home/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0

                                Upvote the answer(s) that helped you solve the issue
                                Use "Topic Tools" button to mark your post as Solved
                                Add screenshots via postimage.org
                                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                1 Reply Last reply
                                0
                                • Pavel_47P Offline
                                  Pavel_47P Offline
                                  Pavel_47
                                  wrote on last edited by
                                  #63

                                  Sorry, I've been mistaken while executing:
                                  file /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0

                                  the correct result is here:

                                  pavel@ALABAMA:~/raspi/qtbase$ file ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0
                                  /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0.0.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=ca40d4cec17c0cb8d6a85dcefc44fc89ac706d41, stripped
                                  
                                  
                                  1 Reply Last reply
                                  0
                                  • Pavel_47P Offline
                                    Pavel_47P Offline
                                    Pavel_47
                                    wrote on last edited by
                                    #64

                                    I contacted Ran Benita, the developer of xkbcommon package, and exposed him the problem. After some checks on my system, here is his conclusion:

                                    "The version of libxkbcommon you have in your arm-linux-gnueabihf raspi/sysroot is very very old. Qt requires a newer version. You should update your cross-compilation environment to something more recent."

                                    Where /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so comes from ?

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • Pavel_47P Pavel_47

                                      I contacted Ran Benita, the developer of xkbcommon package, and exposed him the problem. After some checks on my system, here is his conclusion:

                                      "The version of libxkbcommon you have in your arm-linux-gnueabihf raspi/sysroot is very very old. Qt requires a newer version. You should update your cross-compilation environment to something more recent."

                                      Where /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so comes from ?

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

                                      @Pavel_47 said in How to build Qt on system without a GUI?:

                                      Where /home/pavel/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libxkbcommon.so comes from ?

                                      From your Raspberry Pi when you're syncing it...
                                      What exact OS (including version) do you run on it?

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

                                      1 Reply Last reply
                                      0
                                      • Pavel_47P Offline
                                        Pavel_47P Offline
                                        Pavel_47
                                        wrote on last edited by
                                        #66

                                        uname -a
                                        Linux raspberry 4.9.77-v7+

                                        cat /etc/os-release
                                        Raspian GNU/Linux 8 (jessie)

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • Pavel_47P Pavel_47

                                          uname -a
                                          Linux raspberry 4.9.77-v7+

                                          cat /etc/os-release
                                          Raspian GNU/Linux 8 (jessie)

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

                                          @Pavel_47 You can try to upgrade to current Raspbian version and then recreate your sysroot.

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

                                          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