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. pthread configure error
Qt 6.11 is out! See what's new in the release blog

pthread configure error

Scheduled Pinned Locked Moved Solved Installation and Deployment
pthreadqt5.6rpipulseaudiodbus
2 Posts 1 Posters 2.6k 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.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by Mark81
    #1

    I'm trying to cross-compile Qt5.6 for RPi3 with Linaro toolchain.
    This is my configure command:

    
    ./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-exports -release -openssl -make libs -alsa -gui -widgets -no-eglfs -no-compile-examples -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
    

    Several modules won't pass the configure stage (DBus and Pulseaudio) due to errors like this:

    
    PulseAudio auto-detection... ()
    /home/tech/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 -D_REENTRANT -O2 -std=gnu++0x -Wall -W -fPIC  -I. -isystem /mnt/rasp-pi-rootfs/usr/include/glib-2.0 -I/mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I../../../mkspecs/devices/linux-rasp-pi-g++ -o pulseaudio.o pulseaudio.cpp
    /home/tech/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 -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -Wl,-O1 -o pulseaudio pulseaudio.o   --sysroot=/mnt/rasp-pi-rootfs -L/mnt/rasp-pi-rootfs/usr/lib/arm-linux-gnueabihf -lpulse-mainloop-glib -lpulse -lglib-2.0 
    /home/tech/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: /mnt/rasp-pi-rootfs/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/tech/opt/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 /mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf/libpthread.so.0 so try adding it to the linker command line
    /mnt/rasp-pi-rootfs/lib/arm-linux-gnueabihf/libpthread.so.0: could not read symbols: Invalid operation
    collect2: error: ld returned 1 exit status
    Makefile:181: set di istruzioni per l'obiettivo "pulseaudio" non riuscito
    make: *** [pulseaudio] Errore 1
    PulseAudio disabled.
    

    Of course the libpthread.so.0 is there, but the linker fails.
    Why? And how to fix?

    EDIT
    I mean: the error message says "how to fix"... "try to add it [-lpthread] to the linker command line." But WHY I need to change the linker command line of the Qt sources?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mark81
      wrote on last edited by
      #2

      I confirm that adding the pthread library did the trick. But the question "why" is still there :)

      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