Important: Please read the Qt Code of Conduct -

Native QT compilation on Raspberry Pi 2

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

    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/ error: cannot find -lpoly2tri
    collect2: error: ld returned 1 exit status
    Makefile:272: recipe for target '../../../qml/QtLocation/' failed
    make[4]: *** [../../../qml/QtLocation/] 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) (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:

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

    Is there some other way of solving this?

  • Lifetime Qt Champion

    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