Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtSerialPort build problem (Linux, Debian, Qt4)
Forum Updated to NodeBB v4.3 + New Features

QtSerialPort build problem (Linux, Debian, Qt4)

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 6 Posters 9.4k 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.
  • F Offline
    F Offline
    fotte
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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 :)

      (Z(:^

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kuzulis
        Qt Champions 2020
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        1
        • F Offline
          F Offline
          fotte
          wrote on last edited by
          #4

          [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

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kuzulis
            Qt Champions 2020
            wrote on last edited by
            #5

            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)?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              djszapi
              wrote on last edited by
              #6

              @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.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JohnLegenAllOfMe
                wrote on last edited by
                #7

                Hello,

                You need to install this:

                sudo apt-get install qtbase5-private-dev

                Best regards,
                K***l

                M 1 Reply Last reply
                0
                • J JohnLegenAllOfMe

                  Hello,

                  You need to install this:

                  sudo apt-get install qtbase5-private-dev

                  Best regards,
                  K***l

                  M Offline
                  M Offline
                  Mostafa Asaad
                  wrote on last edited by
                  #8

                  @JohnLegenAllOfMe This is still working for me in 2020, Qt5 tho

                  1 Reply Last reply
                  0

                  • Login

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