Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64406

Compilation error at Debian 6 (missed declaration of CANFD_BRS)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.4
    • 5.9.2
    • SerialBus: CAN Bus
    • Debian 6 wheezy x64
    • eec4d3034e4f1371fe60728e3f84bcb8ddd32c93

    Description

      I've got a following error while compilation:

      g++ -c -pipe -O2 -std=c+11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SERIALBUS_LIB -DQT_CORE_LIB -I. -I../../../../include -I../../../../include/QtSerialBus -I/build/packet/linux-64/qt-5.9.2/build/qt-everywhere-opensource-src-5.9.2/qtbase/include -I/build/packet/linux-64/qt-5.9.2/build/qt-everywhere-opensource-src-5.9.2/qtbase/include/QtCore -I.moc -I/build/packet/linux-64/qt-5.9.2/build/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g+ -o .obj/socketcanbackend.o socketcanbackend.cpp}}
      socketcanbackend.cpp: In member function 'virtual bool SocketCanBackend::writeFrame(const QCanBusFrame&)':
      socketcanbackend.cpp:448:52: error: 'CANFD_BRS' was not declared in this scope
      socketcanbackend.cpp:449:59: error: 'CANFD_ESI' was not declared in this scope
      socketcanbackend.cpp: In member function 'void SocketCanBackend::readSocket()':
      socketcanbackend.cpp:678:27: error: 'CANFD_BRS' was not declared in this scope
      socketcanbackend.cpp:680:27: error: 'CANFD_ESI' was not declared in this scope


      Also i've got notification from ./configure:

      Note: QtSerialBus: Newer kernel needed for flexible data-rate frame support (canfd_frame).


      I've fixed it locally by adding two following lines into file qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.cpp after line 73:

      #define CANFD_BRS 0x01
      #define CANFD_ESI 0x02

      Seems this bug was introduced while fixing this issue: QTBUG-56720

      Attachments

        1. can.zip
          8 kB
          blackwarthog
        2. raw.h
          0.7 kB
          blackwarthog

        Activity

          People

            aha_1980 André Hartmann
            blackwarthog blackwarthog
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: