Solved Deployment problem on MAC OSX with macdeployqt Qt5.4.2 (and 5.3.2)
-
Hi, @SGaist , I must add a new QMessageBox in the case it doesn't find the sqlite driver.
I think this case comes when it creates the log database and if it doesn't find the sqlite driver and then cannot open the database or when it opens the log database (if the file already exists and is corrupted). -
@SGaist ,I have added a QMessageBox, if it doesn't find the sqldriver plugin and I have done an otool -L on the sqlite plugin and I have seen that it is linked with the libc++1.dylib and libSystemB.dylib.
is it possible that this two libraries are not on the Mac (10.11.3) or are not compatible with those of my development Mac (10.10.4) ? -
@SGaist, HI, I have the same problem on a VM with an older MacOS(10.9),so I have the problem on 2 MacOSes where Qt was not installed before...so I think it needs a library or there is a problem with the bundle.
-
@SGaist, I have added Libraries = Frameworks to the qt.conf and I will test it on the VM
-
@SGaist, Hi it does nothing.
I have now added libsqlite3.dylib to the bundle and it is not ok .
but my bundle contains other qt sql plugins and perhaps should I remove them (mysql,postgres,odbc) of the bundle ?
I have tested without the other plugins in the bundle and I have still this error.... -
the software runs on two developments MacOs (with Qt and Xcode) and crashes on two other MacOS without Qt and Xcode.....
-
@SGaist, Hi, When I use macdeployqt (Qt5.6.0) I have this errors and warning :
WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant.
WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant.
ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
ERROR: no file at "/usr/local/lib/libpq.5.dylib"but I use only the sqlite plugin
-
Just remove the plugins you won't use.
Where did you put the SQLite library ?
-
Should I remove the other plugins from the bundle?
I have tried too with the libsqlite3.dylib in the bundle (in frameworks) but it did'nt solve the problem, I don't know if I should put it in the bundle. -
I have tested without the other sql plugins and I have the same error...
-
The two MacOS on which that doesn't run are MacOS 10.9 and Mac OS 10.11.3 without Qt.
But the software and bundle was made on a Mac OS 10.10.4.
does the problem come from the MacOs version ? -
No it should not.
Things I'd do now:
- Delete the bundle
- Do a full re-build
- Run macdeployqt on it
- Delete unused plugins
- Run
otool -L
on the remaining plugins - Check whether there's any path to a non-system library that looks fishy
- Run
otool -L
on the application executable - Check whether there's any path to a non-system library that looks fishy
-
already done several times the first three levels.
an otool -L on the sqlite plugin gives paths to Qt libraries with "@rpath" but I suppose it 's ok. -
and the sqlite plugin is linked with /usr/lib/libcc++.1.dylib and /usr/lib/libSystem.B.dylib too (and QtCore and QtSql)
-
I have build with Qt5.5.1 and I have the same problem than with Qt5.6.0
-
We will try later with a VM with MacOS 10.10 to see if it is a version problem
-
We have the same error on a MacOS 10.10 without the development environment (Qt,Xcode)
-
Might be a silly question but did you check all the plugins and the application itself for which version of Qt they are linked to ?
If everything looks correct, then I'd check the framework themselves to see if for any reasons one is not from the correct version.
-
@SGaist , Hi I have deleted Qt5.4.2 and Qt5.5.1 from the hard disk and built again the software with Qt5.6.0.
I have the same error on another Mac... -
OK the problem is solved , iHave found the solution: our software use a config path (/Users/user/.config/software/) in which there are one database log file that is created.the config path did'nt exist, that was the explanation of this error.
the software is ok now,we create the path at the beginning if it doesn't exist.
I use Qt5.6.0 for this software (I think I could have used Qt5.5.1 too).