mbsanchez / QtPrivilegedHelperExample

GNU General Public License v3.0
22 stars 6 forks source link

The file was not recognized as a valid object file && and failed on macOS Sierra #4

Open systemmind opened 7 years ago

systemmind commented 7 years ago

I got couple of such errors when I am trying to build the project: ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '/Users/mac/projects/mohammed/QtPrivilegedHelperExampleModified/build-PrivilegedHelperExample-qt_5_7_1-Debug/HostApp.app/Contents/Frameworks/QtWidgets.framework/Versions/5/Resources/Info.plist': The file was not recognized as a valid object file.\nfatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: internal objdump command failed\n"

This issue returns the macdeployqt utility, I don't know if it is critical, but the HostApp does not work for me. In line 74 of file smjobbless.mm result is always false. result = SMJobBless(kSMDomainSystemLaunchd, label, authRef, error);

I am using qt 5.7.1 macOS Sierra

But the objective-C ECHelper project works fine. Xcode Version 8.2.1

Did you test the project on macOS Sierra?

MartinBriza commented 7 years ago

I have the same problem. I don't think it's related to those errors you get when signing because the resulting bundle seems to be signed right. However, I can't quite put my finger on why it cannot install the helper...

mbsanchez commented 7 years ago

Maybe you need to change some security items of the OS (I don't know I don't have Mac OS Sierra for testing), see this: http://www.macworld.com/article/3094865/macs/how-to-run-apps-that-are-not-from-the-app-store-in-macos-sierra.html http://osxdaily.com/2016/09/27/allow-apps-from-anywhere-macos-gatekeeper/

I'm googling about smjob bless on Mac OS Sierra, but I can't find any useful info.