[SOLVED]MySQL library problem
-
wrote on 27 Jun 2015, 19:08 last edited by
Yes, i've checked everything.
I simply run this:
macdeployqt myapp.appi got this:
ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
ERROR: no file at "/usr/local/lib/libpq.5.dylib" -
wrote on 27 Jun 2015, 19:17 last edited by
HI,
have you installed QT with installer or building from sources??
What happens if you run macdeploy with verbose settingmacdeployqt -verbose=3 myapp.app
-
HI,
have you installed QT with installer or building from sources??
What happens if you run macdeploy with verbose settingmacdeployqt -verbose=3 myapp.app
wrote on 27 Jun 2015, 19:27 last edited by@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 executablesmacdeployqt 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. -
wrote on 27 Jun 2015, 19:31 last edited by
Sorry,
the right syntax is
macdeployqt myapp.app -verbose=3
-
wrote on 27 Jun 2015, 19:39 last edited by mcosta
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
-
wrote on 27 Jun 2015, 19:40 last edited by cpuin
Doesn't work after the deployment!!!
-
Hi,
Do you have the MySQL libraries installed in /opt ? (i.e. using macports) If not then the error message is normal.
-
Hi,
Do you have the MySQL libraries installed in /opt ? (i.e. using macports) If not then the error message is normal.
-
Then you probably have the MySQL libraries in a path like /usr/local/mysql/. Right ?
-
wrote on 27 Jun 2015, 19:53 last edited by
YES it is there
-
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]
-
wrote on 27 Jun 2015, 20:00 last edited by
I deleted all plugins , left only libqsqlite.dylib
The app doesn't work! -
You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?
-
wrote on 27 Jun 2015, 20:01 last edited by
seems that macqtdeploy has some hardcoded PATH for MySQL and PostgreSQL.
-
@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/
-
You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?
-
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]
wrote on 27 Jun 2015, 20:09 last edited by@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 -
Which version of OS X and Qt are you using ?
I've corrected the example line
12/36