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. QSerialPort Library for Qt creator 4.8 on Debian 9

QSerialPort Library for Qt creator 4.8 on Debian 9

Scheduled Pinned Locked Moved Solved Installation and Deployment
21 Posts 5 Posters 5.1k Views
  • 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.
  • K Offline
    K Offline
    kuzulis
    Qt Champions 2020
    wrote on 27 Sept 2018, 10:29 last edited by kuzulis
    #3

    If you need to use QtSerialPort with Qt 4.8.x then you should to build it himself, e.g. using this manual. Or just try to install it from repos of your Linux distro.

    D 1 Reply Last reply 28 Sept 2018, 05:05
    1
    • S SGaist
      26 Sept 2018, 11:55

      Hi,

      Qt Creator 4.8 has not yet been released so you are likely talking about Qt 4.8. You'll have to build the QtSerialPort module by hand yourself.

      Before going further, why use Qt 4.8 on Linux since you are using 5.8 on Windows ?

      D Offline
      D Offline
      Digvijay
      wrote on 28 Sept 2018, 04:48 last edited by
      #4

      @SGaist I also do not want to use Qt 4.8. But my linux is 32 bit so i can not install Qt 5.8 which requires 64 bit linux.

      S 1 Reply Last reply 28 Sept 2018, 06:59
      0
      • K kuzulis
        27 Sept 2018, 10:29

        If you need to use QtSerialPort with Qt 4.8.x then you should to build it himself, e.g. using this manual. Or just try to install it from repos of your Linux distro.

        D Offline
        D Offline
        Digvijay
        wrote on 28 Sept 2018, 05:05 last edited by
        #5

        @kuzulis I had tried to built the library using link given by you. But it was not working so i created the thread on forum in the first place. I will try again. May be i am missing something(related to linux).

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on 28 Sept 2018, 06:31 last edited by
          #6

          @Digvijay said in QSerialPort Library for Qt creator 4.8 on Debian 9:

          But it was not working

          It is impossible. Please read that link more closely.

          D 1 Reply Last reply 30 Sept 2018, 04:10
          1
          • D Digvijay
            28 Sept 2018, 04:48

            @SGaist I also do not want to use Qt 4.8. But my linux is 32 bit so i can not install Qt 5.8 which requires 64 bit linux.

            S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 28 Sept 2018, 06:59 last edited by
            #7

            @Digvijay said in QSerialPort Library for Qt creator 4.8 on Debian 9:

            @SGaist I also do not want to use Qt 4.8. But my linux is 32 bit so i can not install Qt 5.8 which requires 64 bit linux.

            No it doesn't, it's just that the pre-built package is not provided any more for 32 bit.

            Debian stable comes with 5.7 for all its support architectures which includes 32bit. If you need a more recent version of Qt, you can build it.

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

            D 1 Reply Last reply 30 Sept 2018, 03:34
            2
            • S SGaist
              28 Sept 2018, 06:59

              @Digvijay said in QSerialPort Library for Qt creator 4.8 on Debian 9:

              @SGaist I also do not want to use Qt 4.8. But my linux is 32 bit so i can not install Qt 5.8 which requires 64 bit linux.

              No it doesn't, it's just that the pre-built package is not provided any more for 32 bit.

              Debian stable comes with 5.7 for all its support architectures which includes 32bit. If you need a more recent version of Qt, you can build it.

              D Offline
              D Offline
              Digvijay
              wrote on 30 Sept 2018, 03:34 last edited by
              #8

              @SGaist Can you please tell me how to download or install this 5.7 setup??

              1 Reply Last reply
              0
              • K kuzulis
                28 Sept 2018, 06:31

                @Digvijay said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                But it was not working

                It is impossible. Please read that link more closely.

                D Offline
                D Offline
                Digvijay
                wrote on 30 Sept 2018, 04:10 last edited by
                #9

                @kuzulis I again tried installing but it is not working. I have attached the terminal output.

                epcnc@epcnc:~$ git clone git://code.qt.io/qt/qtserialport.git
                Cloning into 'qtserialport'...
                remote: Counting objects: 9362, done.
                remote: Compressing objects: 100% (4679/4679), done.
                remote: Total 9362 (delta 6198), reused 6812 (delta 4601)
                Receiving objects: 100% (9362/9362), 2.51 MiB | 893.00 KiB/s, done.
                Resolving deltas: 100% (6198/6198), done.
                Checking connectivity... done.
                epcnc@epcnc:~$ cd qtserialport
                epcnc@epcnc:~/qtserialport$ git checkout qt4-dev
                Branch qt4-dev set up to track remote branch qt4-dev from origin.
                Switched to a new branch 'qt4-dev'
                epcnc@epcnc:~/qtserialport$ echo $PATH
                /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
                epcnc@epcnc:~/qtserialport$ echo $SHELL
                /bin/bash
                epcnc@epcnc:~/qtserialport$ export PATH=$PATH:/usr/include
                epcnc@epcnc:~/qtserialport$ echo $PATH
                /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/include
                epcnc@epcnc:~/qtserialport$ export PATH=$PATH:/usr/include/qt4
                epcnc@epcnc:~/qtserialport$ echo $PATH
                /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/include:/usr/include/qt4
                epcnc@epcnc:~/qtserialport$ git clone git://code.qt.io/qt/qtserialport.git
                Cloning into 'qtserialport'...
                remote: Counting objects: 9362, done.
                remote: Compressing objects: 100% (4679/4679), done.
                remote: Total 9362 (delta 6197), reused 6812 (delta 4601)
                Receiving objects: 100% (9362/9362), 2.51 MiB | 818.00 KiB/s, done.
                Resolving deltas: 100% (6197/6197), done.
                Checking connectivity... done.
                epcnc@epcnc:~/qtserialport$ mkdir qtserialport-build
                epcnc@epcnc:~/qtserialport$ cd qtserialport-build
                epcnc@epcnc:~/qtserialport/qtserialport-build$ qmake ../qtserialport/qtserialport.pro
                Project MESSAGE: Cannot build current QtSerialPort sources with Qt version 4.8.6.
                Project ERROR: Use at least Qt 5.0.0 or try to download QtSerialPort for Qt4.
                epcnc@epcnc:~/qtserialport/qtserialport-build$

                A 1 Reply Last reply 30 Sept 2018, 05:45
                0
                • D Digvijay
                  30 Sept 2018, 04:10

                  @kuzulis I again tried installing but it is not working. I have attached the terminal output.

                  epcnc@epcnc:~$ git clone git://code.qt.io/qt/qtserialport.git
                  Cloning into 'qtserialport'...
                  remote: Counting objects: 9362, done.
                  remote: Compressing objects: 100% (4679/4679), done.
                  remote: Total 9362 (delta 6198), reused 6812 (delta 4601)
                  Receiving objects: 100% (9362/9362), 2.51 MiB | 893.00 KiB/s, done.
                  Resolving deltas: 100% (6198/6198), done.
                  Checking connectivity... done.
                  epcnc@epcnc:~$ cd qtserialport
                  epcnc@epcnc:~/qtserialport$ git checkout qt4-dev
                  Branch qt4-dev set up to track remote branch qt4-dev from origin.
                  Switched to a new branch 'qt4-dev'
                  epcnc@epcnc:~/qtserialport$ echo $PATH
                  /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
                  epcnc@epcnc:~/qtserialport$ echo $SHELL
                  /bin/bash
                  epcnc@epcnc:~/qtserialport$ export PATH=$PATH:/usr/include
                  epcnc@epcnc:~/qtserialport$ echo $PATH
                  /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/include
                  epcnc@epcnc:~/qtserialport$ export PATH=$PATH:/usr/include/qt4
                  epcnc@epcnc:~/qtserialport$ echo $PATH
                  /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/include:/usr/include/qt4
                  epcnc@epcnc:~/qtserialport$ git clone git://code.qt.io/qt/qtserialport.git
                  Cloning into 'qtserialport'...
                  remote: Counting objects: 9362, done.
                  remote: Compressing objects: 100% (4679/4679), done.
                  remote: Total 9362 (delta 6197), reused 6812 (delta 4601)
                  Receiving objects: 100% (9362/9362), 2.51 MiB | 818.00 KiB/s, done.
                  Resolving deltas: 100% (6197/6197), done.
                  Checking connectivity... done.
                  epcnc@epcnc:~/qtserialport$ mkdir qtserialport-build
                  epcnc@epcnc:~/qtserialport$ cd qtserialport-build
                  epcnc@epcnc:~/qtserialport/qtserialport-build$ qmake ../qtserialport/qtserialport.pro
                  Project MESSAGE: Cannot build current QtSerialPort sources with Qt version 4.8.6.
                  Project ERROR: Use at least Qt 5.0.0 or try to download QtSerialPort for Qt4.
                  epcnc@epcnc:~/qtserialport/qtserialport-build$

                  A Offline
                  A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on 30 Sept 2018, 05:45 last edited by aha_1980
                  #10

                  Hi @Digvijay,

                  Why do you git clone two times? After the first clone, you switched to the correct branch and the build would have worked. Also, the build directory should be outside, parallel to the sources.

                  So, once again the needed steps:

                  $ git clone git://code.qt.io/qt/qtserialport.git
                  $ cd qtserialport
                  $ git checkout qt4-dev
                  $ cd ..
                  $ mkdir qtserialport-build
                  $ cd qtserialport-build
                  $ qmake ../qtserialport/qtserialport.pro
                  $ make
                  

                  I'm also not sure if all the PATH manipulations are needed - I guess not.

                  Regards

                  Qt has to stay free or it will die.

                  D 1 Reply Last reply 1 Oct 2018, 04:11
                  2
                  • A aha_1980
                    30 Sept 2018, 05:45

                    Hi @Digvijay,

                    Why do you git clone two times? After the first clone, you switched to the correct branch and the build would have worked. Also, the build directory should be outside, parallel to the sources.

                    So, once again the needed steps:

                    $ git clone git://code.qt.io/qt/qtserialport.git
                    $ cd qtserialport
                    $ git checkout qt4-dev
                    $ cd ..
                    $ mkdir qtserialport-build
                    $ cd qtserialport-build
                    $ qmake ../qtserialport/qtserialport.pro
                    $ make
                    

                    I'm also not sure if all the PATH manipulations are needed - I guess not.

                    Regards

                    D Offline
                    D Offline
                    Digvijay
                    wrote on 1 Oct 2018, 04:11 last edited by
                    #11

                    Hi @aha_1980
                    Thanks for the reply. Now i can build the library but it is still not visible to Qt creator. When i add CONFIG += serialport to .pro file it is giving the error as follows
                    Project MESSAGE: Warning: unknown QT: serialport
                    So still what is going wrong??
                    Also can you please tell me how to install Qt 5.8 on 32 bit debian 9?? Because i do not want change my windows based GUI every time. I want directly compile project. I do not want to work in lnux environment as i am not familiar with it.

                    Regards,
                    Digvijay

                    J A 2 Replies Last reply 1 Oct 2018, 05:59
                    0
                    • D Digvijay
                      1 Oct 2018, 04:11

                      Hi @aha_1980
                      Thanks for the reply. Now i can build the library but it is still not visible to Qt creator. When i add CONFIG += serialport to .pro file it is giving the error as follows
                      Project MESSAGE: Warning: unknown QT: serialport
                      So still what is going wrong??
                      Also can you please tell me how to install Qt 5.8 on 32 bit debian 9?? Because i do not want change my windows based GUI every time. I want directly compile project. I do not want to work in lnux environment as i am not familiar with it.

                      Regards,
                      Digvijay

                      J Online
                      J Online
                      jsulm
                      Lifetime Qt Champion
                      wrote on 1 Oct 2018, 05:59 last edited by
                      #12

                      @Digvijay Why do you build Qt by yourself?
                      As @SGaist pointed out Debian stable already provides Qt 5.7 (including 32bit).

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      D 1 Reply Last reply 1 Oct 2018, 11:03
                      1
                      • D Digvijay
                        1 Oct 2018, 04:11

                        Hi @aha_1980
                        Thanks for the reply. Now i can build the library but it is still not visible to Qt creator. When i add CONFIG += serialport to .pro file it is giving the error as follows
                        Project MESSAGE: Warning: unknown QT: serialport
                        So still what is going wrong??
                        Also can you please tell me how to install Qt 5.8 on 32 bit debian 9?? Because i do not want change my windows based GUI every time. I want directly compile project. I do not want to work in lnux environment as i am not familiar with it.

                        Regards,
                        Digvijay

                        A Offline
                        A Offline
                        aha_1980
                        Lifetime Qt Champion
                        wrote on 1 Oct 2018, 07:05 last edited by
                        #13

                        Hi @Digvijay,

                        I guess you need to call sudo make install as last step.

                        But as others said, why don't you install the Qt version supplied by your distribution?

                        Because i do not want change my windows based GUI every time. I want directly compile project.

                        Sorry, I don't understand what you mean by this.

                        Regards

                        Qt has to stay free or it will die.

                        D 1 Reply Last reply 1 Oct 2018, 12:01
                        0
                        • J jsulm
                          1 Oct 2018, 05:59

                          @Digvijay Why do you build Qt by yourself?
                          As @SGaist pointed out Debian stable already provides Qt 5.7 (including 32bit).

                          D Offline
                          D Offline
                          Digvijay
                          wrote on 1 Oct 2018, 11:03 last edited by
                          #14

                          Hi
                          @jsulm said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                          As @SGaist pointed out Debian stable already provides Qt 5.7 (including 32bit).

                          Yes i know that Qt 5.7 is available. But i do not know how to install it. Do i need to uninstall the Qt 4.8?? And how to install it on linux??
                          And one important thing is i have only one day of experience in linux. So i am sorry if i am asking silly questions.

                          regards,
                          Digvijay

                          J 1 Reply Last reply 1 Oct 2018, 11:24
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 1 Oct 2018, 11:18 last edited by
                            #15

                            Then before starting to develop you should first get to know the distribution you are using. Start by looking up the Debian package manager: apt. Depending on your desktop environment you might even have a GUI on top of it.

                            No you don't need to uninstall anything, Qt 4 and 5 can co-exist without any problem.

                            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
                            1
                            • D Digvijay
                              1 Oct 2018, 11:03

                              Hi
                              @jsulm said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                              As @SGaist pointed out Debian stable already provides Qt 5.7 (including 32bit).

                              Yes i know that Qt 5.7 is available. But i do not know how to install it. Do i need to uninstall the Qt 4.8?? And how to install it on linux??
                              And one important thing is i have only one day of experience in linux. So i am sorry if i am asking silly questions.

                              regards,
                              Digvijay

                              J Online
                              J Online
                              jsulm
                              Lifetime Qt Champion
                              wrote on 1 Oct 2018, 11:24 last edited by
                              #16

                              @Digvijay To add to @SGaist on Ubuntu (and most probably on Debian) there as a GUI tool to install/uninstall packages: Synaptic.
                              Install it using: apt install synaptic

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              1
                              • A aha_1980
                                1 Oct 2018, 07:05

                                Hi @Digvijay,

                                I guess you need to call sudo make install as last step.

                                But as others said, why don't you install the Qt version supplied by your distribution?

                                Because i do not want change my windows based GUI every time. I want directly compile project.

                                Sorry, I don't understand what you mean by this.

                                Regards

                                D Offline
                                D Offline
                                Digvijay
                                wrote on 1 Oct 2018, 12:01 last edited by
                                #17

                                Hi
                                @aha_1980 said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                                Sorry, I don't understand what you mean by this.

                                What i mean is that, i have developed my application(UI) on windows. But for some reason i have to put the exe on linux. To do that i have to compile my application in linux or use cross compiler. Compiling application in linux is easier so i am trying to do that.

                                Regards,
                                Digvijay

                                A 1 Reply Last reply 1 Oct 2018, 13:42
                                0
                                • D Digvijay
                                  1 Oct 2018, 12:01

                                  Hi
                                  @aha_1980 said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                                  Sorry, I don't understand what you mean by this.

                                  What i mean is that, i have developed my application(UI) on windows. But for some reason i have to put the exe on linux. To do that i have to compile my application in linux or use cross compiler. Compiling application in linux is easier so i am trying to do that.

                                  Regards,
                                  Digvijay

                                  A Offline
                                  A Offline
                                  aha_1980
                                  Lifetime Qt Champion
                                  wrote on 1 Oct 2018, 13:42 last edited by
                                  #18

                                  @Digvijay said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                                  Compiling application in linux is easier so i am trying to do that.

                                  Yeah, thats what we do also. Where is your problem with that?

                                  Regarding QtSerialPort, you have several possible solutions:

                                  • use Qt5 as provided by your Linux distribution
                                  • use the Qt5 online installer for 32 bit Linux (I think the last version is Qt 5.5.1)
                                  • compile QtSerialPort for Qt4 yourself
                                  • use a Linux distribution that has a newer Qt5
                                  • compile Qt5 yourself

                                  If you are not limited to 32 Bit Linux, you can install the newest Qt also via the 64 bit online installer.

                                  Regards

                                  Qt has to stay free or it will die.

                                  D 1 Reply Last reply 2 Oct 2018, 10:16
                                  1
                                  • A aha_1980
                                    1 Oct 2018, 13:42

                                    @Digvijay said in QSerialPort Library for Qt creator 4.8 on Debian 9:

                                    Compiling application in linux is easier so i am trying to do that.

                                    Yeah, thats what we do also. Where is your problem with that?

                                    Regarding QtSerialPort, you have several possible solutions:

                                    • use Qt5 as provided by your Linux distribution
                                    • use the Qt5 online installer for 32 bit Linux (I think the last version is Qt 5.5.1)
                                    • compile QtSerialPort for Qt4 yourself
                                    • use a Linux distribution that has a newer Qt5
                                    • compile Qt5 yourself

                                    If you are not limited to 32 Bit Linux, you can install the newest Qt also via the 64 bit online installer.

                                    Regards

                                    D Offline
                                    D Offline
                                    Digvijay
                                    wrote on 2 Oct 2018, 10:16 last edited by
                                    #19

                                    Hi,
                                    Finally i have installed recent version of Qt and able to use serial library. Thanks for all the help.
                                    Regards,
                                    Digvijay

                                    1 Reply Last reply
                                    1
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 2 Oct 2018, 10:33 last edited by
                                      #20

                                      How did you finally install it ?

                                      In any case, since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

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

                                      D 1 Reply Last reply 5 Oct 2018, 12:01
                                      1
                                      • S SGaist
                                        2 Oct 2018, 10:33

                                        How did you finally install it ?

                                        In any case, since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                                        D Offline
                                        D Offline
                                        Digvijay
                                        wrote on 5 Oct 2018, 12:01 last edited by
                                        #21

                                        @SGaist with the library the mistake i was doing is that, i was cloning it two times. For installation of Qt 5 , i had to download right version of Qt which is compatible with my linux then installation part was easy.

                                        Regards,
                                        Digvijay

                                        1 Reply Last reply
                                        0

                                        12/21

                                        1 Oct 2018, 05:59

                                        • Login

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