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. Unable to do static build from Qt source on MAC
QtWS25 Last Chance

Unable to do static build from Qt source on MAC

Scheduled Pinned Locked Moved Solved Installation and Deployment
16 Posts 2 Posters 1.8k 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.
  • V Offline
    V Offline
    vyau
    wrote on last edited by
    #1

    Dear All: I am trying to do a static build of Qt source. This seems to be needed by macqtdeploy (I am trying to package my app as a bundle).
    I did

    configure -prefix ./qtbase -opensource -static -nomake tests

    when I did "make" after that, I ran into some compilation issues on Mac. (I had no
    issue doing this on Linux). I am using Qt-everywhere-src-5.11.2.

    Any tip how I can build Qt from source on MAC?
    Thanks

    ---errors-----

    c/qt-everywhere-src-5.11.2/qtbase/lib -o .obj/debug/qsql_mysql.o qsql_mysql.cpp
    qsql_mysql.cpp:235:9: error: unknown type name 'my_bool'
    my_bool nullIndicator;
    ^
    qsql_mysql.cpp:987:13: error: use of undeclared identifier 'my_bool'
    QVector<my_bool> nullVector;
    ^
    qsql_mysql.cpp:1001:9: error: use of undeclared identifier 'nullVector'
    nullVector.resize(values.count());
    ^
    qsql_mysql.cpp:1008:13: error: use of undeclared identifier 'nullVector'
    nullVector[i] = static_cast<my_bool>(val.isNull());
    ^
    qsql_mysql.cpp:1008:41: error: unknown type name 'my_bool'
    nullVector[i] = static_cast<my_bool>(val.isNull());
    ^
    qsql_mysql.cpp:1009:34: error: use of undeclared identifier 'nullVector'; did you mean 'nullptr'?
    currBind->is_null = &nullVector[i];
    ^~~~~~~~~~
    nullptr
    qsql_mysql.cpp:1009:33: error: cannot take the address of an rvalue of type 'nullptr_t'
    currBind->is_null = &nullVector[i];

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

      Hi,

      There's absolutely no requirements for a static build of Qt on macOS. macdeployqt was created to fix your application bundle with the various frameworks your application needs.

      As for your error, what version of MySQL are you using to build the plugin ?

      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
      • V Offline
        V Offline
        vyau
        wrote on last edited by
        #3

        Ok, good to know that about macdeployqt.
        I still hope to get a static build going on Mac.

        I do not have any MySQL installed. Should I?
        And if so, I use the -sql-driver flag for configure?

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

          Since the build is failing for the MySQL plugin, you likely have it somewhere configure found.

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

          V 1 Reply Last reply
          0
          • V Offline
            V Offline
            vyau
            wrote on last edited by
            #5

            i will check on that in a bit.

            I have since borrowed another Mac and tried to compile same Qt version statically.

            And I got different errors. Do you know what this one is about?

            -- Errors --

            orm/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../../../mkspecs/macx-clang -o .obj/debug/qcocoawindow.o qcocoawindow.mm
            qcocoawindow.mm:407:59: error: use of undeclared identifier 'NSEventTypeMouseMoved'; did you mean 'kEventMouseMoved'?
            const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
            ^~~~~~~~~~~~~~~~~~~~~
            kEventMouseMoved
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/CarbonEvents.h:1721:3: note:
            'kEventMouseMoved' declared here
            kEventMouseMoved = 5
            ^
            qcocoawindow.mm:408:62: error: use of undeclared identifier 'NSEventTypeMouseMoved'; did you mean 'kEventMouseMoved'?
            const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
            ^~~~~~~~~~~~~~~~~~~~~
            kEventMouseMoved

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

              What version of Xcode are you using ?

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

                I am using Xcode 7.3.1

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

                  You are going to have to update. That version of Xcode is too old to build such a recent version of Qt. Or at least the platform plugin part.

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

                    ok, I think I need to upgrade OS as well.

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Since the build is failing for the MySQL plugin, you likely have it somewhere configure found.

                      V Offline
                      V Offline
                      vyau
                      wrote on last edited by
                      #10

                      @SGaist
                      I am using MySQL 8.0.12. It is installed by Brew on my Mac

                      Is this version too old hence the error?

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

                        Current version if macOS Mojave.

                        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
                        • V Offline
                          V Offline
                          vyau
                          wrote on last edited by
                          #12

                          @SGaist
                          I am using MySQL 8.0.12. It is installed by Brew on my Mac

                          Is this version too old hence the error?

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

                            IIRC, you need Qt 5.12. MySQL removed the use of the my_bool type at some point. The plugin has been updated.

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

                            V 1 Reply Last reply
                            1
                            • SGaistS SGaist

                              IIRC, you need Qt 5.12. MySQL removed the use of the my_bool type at some point. The plugin has been updated.

                              V Offline
                              V Offline
                              vyau
                              wrote on last edited by
                              #14

                              @SGaist thanks

                              1 Reply Last reply
                              0
                              • V Offline
                                V Offline
                                vyau
                                wrote on last edited by
                                #15

                                To summarize, I have oudated Xcode and Mysql :)

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

                                  Your MySQL is not outdated as the current version is 8.0.13.

                                  As for Xcode, the current version is 10.1 IIRC.

                                  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

                                  • Login

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