Qt
  1. Qt
  2. QTBUG-50227

QtPositioning PositionSource unable to load due to missing symbols

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: P2: Important P2: Important
    • Resolution: Done
    • Affects Version/s: 5.5.0, 5.5.1
    • Fix Version/s: None
    • Component/s: Packaging & Installer
    • Labels:
      None

      Description

      I have issues running this code with Qt 5.5 (both old and completely fresh install). It works with Qt 5.4 installation (QtPositioning 5.4 used in that case)

      import QtPositioning 5.5
      import QtQuick 2.0
      
      Rectangle {
          id: root
      
          PositionSource {
              id: positionSource
          }
      }
      

      This is the error:

      09:52 PMoan@work7:~/temp$ qmlscene lala.qml
      file:///home/oan/temp/lala.qml:1 plugin cannot be loaded for module "QtPositioning": Cannot load library /opt/Qt/5.5/gcc_64/qml/QtPositioning/libdeclarative_positioning.so: (/opt/Qt/5.5/gcc_64/qml/QtPositioning/libdeclarative_positioning.so: undefined symbol: _Z25geoCoordinateInterpolatorRK14QGeoCoordinateS1_d)

      Some additional info:

      09:54 PMoan@work7:~/temp$ c++filt _Z25geoCoordinateInterpolatorRK14QGeoCoordinateS1_d
      geoCoordinateInterpolator(QGeoCoordinate const&, QGeoCoordinate const&, double)

      09:58 PMoan@work7:/opt/Qt/5.5/gcc_64$ readelf -Ws lib/libQt5Positioning.so.5.5.1 |grep _Z25geoCoordinateInterpolatorRK14QGeoCoordinateS1_d
      514: 000000000002e6b0 642 FUNC GLOBAL DEFAULT 11 _Z25geoCoordinateInterpolatorRK14QGeoCoordinateS1_d

      Edit:
      Additionally, this is on ubuntu 15.04.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        J-P Nurmi added a comment -

        Did you use the Qt installer or did you build Qt yourself? Could you double check that you are not mixing Qt versions somehow? The qtlocation auto tests (tests/auto/declarative_core/tst_positionsource.qml) are creating QML PositionSource instances, and they have passed the CI.

        Show
        J-P Nurmi added a comment - Did you use the Qt installer or did you build Qt yourself? Could you double check that you are not mixing Qt versions somehow? The qtlocation auto tests (tests/auto/declarative_core/tst_positionsource.qml) are creating QML PositionSource instances, and they have passed the CI.
        Hide
        Oscar Andreasson added a comment -

        The issues is with the Qt installer installation.

        I just finished building 5.5 from the source packages and used the qmlscene etc from that installation, it worked perfectly.

        Running the tst_positionsource.qml with the 5.5 installation from the qt installer gives the same error for me.

        Show
        Oscar Andreasson added a comment - The issues is with the Qt installer installation. I just finished building 5.5 from the source packages and used the qmlscene etc from that installation, it worked perfectly. Running the tst_positionsource.qml with the 5.5 installation from the qt installer gives the same error for me.
        Hide
        Alex Blasche added a comment -

        I can verify the issue. The rpath in ~/Qt5.5.1/5.5/gcc_64/qml/QtPositioning/libdeclarative_positioning.so is not correct:

         readelf -a ~/Qt5.5.1/5.5/gcc_64/qml/QtPositioning/libdeclarative_positioning.so  |grep RUNPATH
         0x000000000000001d (RUNPATH)            Library runpath: [/work/build/______________________________PADDING______________________________:/work/build/______________________________PADDING______________________________/lib]
        
        

        It is a packaging problem. When the plugin is loaded it cannot find libQtPositioning.so and hence we hit the symbol error.

        A workaround is to add a custom LD_LIBRARY_PATH which in the case above would be

        LD_LIBRARY_PATH=~/Qt5.5.1/5.5/gcc_64/lib:$LD_LIBRARY_PATH
        

        I can also state that the Qt 5.6 Beta package is not affected.

        Show
        Alex Blasche added a comment - I can verify the issue. The rpath in ~/Qt5.5.1/5.5/gcc_64/qml/QtPositioning/libdeclarative_positioning.so is not correct: readelf -a ~/Qt5.5.1/5.5/gcc_64/qml/QtPositioning/libdeclarative_positioning.so |grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [/work/build/______________________________PADDING______________________________:/work/build/______________________________PADDING______________________________/lib] It is a packaging problem. When the plugin is loaded it cannot find libQtPositioning.so and hence we hit the symbol error. A workaround is to add a custom LD_LIBRARY_PATH which in the case above would be LD_LIBRARY_PATH=~/Qt5.5.1/5.5/gcc_64/lib:$LD_LIBRARY_PATH I can also state that the Qt 5.6 Beta package is not affected.
        Hide
        Jani Heikkinen added a comment -

        Unfortunately this cannot be a blocker for Qt 5.6.0 RC->I removed 5.6.0 RC as a fix version(s)

        Show
        Jani Heikkinen added a comment - Unfortunately this cannot be a blocker for Qt 5.6.0 RC->I removed 5.6.0 RC as a fix version(s)
        Hide
        Jani Heikkinen added a comment -

        Should be OK in 5.6.0 (or even in 5.5.1)

        Show
        Jani Heikkinen added a comment - Should be OK in 5.6.0 (or even in 5.5.1)

          People

          • Assignee:
            Qt Release Team
            Reporter:
            Oscar Andreasson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes