Open omer-za opened 1 year ago
@pamidur @kondr1 please let me know what can I do to make it resolved ASAP 🙏
As a quick test you can set AspectInjector_Location in your csproj file to (folder_where_aspctInjector_files_are_located)/build/_bin/osx-arm64/AspectInjector
e.g.
/Users/user/.nuget/packages/aspectinjector/2.8.1/build/_bin/osx-arm64/AspectInjector
We produce osx-arm64 binary but I don't see any code that would detect running on M1 https://github.com/pamidur/aspect-injector/blob/fbd25b9dcf8104d1a87b31cb8179c73d66e8db59/nuget/AspectInjector.Package.csproj#L35
I need to figure a reliable way to tell M1
Please try https://www.nuget.org/packages/AspectInjector/2.8.2-pre1 once it is available
With 2.8.2-pre1
I get a different error now. it's now choosing osx-arm64 but seems like it crashes :(
/var/folders/0n/s94fzz_95vs9pf6g24m6s8ph0000gn/T/tmpc2d2ee754f1944c1b86c2cd7eb08d38a.exec.cmd: line 2:
2910 Killed: 9 "/Users/user/.nuget/packages/aspectinjector/2.8.2-pre1/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf
"/Users/user/work/jenkins/workspace/automation-browser-ci-mac/ZA.Automation.Allure/obj/Debug/net6.0/ZA.Automation.Allure.dll._asi_refs"
AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors.
Issue looks similar to here https://github.com/dotnet/runtime/issues/49091
From further look seems that Apple Silicon binaries should be signed in order to be executed https://github.com/dotnet/runtime/issues/48387
Confirmed, I executed
codesign -s - /Users/user/.nuget/packages/aspectinjector/2.8.2-pre1/buildTransitive/netstandard2.0/../../user/_bin/osx-arm64/AspectInjector
and now it works.
It should be done as part of publishing using enableMacOSCodeSign
Did you use just selfsigned certificate?
yes, no special certificate provided
Hi @omer-za , I'm sorry it took quite some time. Could you please see if 2.8.2-pre2 fixes the issue? Thank you!
@pamidur issue still persists, even with 2.8.2-pre2
Hi, I have figured the fix already, but wasn't able to implement it yet. Plus I'll need someone willing to test as I don't have a Mac.
On Sun, 12 May 2024, 21:34 Osher De Paz, @.***> wrote:
@pamidur https://github.com/pamidur issue still persists, even with 2.8.2-pre2
— Reply to this email directly, view it on GitHub https://github.com/pamidur/aspect-injector/issues/210#issuecomment-2106184634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7HZUCF4OBMOIWZGRVOVRTZB4ZR3AVCNFSM6AAAAAAUNX5VTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGE4DINRTGQ . You are receiving this because you were mentioned.Message ID: @.***>
Hi, I have figured the fix already, but wasn't able to implement it yet. Plus I'll need someone willing to test as I don't have a Mac. … On Sun, 12 May 2024, 21:34 Osher De Paz, @.> wrote: @pamidur https://github.com/pamidur issue still persists, even with 2.8.2-pre2 — Reply to this email directly, view it on GitHub <#210 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7HZUCF4OBMOIWZGRVOVRTZB4ZR3AVCNFSM6AAAAAAUNX5VTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGE4DINRTGQ . You are receiving this because you were mentioned.Message ID: @.>
I can help testing it, should be easy enough
Environment
Describe the bug Build fails on M1 without Rosetta
To Reproduce Just try to build a project with aspectinjector as a package reference on a M1 machine without Rosetta