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

Missing x86_64 architecture on brew installed Sourcery. M1 #1036

Closed
mwierzbinski opened this issue Mar 1, 2022 · 3 comments
Closed

Missing x86_64 architecture on brew installed Sourcery. M1 #1036

mwierzbinski opened this issue Mar 1, 2022 · 3 comments

Comments

@mwierzbinski
Copy link

Environment
Sourcery Version 1.7.0 installed through brew
Mac M1 running Xcode 13.2.1 on Rosetta.

Notes
The command works if I run it in terminal, however if I add it to pre-build scripts it ends with error shown below. Not really sure why Im assuming that because one of the libraries Im using is not yet Compatible with arm64 Xcode builds the project in x86_64.

The Error:
Getting Command PhaseScriptExecution failed with a nonzero exit code:

dyld[93847]: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib
  Referenced from: /opt/homebrew/Cellar/sourcery/1.7.0/bin/sourcery
  Reason: tried: '/usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib' (no such file), 
'/opt/homebrew/Cellar/sourcery/1.7.0/bin/../lib/lib_InternalSwiftSyntaxParser.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),
 '/usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib' (no such file),
 '/opt/homebrew/Cellar/sourcery/1.7.0/bin/../lib/lib_InternalSwiftSyntaxParser.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),
 '/usr/local/lib/lib_InternalSwiftSyntaxParser.dylib' (no such file), 
'/usr/lib/lib_InternalSwiftSyntaxParser.dylib' (no such file)
/Users/michal-novoda/Projects/Hopin/hopin-mobile-ios/Tuist/Scripts/generate_mocks.sh: line 3: 93847 Abort trap: 6           sourcery --config Sourcery/config.yml
@krzysztofzablocki
Copy link
Owner

I imagine running through Rosetta has something to do with it, our brew formula builds thin slice from what I remember, if you use normal release of cocoapods you should have universal binary, mind checking if that works in your case?

@mwierzbinski
Copy link
Author

Currently we're using SPM rather then cocoa in the project, but I can temporary install and check.

@krzysztofzablocki
Copy link
Owner

fixed by #1037

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