Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build on M1 Mac running Monterey? #14

Open
luckman212 opened this issue Feb 20, 2022 · 7 comments
Open

build on M1 Mac running Monterey? #14

luckman212 opened this issue Feb 20, 2022 · 7 comments

Comments

@luckman212
Copy link

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
@tgray
Copy link
Owner

tgray commented Feb 20, 2022

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?

@luckman212
Copy link
Author

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

@tgray
Copy link
Owner

tgray commented Feb 21, 2022

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.

@tgray
Copy link
Owner

tgray commented Feb 21, 2022

No argument error: see issue #15. Which is now fixed in 0.3.1.

@luckman212
Copy link
Author

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.

@tgray
Copy link
Owner

tgray commented Feb 22, 2022

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.

@luckman212
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants