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. Qt 5.7 Coss-Compile with Raspberry Pi 3
Forum Updated to NodeBB v4.3 + New Features

Qt 5.7 Coss-Compile with Raspberry Pi 3

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
25 Posts 4 Posters 9.3k 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.
  • p3c0P p3c0

    @ascnp Looks like tslib.h is missing in one of the included paths probably /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib

    A Offline
    A Offline
    ascnp
    wrote on last edited by
    #15

    @p3c0

    $ ls -R
    .:
    bin etc include lib

    ./bin:
    ts_calibrate ts_harvest ts_print ts_print_raw ts_test

    ./etc:
    ts.conf

    ./include:
    tslib.h

    ./lib:
    libts-0.0.so.0 libts-0.0.so.0.1.1 libts.la libts.so pkgconfig ts

    ./lib/pkgconfig:
    tslib-0.0.pc

    ./lib/ts:
    arctic2.la corgi.la h3600.la linear_h2200.la mk712.la ucb1x00.la
    arctic2.so corgi.so h3600.so linear_h2200.so mk712.so ucb1x00.so
    collie.la dejitter.la input.la linear.la pthres.la variance.la
    collie.so dejitter.so input.so linear.so pthres.so variance.so

    As is shown above, tslib.h is in /usr/local/tslib/include.

    And I find that I did not have gstreamer1.0-audio. And apt-get can't get gstreamer1.0-audio.

    jsulmJ 1 Reply Last reply
    0
    • A ascnp

      @p3c0

      $ ls -R
      .:
      bin etc include lib

      ./bin:
      ts_calibrate ts_harvest ts_print ts_print_raw ts_test

      ./etc:
      ts.conf

      ./include:
      tslib.h

      ./lib:
      libts-0.0.so.0 libts-0.0.so.0.1.1 libts.la libts.so pkgconfig ts

      ./lib/pkgconfig:
      tslib-0.0.pc

      ./lib/ts:
      arctic2.la corgi.la h3600.la linear_h2200.la mk712.la ucb1x00.la
      arctic2.so corgi.so h3600.so linear_h2200.so mk712.so ucb1x00.so
      collie.la dejitter.la input.la linear.la pthres.la variance.la
      collie.so dejitter.so input.so linear.so pthres.so variance.so

      As is shown above, tslib.h is in /usr/local/tslib/include.

      And I find that I did not have gstreamer1.0-audio. And apt-get can't get gstreamer1.0-audio.

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

      @ascnp It should be -I/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include
      And as this error tells:

      Project ERROR: gstreamer-audio-1.0 development package not found
      

      you need gstreamer-audio-1.0 development package

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

      A 1 Reply Last reply
      1
      • jsulmJ jsulm

        @ascnp It should be -I/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include
        And as this error tells:

        Project ERROR: gstreamer-audio-1.0 development package not found
        

        you need gstreamer-audio-1.0 development package

        A Offline
        A Offline
        ascnp
        wrote on last edited by
        #17

        @jsulm
        yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include. Because I run ls -R on raspberry, so it seems in the wrong path. But when I mount SD card on x86 system, it will be in the path as you say.

        I am trying to install gstreamer1.0-audio. But apt-get can't find it.

        kshegunovK jsulmJ p3c0P 3 Replies Last reply
        0
        • A ascnp

          @jsulm
          yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include. Because I run ls -R on raspberry, so it seems in the wrong path. But when I mount SD card on x86 system, it will be in the path as you say.

          I am trying to install gstreamer1.0-audio. But apt-get can't find it.

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by kshegunov
          #18

          @ascnp said in QT5.7 Coss-Compile with Raspberry Pi 3:

          yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include.

          How did it end up there? /usr/local/tslib isn't a standard search location for includes.
          Edit: Don't mind me, it doesn't really matter as it's passed as an additional include path.

          PS
          I don't know how correct you are by saying your distro is almost the same as jessie, as jessie doesn't provide libts at all. It appears to be deprecated or something.

          Read and abide by the Qt Code of Conduct

          A 1 Reply Last reply
          0
          • A ascnp

            @jsulm
            yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include. Because I run ls -R on raspberry, so it seems in the wrong path. But when I mount SD card on x86 system, it will be in the path as you say.

            I am trying to install gstreamer1.0-audio. But apt-get can't find it.

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

            @ascnp No, what I mean is: you need to pass -I/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include instead of -I/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib to configure. Or move the header file one directory up (to /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib).

            /home/lxy/Downloads/qt5.7安装/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=/opt/rasp-pi-rootfs-qt5.7 -O2 -Wall -W -fPIC -I. -I/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib -I../../../mkspecs/devices/linux-rasp-pi-g++ -o tslib.o tslib.cpp
            

            Regarding gsreamer-audio-1.0: I don't know what the correct name is. Just list all gstreamer packages and see whether you can find one with audio (maybe gsreamer-alsa-1.0?).

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

            1 Reply Last reply
            1
            • A ascnp

              @jsulm
              yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include. Because I run ls -R on raspberry, so it seems in the wrong path. But when I mount SD card on x86 system, it will be in the path as you say.

              I am trying to install gstreamer1.0-audio. But apt-get can't find it.

              p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #20

              @ascnp said in QT5.7 Coss-Compile with Raspberry Pi 3:

              @jsulm
              yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include. Because I run ls -R on raspberry, so it seems in the wrong path. But when I mount SD card on x86 system, it will be in the path as you say.

              I am trying to install gstreamer1.0-audio. But apt-get can't find it.

              Try installing libgstreamer-plugins-base1.0-dev

              157

              1 Reply Last reply
              0
              • kshegunovK kshegunov

                @ascnp said in QT5.7 Coss-Compile with Raspberry Pi 3:

                yes, it is in /opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include.

                How did it end up there? /usr/local/tslib isn't a standard search location for includes.
                Edit: Don't mind me, it doesn't really matter as it's passed as an additional include path.

                PS
                I don't know how correct you are by saying your distro is almost the same as jessie, as jessie doesn't provide libts at all. It appears to be deprecated or something.

                A Offline
                A Offline
                ascnp
                wrote on last edited by p3c0
                #21

                @kshegunov
                I also doubt that the path is not a standard search path, so that qt can not find them. I said "ubuntu mate is almost the same as jessie", which means they are both arm arch and have the same Instruction set, because they can both run on raspberry pi. So they have the same compile tools. I'm a newbie of linux system lol, so I don't know much more about the os. All I want is to finish build qt and start coding. I use qt 5.4.1before, and it is really hard to upgrade software like Qt's version in linux.

                @jsulm
                I did not find anything like gstreamer-audio. I am going to isntall all I can install about gstreamer1.0 without thinking lol..

                @p3c0
                After installing libgstreamer-plugins-base1.0-dev, it shows:
                checking for GStreamer 1.0...

                /home/lxy/Downloads/qt5.7安装/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=/opt/rasp-pi-rootfs-qt5.7 -O2 -pthread -pthread -pthread -pthread -pthread -Wall -W -fPIC  -I. -I/opt/rasp-pi-rootfs-qt5.7/usr/include/gstreamer-1.0 -I/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/include -I/opt/rasp-pi-rootfs-qt5.7/usr/include/glib-2.0 -I/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I../../../mkspecs/devices/linux-rasp-pi-g++ -o gstreamer.o gstreamer.cpp
                /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/opt/vc/lib -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-O1 -o gstreamer gstreamer.o   --sysroot=/opt/rasp-pi-rootfs-qt5.7 -L/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
                /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: /opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/libglib-2.0.a(libglib_2_0_la-gthread-posix.o): undefined reference to symbol 'pthread_getspecific@@GLIBC_2.4'
                /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: note: 'pthread_getspecific@@GLIBC_2.4' is defined in DSO /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpthread.so.0 so try adding it to the linker command line
                /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpthread.so.0: could not read symbols: Invalid operation
                collect2: error: ld returned 1 exit status
                Makefile:92: recipe for target 'gstreamer' failed
                make: *** [gstreamer] Error 1
                GStreamer 1.0 disabled.
                The GStreamer 1.0 functionality test failed!
                

                it seems that I need something else.

                jsulmJ 1 Reply Last reply
                0
                • A ascnp

                  @kshegunov
                  I also doubt that the path is not a standard search path, so that qt can not find them. I said "ubuntu mate is almost the same as jessie", which means they are both arm arch and have the same Instruction set, because they can both run on raspberry pi. So they have the same compile tools. I'm a newbie of linux system lol, so I don't know much more about the os. All I want is to finish build qt and start coding. I use qt 5.4.1before, and it is really hard to upgrade software like Qt's version in linux.

                  @jsulm
                  I did not find anything like gstreamer-audio. I am going to isntall all I can install about gstreamer1.0 without thinking lol..

                  @p3c0
                  After installing libgstreamer-plugins-base1.0-dev, it shows:
                  checking for GStreamer 1.0...

                  /home/lxy/Downloads/qt5.7安装/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=/opt/rasp-pi-rootfs-qt5.7 -O2 -pthread -pthread -pthread -pthread -pthread -Wall -W -fPIC  -I. -I/opt/rasp-pi-rootfs-qt5.7/usr/include/gstreamer-1.0 -I/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/include -I/opt/rasp-pi-rootfs-qt5.7/usr/include/glib-2.0 -I/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I../../../mkspecs/devices/linux-rasp-pi-g++ -o gstreamer.o gstreamer.cpp
                  /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/opt/vc/lib -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-O1 -o gstreamer gstreamer.o   --sysroot=/opt/rasp-pi-rootfs-qt5.7 -L/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
                  /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: /opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/libglib-2.0.a(libglib_2_0_la-gthread-posix.o): undefined reference to symbol 'pthread_getspecific@@GLIBC_2.4'
                  /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: note: 'pthread_getspecific@@GLIBC_2.4' is defined in DSO /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpthread.so.0 so try adding it to the linker command line
                  /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpthread.so.0: could not read symbols: Invalid operation
                  collect2: error: ld returned 1 exit status
                  Makefile:92: recipe for target 'gstreamer' failed
                  make: *** [gstreamer] Error 1
                  GStreamer 1.0 disabled.
                  The GStreamer 1.0 functionality test failed!
                  

                  it seems that I need something else.

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

                  @ascnp said in QT5.7 Coss-Compile with Raspberry Pi 3:

                  gnueabihf/bin/ld: note: 'pthread_getspecific@@GLIBC_2.4' is defined in DSO /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpthread.so.0 so try adding it to the linker command line

                  This tells you what you need to do: add /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf as directory for libraries (-L/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf). It's not related to gstreamer anymore.

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

                  A 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @ascnp said in QT5.7 Coss-Compile with Raspberry Pi 3:

                    gnueabihf/bin/ld: note: 'pthread_getspecific@@GLIBC_2.4' is defined in DSO /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpthread.so.0 so try adding it to the linker command line

                    This tells you what you need to do: add /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf as directory for libraries (-L/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf). It's not related to gstreamer anymore.

                    A Offline
                    A Offline
                    ascnp
                    wrote on last edited by
                    #23

                    @jsulm
                    I add -L/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf in configure code, but still the same error.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      ascnp
                      wrote on last edited by
                      #24

                      I google the error
                      "libpthread.so.0: could not read symbols: Invalid operation"
                      and find that it is caused by command linker command line. But I try adding the path to linker command line with -L and ldconfig, but didn't work. And another way to solve this is add -lpthread after ./configer. and it did work. But another error comes.

                      "/home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: /opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf/libglib-2.0.a(libglib_2_0_la-gregex.o): undefined reference to symbol 'pcre_study'
                      /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: note: 'pcre_study' is defined in DSO /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpcre.so.3 so try adding it to the linker command line
                      /opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/libpcre.so.3: could not read symbols: Invalid operation
                      collect2: error: ld returned 1 exit status
                      Makefile:92: recipe for target 'gstreamer' failed
                      make: *** [gstreamer] Error 1
                      GStreamer 1.0 disabled."

                      Linker command line again! And adding to linker command line with ldconfig and -L, but not work again. Now I really don't know how to solve the proble. Is my pkg-config or compile tools broken?

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        ascnp
                        wrote on last edited by
                        #25

                        I find another strange thing. Before checking gstreamer1.0, qt test system pcre, and the most strange thing is that it sucess!

                        checking for PCRE...
                        /home/lxy/Downloads/qt5.7安装/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=/opt/rasp-pi-rootfs-qt5.7 -O2 -Wall -W -fPIC -I. -I/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/include -I../../../mkspecs/devices/linux-rasp-pi-g++ -o pcre.o pcre.cpp
                        /home/lxy/Downloads/qt5.7安装/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/opt/vc/lib -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-O1 -o pcre pcre.o --sysroot=/opt/rasp-pi-rootfs-qt5.7 -L/opt/rasp-pi-rootfs-qt5.7/lib/arm-linux-gnueabihf/ -L/opt/rasp-pi-rootfs-qt5.7/usr/lib -L/opt/rasp-pi-rootfs-qt5.7/lib -L/opt/rasp-pi-rootfs-qt5.7/usr/local/tslib/ -lpthread -lpcre -lpcre16
                        PCRE enabled.

                        But when cheking gstreamer1.0, the libglib-2.0.a(libglib_2_0_la-gregex.o) has a referebce to pcre_study , and it tried to find libpcre.so.3, but says the lib is not in the linker command line. Why is it? Is that means when qt checking diffenrent part, it will set different linker command line, but not the all-use same lib?

                        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