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. [SOLVED]MySQL library problem
QtWS25 Last Chance

[SOLVED]MySQL library problem

Scheduled Pinned Locked Moved General and Desktop
mysqldriverpluginsql
36 Posts 3 Posters 12.9k 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.
  • C Offline
    C Offline
    cpuin
    wrote on last edited by cpuin
    #1

    I can't believe , tons of help request in the net and no solution.
    Using macdeployqt i get ERRORS for missing mysql library.Why, i use SQLite?
    Did somebody find a solution? I like Qt SDK a lot, but these things are very annoying.Is it so hard to make it simply work?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      how did you run macdeployqt??

      Have you checked everything is ok according to this (http://doc.qt.io/qt-5/osx-deployment.html)??

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cpuin
        wrote on last edited by
        #3

        Yes, i've checked everything.
        I simply run this:
        macdeployqt myapp.app

        i got this:
        ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
        ERROR: no file at "/usr/local/lib/libpq.5.dylib"

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          HI,

          have you installed QT with installer or building from sources??
          What happens if you run macdeploy with verbose setting

          macdeployqt -verbose=3 myapp.app 
          

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          C 1 Reply Last reply
          0
          • M mcosta

            HI,

            have you installed QT with installer or building from sources??
            What happens if you run macdeploy with verbose setting

            macdeployqt -verbose=3 myapp.app 
            
            C Offline
            C Offline
            cpuin
            wrote on last edited by
            #5

            @mcosta said:

            -verbose=3

            i got this (no errors on the syntax!!!):
            Usage: macdeployqt app-bundle [options]

            Options:
            -verbose=<0-3> : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug
            -no-plugins : Skip plugin deployment
            -dmg : Create a .dmg disk image
            -no-strip : Don't run 'strip' on the binaries
            -use-debug-libs : Deploy with debug versions of frameworks and plugins (implies -no-strip)
            -executable=<path> : Let the given executable use the deployed frameworks too
            -qmldir=<path> : Deploy imports used by .qml files in the given path
            -always-overwrite : Copy files even if the target file exists
            -codesign=<ident> : Run codesign with the given identity on all executables

            macdeployqt takes an application bundle as input and makes it
            self-contained by copying in the Qt frameworks and plugins that
            the application uses.

            Plugins related to a framework are copied in with the
            framework. The accessibilty, image formats, and text codec
            plugins are always copied, unless "-no-plugins" is specified.

            See the "Deploying an Application on Qt/Mac" topic in the
            documentation for more information about deployment on Mac OS X.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mcosta
              wrote on last edited by
              #6

              Sorry,

              the right syntax is

              macdeployqt myapp.app -verbose=3
              

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cpuin
                wrote on last edited by cpuin
                #7

                Yes i just realise that:
                (i installed QT from the installer):

                The output is too long to be posted here

                I uploaded it here log

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcosta
                  wrote on last edited by mcosta
                  #8

                  I got the same error.

                  BTW I think the application works (by default all sqldrivers plugins are copied)

                  The installer installs sqlite, mysql, odbc and postgresql also if you don't have the libraries installed

                  UPDATE Qt drivers are loaded at runtime so there's no way to understand which drivers are used; for this reason macdeplyqt copy all drivers

                  Once your problem is solved don't forget to:

                  • Mark the thread as SOLVED using the Topic Tool menu
                  • Vote up the answer(s) that helped you to solve the issue

                  You can embed images using (http://imgur.com/) or (http://postimage.org/)

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    cpuin
                    wrote on last edited by cpuin
                    #9

                    Doesn't work after the deployment!!!

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

                      Hi,

                      Do you have the MySQL libraries installed in /opt ? (i.e. using macports) If not then the error message is normal.

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

                      C 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Hi,

                        Do you have the MySQL libraries installed in /opt ? (i.e. using macports) If not then the error message is normal.

                        C Offline
                        C Offline
                        cpuin
                        wrote on last edited by
                        #11

                        @SGaist

                        I have installed MySQL from the installer.I don't know where is the opt/ (the path to it)

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

                          Then you probably have the MySQL libraries in a path like /usr/local/mysql/. Right ?

                          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
                          • C Offline
                            C Offline
                            cpuin
                            wrote on last edited by
                            #13

                            YES it is there

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

                              Then you have to do

                              install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql/PATH_TO_libmysqlclient.X.dylib PATH_TO_libqsqlmysql.dylib
                              

                              In any case, if you are not using it in your application, you can also ignore the message and remove the plugin from the bundle.

                              [edit: added missing target SGaist]

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

                              C 1 Reply Last reply
                              0
                              • C Offline
                                C Offline
                                cpuin
                                wrote on last edited by
                                #15

                                I deleted all plugins , left only libqsqlite.dylib
                                The app doesn't work!

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

                                  You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?

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

                                  C 1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    mcosta
                                    wrote on last edited by
                                    #17

                                    seems that macqtdeploy has some hardcoded PATH for MySQL and PostgreSQL.

                                    Once your problem is solved don't forget to:

                                    • Mark the thread as SOLVED using the Topic Tool menu
                                    • Vote up the answer(s) that helped you to solve the issue

                                    You can embed images using (http://imgur.com/) or (http://postimage.org/)

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

                                      @mcosta not it doesn't, macdeployqt parses the output of otool to get the dependencies of the libraries/plugins of Qt. AFAICT, the plugins are built with dependencies coming from MacPorts hence the libmysqlclient.18.dylib in /opt/local/lib/

                                      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
                                      • SGaistS SGaist

                                        You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?

                                        C Offline
                                        C Offline
                                        cpuin
                                        wrote on last edited by
                                        #19

                                        @SGaist said:

                                        install_name_tool -

                                        LSOpenURLsWithRole() failed with error -10810 for the file

                                        1 Reply Last reply
                                        0
                                        • SGaistS SGaist

                                          Then you have to do

                                          install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql/PATH_TO_libmysqlclient.X.dylib PATH_TO_libqsqlmysql.dylib
                                          

                                          In any case, if you are not using it in your application, you can also ignore the message and remove the plugin from the bundle.

                                          [edit: added missing target SGaist]

                                          C Offline
                                          C Offline
                                          cpuin
                                          wrote on last edited by
                                          #20

                                          @SGaist said:

                                          /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib

                                          install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql-5.6.25-osx10.8-x86_64/lib/libmysqlclient.18.dylib
                                          Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input

                                          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