pact-foundation / pact-net

.NET version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://pact.io
MIT License
823 stars 225 forks source link

RFC: Add Linux (libc)-ARM Runtime Support #498

Open dileepbg opened 1 month ago

dileepbg commented 1 month ago

Previous issues Add Linux (libc)-ARM Runtime Support

Is your feature request related to a problem? Please describe. Currently we are planning to build and deploy our dotnet application on AWS graviton instances which are ARM arch based. While building the dotnet app on with ARM arch we are getting below error. As per the official documentation of this library it doesn't support Linux-ARM architecture yet.

System.DllNotFoundException : Unable to load shared library 'pact_ffi' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.5/pact_ffi.so: No such file or directory

Describe the solution you'd like Need this library to be compatible with Linux-ARM

adamrodger commented 1 month ago

The FFI library does currently support Linux libc ARM binaries, so assuming it's possibly to detect ARM when restoring the NuGet then this should be straightforward to add.

On Mon, 20 May 2024, 12:22 Dileep B G, @.***> wrote:

Previous issues Have you searched the issue tracker to ensure this hasn't been discussed before?

Is your feature request related to a problem? Please describe. Currently we are planning to build and deploy our dotnet application on AWS graviton instances which are ARM arch based. While building the dotnet app on with ARM arch we are getting below error. As per the official documentation of this library it doesn't support Linux-ARM architecture yet.

System.DllNotFoundException : Unable to load shared library 'pact_ffi' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: Error loading shared library /usr/share/dotnet/shared/ Microsoft.NETCore.App/8.0.5/pact_ffi.so: No such file or directory

Describe the solution you'd like Need this library to be compatible with Linux-ARM

— Reply to this email directly, view it on GitHub https://github.com/pact-foundation/pact-net/issues/498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4FKWZGTHWF753FASBT3DZDHMH5AVCNFSM6AAAAABH7RF6BSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDKNZVHEZTSMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

adamrodger commented 1 month ago

Here are the methods for determining the runtime arch:

https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation