Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtSerialPort not building for qt 4.8.5 (Beaglebone Black)
Forum Updated to NodeBB v4.3 + New Features

QtSerialPort not building for qt 4.8.5 (Beaglebone Black)

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 4 Posters 2.8k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    cturner
    wrote on 4 Sept 2014, 22:33 last edited by
    #1

    Hi All,

    I am trying to get QtSerialPort to build for the Beaglebone Black. I have Qt 4.8.5 built and have the cross-compiler setup with Qt Creator. I can build, deploy and debug a helloworld app from QtCreator.

    My issue now is that I want to use QtSerialPort in this application. I have followed the steps listed in https://qt-project.org/wiki/QtSerialPort to build within QtCreator, and I get a linking error:

    /home/user/qtprojects/qtserialport/build-qtserialport-BeagleboneBlack-Debug/src/serialport/libQtSerialPort.so: undefined reference to `QSerialPort::dataErrorPolicyChanged(QSerialPort::DataErrorPolicy)'

    A quick find in files shows that dataErrorPolicyChanged is wrapped in a #if QT_DEPRECATED_SINCE(5,2) in the header file. Further searching showed that QT_DEPRECATED_SINCE returns a 1 if the version of Qt is 4.x.

    In qserialport.cpp void QSerialPort::dataErrorPolicyChanged(DataErrorPolicy policy) has been labelled as obsolete, commented out and the body of the function has been deleted.

    So I know what's happening, I'm just not sure how to fix it. Is anyone else using the latest version of the qtserialport source on qt 4.8? Is there any easy workaround for this.

    Thanks!
    ct

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mwoehlke-kitware
      wrote on 8 Sept 2014, 16:41 last edited by
      #2

      FWIW I have the exact same issue on Fedora 20. At a guess, I think moc in Qt 4.8.x doesn't understand the #if and so ignores the code inside of such.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mwoehlke-kitware
        wrote on 8 Sept 2014, 17:00 last edited by
        #3

        Reported as https://bugreports.qt-project.org/browse/QTBUG-41190

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 11 Sept 2014, 23:12 last edited by
          #4

          Hi and welcome to devnet,

          A fix is on its way, to build it now, remove the deprecation guards around the signal

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Corpee
            wrote on 12 Sept 2014, 01:01 last edited by
            #5

            I have the same problem with 4.8.2, I'm building on raspberry pi and windows.
            I removed the depreciation guards around the QSerialPort::dataErrorPolicyChanged(DataErrorPolicy policy). I get a new build error in function tst_QSerialPort::twoStageSynchronousLoopback() with indefined reference to bool Qtest::qCompare<int, long>(int const&, long long const&, char const*, char const*, char const*, int)

            File not found:tst_qserialport.cpp

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 12 Sept 2014, 07:32 last edited by
              #6

              Hi and welcome to devnet,

              A fix is also on its way for that one

              For the moment, if you don't care about the test itself you can simply comment the code from the offending function.

              Otherwise
              replace each

              @QCOMPARE(newlineArray.size(), receiverPort.bytesAvailable());@

              with

              @QCOMPARE(qint64(newlineArray.size()), receiverPort.bytesAvailable());@

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 12 Sept 2014, 19:48 last edited by
                #7

                Building from the GIT repository 5.3 branch is now working for Qt 4

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0

                7/7

                12 Sept 2014, 19:48

                • Login

                • Login or register to search.
                7 out of 7
                • First post
                  7/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved