QtSerialPort build problem (Linux, Debian, Qt4)



  • Hi There.

    I recently purged my machine and now I am trying to get QtSerialPort to work again with Qt4.

    I fetched Qtserialport from git:
    @git clone git://gitorious.org/qt/qtserialport.git@

    Moved it into a seperate src folder:
    @
    10034 ./opt % mv qtserialport qtserialport-src
    10035 ./opt % mkdir qtserialport-build
    10036 ./opt % cd qtserialport-build
    @
    And tried to build it. However it cannot find a file that should be included.
    @
    10037 qtserialport-build % qmake ../qtserialport-src
    debian ~/.opt/QtSerialPort/qtserialport-build
    10038 qtserialport-build % make
    .
    .
    .
    In file included from /home/f/.opt/QtSerialPort/qtserialport-src/src/serialport/qserialport_unix_p.h:46:0,
    from /home/f/.opt/QtSerialPort/qtserialport-src/src/serialport/qserialport.cpp:53:
    /home/f/.opt/QtSerialPort/qtserialport-src/src/serialport/qserialport_p.h:49:35: fatal error: private/qringbuffer_p.h: No such file or directory
    compilation terminated.
    make[2]: *** [qserialport.o] Error 1@

    From gitk i can see, that a version-check-macro was removed:

    @
    ------------------------ src/serialport/qserialport_p.h ------------------------
    index cb6a748..4140493 100644
    -46,11 +46,7

    #include "qserialport.h"

    -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
    #include <private/qringbuffer_p.h>
    -#else
    -#include "qt4support/qringbuffer_p.h"
    -#endif

    QT_BEGIN_NAMESPACE
    @

    And now I have no idea how to fix this.

    Should i just hardcode the correct include path? (Since the file is there....)
    Any ideas?


  • Moderators

    Try pinging QtSerialPort maintainers, they are usually quick to reply. Maybe this can be fixed upstream.

    You can modify the path yourself, of course. This is Free Software, after all :)



  • Hi.

    What version of Qt4 is used in Debian?

    BTW:

    A file "qringbuffer_p.h" contains in "src\serialport\qt4support\include\private" directory. So, at process of building for Qt4 this file always takes from this directory.

    The path to this directory is specified in the "install-helper.pri" file. Thus, it is possible that the QTSERIALPORT_PROJECT_QT4SUPPORT_INCLUDEDIR variable is empty in your case. Check it.



  • [quote author="sierdzio" date="1390999749"]Try pinging QtSerialPort maintainers, they are usually quick to reply. Maybe this can be fixed upstream.

    You can modify the path yourself, of course. This is Free Software, after all :)[/quote]

    I just did this :)

    In the current stable version of debian (as of today -- wheezy) it is 4.8.
    It seems like the variable is set but the path is never executed on my system, which means that the check :
    @45: lessThan(QT_MAJOR_VERSION, 5) {...@
    is failing on my system.

    But problem solved anyhow :)
    Thanks for your replies



  • Ok, But also you can build library through QtCreator, see "this":http://qt-project.org/wiki/QtSerialPort#e290b0f84383a96ecdf7f6b720b72092.

    Maybe a problem in ENV? Have you installed and Qt5 (i.e. have you both: Qt4 and Qt5 on your system)?



  • @fotte:

    As the author of those changes, I have just made some experiments to see this a bit closer. I have used the "stable" branch for it.

    Unfortunately, I cannot reproduce the issue on my Archlinux (updated this morning) with 4.8.5.

    I also tried my Debian Wheezy (7.0) with 4.8.2, but I have similar results. It works fine for me.

    I think you had some local troubles that you could probably share with us if you had fixed it? Others could learn out of it.



  • Hello,

    You need to install this:

    sudo apt-get install qtbase5-private-dev

    Best regards,
    K***l


Log in to reply
 

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