Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to build rpm package to install on CentOs 6.5 from Qt Creator?
Forum Updated to NodeBB v4.3 + New Features

How to build rpm package to install on CentOs 6.5 from Qt Creator?

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 4 Posters 6.7k Views 2 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.
  • John_QtJ Offline
    John_QtJ Offline
    John_Qt
    wrote on last edited by
    #1

    Hi all,
    I have done developing the Qt GUI application on CentOs 6.5. How could I make rpm package (including executable file, dynamic libraries, support files, etc...) to install it on another CentOs 6.5? I have spent the time to google it but I didn't get any luck yet. Do you guys here have any idea on it? Thanks in advance.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi. That's not that easy. Prepare for some major headache and read RHEL's, resp. Centos' s documentation on packaging. As an alternative, you could try CMake's "cpack".

      1 Reply Last reply
      1
      • John_QtJ Offline
        John_QtJ Offline
        John_Qt
        wrote on last edited by
        #3

        Hi @Wieland ,
        The task wasn't easy for newbie like me. Also I have problem with dependency when I try to run my release GUI application on another Linux machine. Do you know how to include dependency when we compile source code?

        jsulmJ 1 Reply Last reply
        0
        • John_QtJ John_Qt

          Hi @Wieland ,
          The task wasn't easy for newbie like me. Also I have problem with dependency when I try to run my release GUI application on another Linux machine. Do you know how to include dependency when we compile source code?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @John_Qt Take a look at http://doc.qt.io/qt-5/linux-deployment.html

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

          John_QtJ 1 Reply Last reply
          1
          • John_QtJ Offline
            John_QtJ Offline
            John_Qt
            wrote on last edited by
            #5

            Hi @Wieland,
            I found the binarycreator tool but I don't know where I could download and how to use it, do you have any idea on it? Also, I will try your comment too. Thanks.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              Are you looking for that kind of information ?

              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
              • John_QtJ Offline
                John_QtJ Offline
                John_Qt
                wrote on last edited by
                #7

                Hi @SGaist ,
                If I use your info, it will miss Qt libs and then it cannot run as stand alone application on another computer.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  From you description, it looked like your app would use the distribution provided Qt, hence this guide as you would have listed the needed Qt modules as dependencies of your package.

                  Since it doesn't seem to be the case, shouldn't you rather consider something like an appimage ?

                  The linuxdeployqt project might be of interest.

                  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
                  • John_QtJ Offline
                    John_QtJ Offline
                    John_Qt
                    wrote on last edited by
                    #9

                    @SGaist ,
                    I have tried linuxdeployqt tool, but it gave me errors on running.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      What errors ?

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

                      John_QtJ 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @John_Qt Take a look at http://doc.qt.io/qt-5/linux-deployment.html

                        John_QtJ Offline
                        John_QtJ Offline
                        John_Qt
                        wrote on last edited by
                        #11

                        @jsulm
                        I read the article but I am so confusing on " When linking your application against static Qt libraries, note that you might need to add more libraries to the LIBS line in your project file. For more information, see the Application Dependencies section." What does it mean ? How could we link ?

                        jsulmJ 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          What errors ?

                          John_QtJ Offline
                          John_QtJ Offline
                          John_Qt
                          wrote on last edited by
                          #12

                          @SGaist
                          Old library

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            That's a bit vague, can you provide more details ?

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

                            John_QtJ 1 Reply Last reply
                            0
                            • John_QtJ John_Qt

                              @jsulm
                              I read the article but I am so confusing on " When linking your application against static Qt libraries, note that you might need to add more libraries to the LIBS line in your project file. For more information, see the Application Dependencies section." What does it mean ? How could we link ?

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @John_Qt If you don't use static Qt libraries then just ignore that part...

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

                              1 Reply Last reply
                              0
                              • John_QtJ Offline
                                John_QtJ Offline
                                John_Qt
                                wrote on last edited by
                                #15

                                @jsulm ,
                                Currently I am trying to use static libraries. Could you show me the steps to create static libs and get my qt gui application compile with that lib?

                                Following the http://doc.qt.io/qt-5/linux-deployment.html,
                                Step 1:
                                cd /path/to/Qt
                                ./configure -static -prefix /path/to/Qt <other parameters>
                                make
                                Step 2:
                                cd /path/to/Qt/examples/widgets/tools/plugandpaint/app
                                make clean
                                PATH=/path/to/Qt/bin:$PATH
                                export PATH
                                qmake -config release
                                make

                                But I don't really understand step 2. In the http://qtnbeyond.blogspot.com/2011/03/statically-building-with-qt-creator-in.html, they don't do step 2, they just asked the static libs into the Qt Version and then compile it. So, which steps do you recommend me to do? I am so confusing. Thank for your help.

                                1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  That's a bit vague, can you provide more details ?

                                  John_QtJ Offline
                                  John_QtJ Offline
                                  John_Qt
                                  wrote on last edited by
                                  #16

                                  @SGaist
                                  I will try to create the error again when I have a chance because now I tried to create static libs and then create rpm from it.

                                  jsulmJ 1 Reply Last reply
                                  0
                                  • John_QtJ John_Qt

                                    @SGaist
                                    I will try to create the error again when I have a chance because now I tried to create static libs and then create rpm from it.

                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #17

                                    @John_Qt There is no need to build all the examples (what the step 2 does).

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

                                    1 Reply Last reply
                                    0
                                    • John_QtJ Offline
                                      John_QtJ Offline
                                      John_Qt
                                      wrote on last edited by
                                      #18

                                      @jsulm ,
                                      What is <other parameters> on step 1?

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • John_QtJ John_Qt

                                        @jsulm ,
                                        What is <other parameters> on step 1?

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        @John_Qt There are no parameters in step one: it is just to download Qt source code. So what do you mean exactly?

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

                                        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