Can't configure Qt5.6 with cups on beaglenobe black debian jessie



  • Hi,
    When I want to compile Qt with cups, I get the following errors:

    #Note: I mounted the rootfs with sshfs and passed it to -sysroot option in ./configure.

    Cups auto-detection... ()
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -mfloat-abi=hard --sysroot=/mnt/bbb -O2 -O3 -std=gnu++0x -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-beagleboard-g++ -o cups.o cups.cpp
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/mnt/bbb -Wl,-O1 -o cups cups.o -lrt -lpthread -ldl --sysroot=/mnt/bbb -lcups
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libgssapi_krb5.so.2, needed by /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so, not found (try using -rpath or -rpath-link)
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libgnutls-deb0.so.28, needed by /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so, not found (try using -rpath or -rpath-link)
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libavahi-common.so.3, needed by /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so, not found (try using -rpath or -rpath-link)
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libavahi-client.so.3, needed by /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so, not found (try using -rpath or -rpath-link)
    /home/milad/Desktop/embedded-dev/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so, not found (try using -rpath or -rpath-link)
    /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so: undefined reference to avahi_simple_poll_set_func' /mnt/bbb/usr/lib/arm-linux-gnueabihf/libcups.so: undefined reference tognutls_record_send@GNUTLS_DEBIAN_0_1_4'
    .
    .
    .
    collect2: error: ld returned 1 exit status
    make: *** [cups] Error 1
    Cups disabled.

    It's complaining about existing some libraries dependencies but i have all of them that location with proper symlinks. seems strange. Any solution to debug this problem?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Might be a silly question but: did you install the corresponding dev packages on your BBB debian ?



  • @SGaist
    Yes , their all installed by libcups2-dev packege , and for files that caused error:

    libgssapi_krb5.so.2
    libgnutls-deb0.so.28
    libavahi-common.so.3
    libavahi-client.so.3
    libz.so.1

    i have them all exactly in /usr/lib/arm-linux-gnueabihf/ of my bbb.
    i can admit that i didn't have this problem in debian wheezy (7.x) with same version of Qt 5.6.0 .


  • Lifetime Qt Champion

    Silly test: try to run configure with your options and add -L /mnt/bbb/usr/lib/arm-linux-gnueabihf/ (with the space)



  • I solved the issue by passing -rpath-link as following paths to linker.

    • /mnt/bbb/usr/lib/arm-linux-gnueabihf/
      /mnt/bbb/lib/arm-linux-gnueabihf/

    After some investigations i noticed qt already had this option, so i added this line:
    DISTRO_OPTS += deb-multi-arch
    to my qtbase/mkspecs/devices/linux-beagleboard-g++/qmake.conf

    I think qt's documentation for embedded devices is not complete enough.

    BTW: thanks for your help SGaist.


  • Lifetime Qt Champion

    Glad you found out and thanks for sharing !

    Are you trying to build the latest version of Qt ?

    In any case, since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.