[SOLVED]MySQL library problem
-
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
-
wrote on 27 Jun 2015, 20:38 last edited by cpuin
@SGaist said:
PATH_TO_libqsqlmysql.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 Users/jorost/Qt5.4.2/5.4/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: Users/jorost/Qt5.4.2/5.4/clang_64/plugins/sqldrivers/libqsqlmysql.dylib (No such file or directory) -
You're missing a slash before Users
15/36