contacts
contacts copied to clipboard
build on M1 Mac running Monterey?
Hi @tgray & thanks for releasing 0.2.2
I was eager to give it a try, but the build failed... Xcode 13.2.1 / macOS 12.2.1
mini:~/Downloads/contacts-0.2.2 $ make
mkdir -p bin
xcodebuild
objc[81805]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x2008d3678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106a802c8). One of the two will be used. Which one is undefined.
objc[81805]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x2008d36c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106a80318). One of the two will be used. Which one is undefined.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: 389d0f39c3a7806c9d80271e092e8478
Build description path: /Users/luke/Downloads/contacts-0.2.2/build/XCBuildData/389d0f39c3a7806c9d80271e092e8478-desc.xcbuild
note: Build preparation complete
warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
CreateBuildDirectory /Users/luke/Downloads/contacts-0.2.2/build
cd /Users/luke/Downloads/contacts-0.2.2/contacts.xcodeproj
builtin-create-build-directory /Users/luke/Downloads/contacts-0.2.2/build
CreateBuildDirectory /Users/luke/Downloads/contacts-0.2.2/build/Release
cd /Users/luke/Downloads/contacts-0.2.2/contacts.xcodeproj
builtin-create-build-directory /Users/luke/Downloads/contacts-0.2.2/build/Release
WriteAuxiliaryFile /Users/luke/Downloads/contacts-0.2.2/build/contacts.build/Release/Version\ Number\ Scripts.build/Script-16BCB1C11724184C002F740A.sh (in target 'Version Number Scripts' from project 'contacts')
cd /Users/luke/Downloads/contacts-0.2.2
write-file /Users/luke/Downloads/contacts-0.2.2/build/contacts.build/Release/Version\ Number\ Scripts.build/Script-16BCB1C11724184C002F740A.sh
PhaseScriptExecution Run\ Script /Users/luke/Downloads/contacts-0.2.2/build/contacts.build/Release/Version\ Number\ Scripts.build/Script-16BCB1C11724184C002F740A.sh (in target 'Version Number Scripts' from project 'contacts')
cd /Users/luke/Downloads/contacts-0.2.2
/bin/sh -c /Users/luke/Downloads/contacts-0.2.2/build/contacts.build/Release/Version\\\ Number\\\ Scripts.build/Script-16BCB1C11724184C002F740A.sh
Create temporary Info.plist
2022-02-19 19:50:36.604 defaults[81845:7101736]
Domain /Users/luke/Downloads/contacts-0.2.2/contacts/Info does not exist
Command PhaseScriptExecution failed with a nonzero exit code
/Users/luke/Downloads/contacts-0.2.2/contacts.xcodeproj: warning: AddressBook is deprecated. Consider migrating to Contacts instead. (in target 'contacts' from project 'contacts')
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Run\ Script /Users/luke/Downloads/contacts-0.2.2/build/contacts.build/Release/Version\ Number\ Scripts.build/Script-16BCB1C11724184C002F740A.sh (in target 'Version Number Scripts' from project 'contacts')
(1 failure)
make: *** [bin/contacts] Error 65
Ugh. I'm going to be honest I have no idea. This is a very hacked together thing for me as I don't really know Obj-C, Xcode, etc. I did just spend the day hacking version 0.3.0 in swift. I'm going to push it shortly and hopefully it works?
Thanks @tgray - it worked! 🚀 Got a good build from this.
2 small things:
- there's an
XXX:
debug message left behind that prints on every action - if there are no arguments passed, it hits a breakpoint/error
$ ./contacts
2022-02-21 07:04:25.628 contacts[18089:903519] XXX: countOfStores: 1, countOfAccounts: 1
Trace/BPT trap: 5
Oh boy. I do not have an M1 Mac, and from my brief poking around, it sounds like it might be something to do with M1 Macs. Like this.
If you could try a few things for me:
- Do you get the message when you actually run a search that returns results?
./contacts searchterm
or./contacts --all
- Is the message on stderr? Try
./contacts searchterm 2> /dev/null
Feel free to paste in input with emails, etc. removed.
As to the no argument error, I'll fix that.
No argument error: see issue https://github.com/tgray/contacts/issues/15. Which is now fixed in 0.3.1.
0.3.1 looking good.
Still get the XXX
(yes it prints to stderr so 2>/dev/null does supress it)
Running it with an arg works fine, search works & does not print the XXX.
Glad to hear. It might be something in the argument parser library or maybe just something with swift package manager. I don't do much heavy lifting with the argument library so maybe I'll play around with removing it completely.
Yeah I looked at the code too, don't really see anything that would cause it but I did find this:
swift - allocating EKEventStore throws warnings - Stack Overflow
So I guess one of those libraries may be leveraging EventKit under the hood, and someone at Apple left a debug message behind. Might be worth filing a bugreport, but maybe someone can test it on 12.3 to see if it's already fixed.