Solved Deployment problem on MAC OSX with macdeployqt Qt5.4.2 (and 5.3.2)
-
@SGaist, Hi thanks, here is the information command line :
Class NotificationReceiver is implemented in both /Users/lionel/neobe5.4.2/neobe.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets and /Users/lionel/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets. One of the two will be used. Which one is undefined.\ QObject::moveToThread: Current thread (0x7fccc043a180) is not the object's thread (0x7fccc0477b30).\ Cannot move to target thread (0x7fccc043a180)\ \ You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.\ This application failed to start because it could not find or load the Qt platform plugin "cocoa".\ \ Available platform plugins are: cocoa, minimal, offscreen.\ \ Reinstalling the application may fix this problem.\ Abort trap: 6}
it seems that there is a problem with the plugin cocoa. the plugin platform cocoa is in the app,so I don't understand this message.the plugin is in Contents/PlugIns/platforms.
-
And I don't understand, because I have made another package/app with macdeployqt that uses the plugin cocoa too and there isn't any problem with this another app.
-
-I have tried by putting the plugins subdirectories in the MacOS subdirectory of the bundle. it does nothing.
-The declaration of QApplication is the first line of the main function in the program
-I have modified the qt.conf file and I have still the errorso I don't know from what comes this error now
-
Hi, my problem was solved with Qt5.6.....
-
I think this problem comes from the SQL plugins,because I have an error on two libraries (libmysqlclient and libpq) when I run macdeployqt with Qt5.4.2 and Qt5.6.0 but the bundle crashes with Qt5.4.2 and the bundle is OK with Qt5.6.0. With Qt5.4.2 I had tried to remove the plugins other than sqlite (I use sqlite) from Qt installattion and then run macdeployqt but it crashes with unable to find or load plugin cocoa.
But my problem is solved I will use the Qt5.6.0 version for this application on MacOs. -
IIRC, there's been several fixes in between to macdeployqt that might be related to that.
-
the package crashes on another Mac but I have not this other Mac here today and I cannot see the command line information.I think there are libraries of /usr/lib like libc++ or others or OpenGl that are not installed on this another mac.
Can I add libraries (of /usr/lib or other) to the bundle ? -
What exact libraries are missing ?
-
@SGaist, Hi , I don't know if it comes from a missing library and I am not sure because the error message is :
QSqlError("-1", "Error opening database", "out of memory")failed to connect.
Abort trap: 6
we use sqlite in the software and the plugin is in the bundle.
I have freed memory and even with 4Gb free memory I have this message
this is not a development Mac, and it is with MacOS 10.11.3 and 8 GB memory
I have copied the software on the desktop and I run it in command line.
On two other (developments) Mac the software is ok. -
AFAIK, that's unrelated.
Where are your trying to open your database ?
Do you check that the open operation is successful before calling a query on it ? -
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...