Native QT compilation on Raspberry Pi 2



  • I'm using the following guide to install QT on the raspberry Pi 2:

    https://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi

    I have successfully run the configure and make commands with no errors. I am now trying to run make install but this fails giving the following error:

    /usr/bin/ld.gold: error: cannot find -lpoly2tri
    collect2: error: ld returned 1 exit status
    Makefile:272: recipe for target '../../../qml/QtLocation/libdeclarative_location.so' failed
    make[4]: *** [../../../qml/QtLocation/libdeclarative_location.so] Error 1
    make[4]: Leaving directory '/home/pi/opt/qt5/qtlocation/src/imports/location'
    Makefile:80: recipe for target 'sub-location-install_subtargets' failed
    make[3]: *** [sub-location-install_subtargets] Error 2
    make[3]: Leaving directory '/home/pi/opt/qt5/qtlocation/src/imports'
    Makefile:135: recipe for target 'sub-imports-install_subtargets' failed
    make[2]: *** [sub-imports-install_subtargets] Error 2
    make[2]: Leaving directory '/home/pi/opt/qt5/qtlocation/src'
    Makefile:56: recipe for target 'sub-src-install_subtargets' failed
    make[1]: *** [sub-src-install_subtargets] Error 2
    make[1]: Leaving directory '/home/pi/opt/qt5/qtlocation'
    Makefile:549: recipe for target 'module-qtlocation-install_subtargets' failed
    make: *** [module-qtlocation-install_subtargets] Error 2

    Any suggestions/advice on how to proceed is appreciated, thanks!



  • It seems a new dependency has been added called poly2tri (library)
    https://code.google.com/p/poly2tri/ (check if your distribution provides poly2tri and install the development files)

    Compile/install the library should do the trick, hopefully.



  • I wasn't able to find development files for the raspbian distribution that I am using for poly2tri.

    I notice in the lib folder that the code should be searching in that there is a relevant poly2tri library file:
    /home/pi/opt/qt5/qtlocation/lib/libpoly2tri.prl

    Is there some way of making the code see this library?
    I notice that this similar issue has been seen in the past:

    https://bugreports.qt.io/browse/QTBUG-43006

    Is there some other way of solving this?


  • Moderators

    In the bug ticket: "Fix Version/s: 5.4.1"
    Which Qt version are you trying to install?



  • I'm trying to install QT 5.6.0.



  • Were you able to solve this issue? I ran into the same problem on a Virtual Machine with Ubuntu Server 14.04



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