Unable to build the project on Arm macOS
hugmouse opened this issue · comments
Hello! I have troubles building the project and I can't figure out why I can't do that. Oh and also I can't run your artifact that you are building in github actions. It fails with the following reason: The application “Eigen” can’t be opened.
🤔
Logs
Installing dependencies:
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (4.0.1)
Installing GZIP (1.3.0)
Installing MatrixSDK (0.23.10)
Installing OLMKit (3.2.5)
Installing Realm (10.27.0)
Installing SwiftyBeaver (1.9.5)
Installing libbase58 (0.1.4)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 7 total pods installed.
Running content view preview:
CrashReportError: Eigen crashed because AFNetworking.framework is missing
Process: Eigen[12854]
Date/Time: 2022-07-16 05:03:27 +0000
Log File: <none>
Application Specific Information:
dyld [
Library not loaded: @rpath/AFNetworking.framework/Versions/A/AFNetworking
Referenced from: /Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Intermediates.noindex/Previews/Eigen/Products/Debug/Eigen.app/Contents/MacOS/Eigen
Reason: tried: '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Intermediates.noindex/Previews/Eigen/Products/Debug/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/usr/lib/swift/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Intermediates.noindex/Previews/Eigen/Products/Debug/Eigen.app/Contents/MacOS/../Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (code signature in <ACB208E2-E081-3218-B4D5-685B62DD5215> '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Intermediates.noindex/Previews/Eigen/Products/Debug/Eigen.app/Contents
]
Frames: [
Frame {
imageIndex: 0
imageOffset: 309280
symbol: __abort_with_payload
symbolLocation: 8
}
Frame {
imageIndex: 0
imageOffset: 338400
symbol: abort_with_payload_wrapper_internal
symbolLocation: 104
}
Frame {
imageIndex: 0
imageOffset: 338452
symbol: abort_with_payload
symbolLocation: 16
}
Frame {
imageIndex: 0
imageOffset: 43324
symbol: dyld4::halt(char const*)
symbolLocation: 328
}
Frame {
imageIndex: 0
imageOffset: 24504
symbol: dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)
symbolLocation: 3644
}
Frame {
imageIndex: 0
imageOffset: 20588
symbol: start
symbolLocation: 488
}
]
Images: [
Image {
uuid: d9c2a46e-8dc4-3950-9d6a-f799e8ccb683
base: 80707584
name: dyld
path: /usr/lib/dyld
arch: arm64e
}
]
==================================
| FailedToLaunchError: Failed to launch Eigen.app
|
| /Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Intermediates.noindex/Previews/Eigen/Products/Debug/Eigen.app
|
| ==================================
|
| | HumanReadableSwiftError
| |
| | UnknownApplicationLaunchFailure: UnknownApplicationLaunchFailure()
Compiling the project:
dyld[11211]: Library not loaded: @rpath/AFNetworking.framework/Versions/A/AFNetworking
Referenced from: /Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/Eigen
Reason: tried: '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/PackageFrameworks/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/usr/lib/swift/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/../Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (code signature in <E2186F13-E63E-30B9-A8B2-E5B778E8868F> '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/../Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (code signature in <E2186F13-E63E-30B9-A8B2-E5B778E8868F> '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/usr/lib/swift/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/../Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (code signature in <E2186F13-E63E-30B9-A8B2-E5B778E8868F> '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/MacOS/../Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (code signature in <E2186F13-E63E-30B9-A8B2-E5B778E8868F> '/Users/possum/Library/Developer/Xcode/DerivedData/Eigen-evebslcpurtsfpgvyeiiqlfvahhh/Build/Products/Debug/Eigen.app/Contents/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Library/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (no such file), '/System/Library/Frameworks/AFNetworking.framework/Versions/A/AFNetworking' (no such file)
(lldb)
If you need some more info please let me know.
Hi, thanks for opening this issue! I appreciate the detail!
When you are running pod install
, is it under Rosetta? I have an M1 mac as well and I remember that when I tried to run Cocoapods natively it didn't work right unfortunately. If you would be willing to run arch -x86_64 pod install
and see if that works it would be great.
I also need to fix the GH actions builds, they haven't been working properly for a while now.
I'm going to try to run the project from scratch again and see if I encounter this issue
If you'd like, I built a binary here that should work, it's not codesigned though so you may have to right-click and press open to get it to run.
Eigen.zip
It looks like this issue happens when code signing is disabled, since Apple doesn't like loading in libraries that are not code signed. If you are able to add your developer team to the "Signing and Capabilities" section of the project file and build it (you'll probably have to change the bundle id), then everything should work correctly. I'm exploring options right now to try to get it to work without having to code sign.
If you'd like, I built a binary here that should work, it's not codesigned though so you may have to right-click and press open to get it to run. Eigen.zip
Still won't work :(
Log:
Hi, thanks for opening this issue! I appreciate the detail!
When you are running
pod install
, is it under Rosetta? I have an M1 mac as well and I remember that when I tried to run Cocoapods natively it didn't work right unfortunately. If you would be willing to runarch -x86_64 pod install
and see if that works it would be great.I also need to fix the GH actions builds, they haven't been working properly for a while now.
Btw if you install it through homebrew then you don't have to use arch -x86_64
👀
And for some reason it didn't work for me with arch -x86_64
lol, so I reinstalled it from brew
Btw if you install it through homebrew then you don't have to use
arch -x86_64
👀 And for some reason it didn't work for me witharch -x86_64
lol, so I reinstalled it from brew
That's great to know, thank you! I had no idea
Here's another shot at it, I've disabled library validation on this build and I was able to extract and run locally:
Eigen.tar.gz
Thanks for your patience
Here's another shot at it, I've disabled library validation on this build and I was able to extract and run locally: Eigen.tar.gz
And now it works!
And also some not related to this issue question: how do I verify the session on this client?
Great!
If you click on your name in the bottom left corner, it'll take you to the settings screen where you can scroll down to the "recovery password" text field and input your recovery password (sometimes called in Element your security key) to download the encryption keys from the homeserver. This will mark your device as verified to others.
I'm going to try to revamp the onboarding process in a few days, because right now it's kinda all over the place lol