pact-foundation / pact-ruby-standalone

A standalone pact command line executable using the ruby pact implementation and Travelling Ruby
https://pact.io
MIT License
42 stars 33 forks source link

Alpine Users - Pact Plugin CLI not compatible with arm64v8/alpine #102

Closed YOU54F closed 4 months ago

YOU54F commented 1 year ago

We provide guidance for Alpine here

https://github.com/pact-foundation/pact-ruby-standalone/wiki/Using-the-pact-ruby-standalone-with-Alpine-Linux-Docker

We have recently packaged the pact-plugin-cli as part of the pact-ruby-standalone bundle.

It should be noted that despite this being added, it has been tested across aarch64 linux, and it does not work with the guidance in the above wiki

pact-plugin-cli --help
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /pact/bin/pact-plugin-cli)
Error relocating /pact/bin/pact-plugin-cli: __res_init: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_GetIPInfo: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_GetDataRelBase: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_GetRegionStart: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_SetGR: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_GetTextRelBase: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_Resume: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_DeleteException: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_RaiseException: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_GetIP: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_Backtrace: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_GetLanguageSpecificData: symbol not found
Error relocating /pact/bin/pact-plugin-cli: _Unwind_SetIP: symbol not found
Exit status: 127

Upon installing the following

libgcc libstdc++

We get the following error

928c7e40c438:/# pact-plugin-cli
Error relocating /pact/bin/pact-plugin-cli: __res_init: symbol not found

x86_64 appears to be fine with the current guidance with initial smoke testing.

It should be noted that we don't currently build for musl based targets, in the pact-plugin-cli

https://github.com/pact-foundation/pact-plugins/releases/tag/pact-plugin-cli-v0.1.0

but it should be possible, the issue then would just be detecting it within our existing checks which are os (linux) and arch (processor)

Ruby based executables seem okay in smoke testing