Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved]Compile Qt with tslib

[Solved]Compile Qt with tslib

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 3 Posters 11.1k 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.
  • D Offline
    D Offline
    Dominik2000
    wrote on last edited by
    #1

    Hello I want to compile Qt 5.2 with tslib for raspberry pi.

    I get tslib from git and configured:
    sudo ./configure --host=arm-linux --prefix=/home/dominik/opt/tslib/build/ --enable-static --enable-shared

    then make && sudo make install
    All went ok.

    From many tutorials I know that I have to add the generated include and lib folder to qmake so I edit qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf and add:
    @QMAKE_INCDIR += /home/dominik/opt/tslib/build/include
    QMAKE_LIBDIR += /home/dominik/opt/tslib/build/lib@

    then I configure in qtbase:
    @./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -prefix /usr/local/qt5pi -tslib@

    I added tslib, so Qt knows to add tslib support. Sadly this gives this error message:
    @<srcbase> = /home/dominik/opt/qt5/qtbase
    <outbase> = /home/dominik/opt/qt5/qtbase
    Creating qmake...
    make: Nothing to be done for `first'.
    Running configuration tests...
    Note: PKG_CONFIG_LIBDIR automatically set to /mnt/rasp-pi-rootfs/usr/lib/pkgconfig:/mnt/rasp-pi-rootfs/usr/share/pkgconfig:/mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig
    Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/rasp-pi-rootfs
    The tslib functionality test failed!
    @

    Why can't I configure qt??? Do I need to do more things?
    The guide I used is: "http://qt-project.org/wiki/RaspberryPi_Beginners_guide"

    Please help!

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

      Hi and welcome to devnet,

      You should run configure with -verbose.

      This way you should see the exact error you are encountering

      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
      • D Offline
        D Offline
        Dominik2000
        wrote on last edited by
        #3

        This is the error in verbose mode:

        @/home/dominik/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -Wall -W -fPIE -I../../../mkspecs/devices/linux-rasp-pi-g++ -I. -o tslib.o tslib.cpp
        tslib.cpp:42:19: fatal error: tslib.h: No such file or directory
        compilation terminated.
        make: *** [tslib.o] Error 1
        tslib disabled.
        The tslib functionality test failed!
        @

        Ok he don't find the tslib.h, but it is in the folder which I give to qmake:
        @dominik@Linux-Dominik ~/opt/qt5/qtbase $ ls /home/dominik/opt/tslib/build/include
        tslib.h
        @

        I don't get it...

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

          Then you should rather add

          @-L /home/dominik/opt/tslib/build/lib -I /home/dominik/opt/tslib/build/include@

          To your configure command

          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
          • D Offline
            D Offline
            Dominik2000
            wrote on last edited by
            #5

            Hmm, okay, sorry I thought that it is enough when I write this to qmake.conf.

            Now this error occurs:
            @/home/dominik/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/mnt/rasp-pi-rootfs/opt/vc/lib -Wl,-rpath-link,/mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf --sysroot=/mnt/rasp-pi-rootfs -Wl,-O1 -o tslib tslib.o --sysroot=/mnt/rasp-pi-rootfs -L/home/dominik/opt/tslib/build/lib -lts
            /home/dominik/opt/tslib/build/lib/libts.so: file not recognized: File format not recognized
            collect2: error: ld returned 1 exit status
            make: *** [tslib] Error 1
            tslib disabled.
            The tslib functionality test failed!
            @

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

              Then tslib is probably not built for ARM

              call

              @file /home/dominik/opt/tslib/build/lib/libts.so @

              To see what kind of file it is

              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
              • D Offline
                D Offline
                Dominik2000
                wrote on last edited by
                #7

                It's a symbolic link to this file and the output is this:

                @dominik@Linux-Dominik ~/opt/qt5/qtbase $ file /home/dominik/opt/tslib/build/lib/libts-1.0.so.0.0.0
                /home/dominik/opt/tslib/build/lib/libts-1.0.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x775054f586db43f31d8b8dd1b7ae2738b20e8923, not stripped
                @

                I see that the architecture is wrong... I will try to rebuild this. At the configure command of tslib is there also a cross compile parameter? Or should the --host=arm-linux be enough?

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

                  You might also need to tell the configuration script that your are using arm-linux-gcc (adapt the name to your cross-compiler)

                  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
                  • D Offline
                    D Offline
                    Dominik2000
                    wrote on last edited by
                    #9

                    Ok thank you! Now it works! I have used this statement for compiling tslib:

                    @./configure CC=/home/dominik/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gcc CXX=/home/dominik/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -host=arm-none-linux-gnueabi target=arm-none-linux-gnueabi -enable-static=yes -enable-shared=yes -prefix=/home/dominik/opt/tslib/build/@

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

                      You're welcome !

                      Now that you have tslib working, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

                      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
                      • T Offline
                        T Offline
                        Tannyveer
                        wrote on last edited by
                        #11

                        Sir
                        please provided me a complete steps to compile tslib with Qt5 already Qt5 is running on my host and raspberry pi machine. now i want to compile tslib for my egalax touchscreen please post the steps to compile it.

                        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