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

Unable to use Multi-Region access point on a rails project #2794

Closed
sastromskis opened this issue Nov 28, 2022 · 2 comments
Closed

Unable to use Multi-Region access point on a rails project #2794

sastromskis opened this issue Nov 28, 2022 · 2 comments
Labels
dependencies This issue is a problem in a dependency.

Comments

@sastromskis
Copy link

Describe the bug

Accessing multi-region access point requires the aws-crt gem. After looking through available resources online i found that a similar problem was reported earlier:
#2630

However, following the instructions in the thread did not solve the problem. Those match with the official docs:
https://github.com/awslabs/aws-crt-ruby

running a rails console crashes with the following error:
locally on an M1 mac: Could not open library 'libaws-crt-ffi.dylib'
docker on ruby:2.7.2-alpine: Could not open library 'libaws-crt-ffi.so': Error loading shared library libaws-crt-ffi.so: No such file or directory

Expected Behavior

I'd expect that adding these gems to a Gemfile

gem 'aws-sdk-s3'
gem 'aws-sigv4', '1.4.1.crt'

would allow to use Multi-Region access points via Aws::S3::Client

Current Behavior

M1 Mac
/Users/s/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/ffi-1.15.5/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/Users/s/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/aws-crt-0.1.6-arm64-darwin/bin/arm/libaws-crt-ffi.dylib': dlopen(/Users/s/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/aws-crt-0.1.6-arm64-darwin/bin/arm/libaws-crt-ffi.dylib, 0x0005): tried: '/Users/s/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/aws-crt-0.1.6-arm64-darwin/bin/arm/libaws-crt-ffi.dylib' (no such file), '/usr/local/lib/libaws-crt-ffi.dylib' (no such file), '/usr/lib/libaws-crt-ffi.dylib' (no such file). (LoadError)

ruby:2.7.2-alpine docker:
Could not open library 'libaws-crt-ffi.so': Error loading shared library libaws-crt-ffi.so: No such file or directory
Error loading shared library libaws-crt-ffi: No such file or directory.
LoadError: Could not open library '/usr/local/bundle/gems/aws-crt-0.1.6-x86_64-linux/bin/x86_64/libaws-crt-ffi.so': Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/bundle/gems/aws-crt-0.1.6-x86_64-linux/bin/x86_64/libaws-crt-ffi.so).

Reproduction Steps

Add the following lines to a Gemfile:

gem 'aws-sdk-s3'
gem 'aws-sigv4', '1.4.1.crt'

run
rails console

Possible Solution

No response

Additional Information/Context

No response

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sigv4

Environment details (Version of Ruby, OS environment)

ruby 2.7.2, rails 6.1.4.6, macOS Monterey 12.2, ruby:2.7.2-alpine docker

@sastromskis sastromskis added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 28, 2022
@mullermp
Copy link
Contributor

Thanks for opening an issue. It looks like it's an issue with compatibility - alpine I don't think is supported by CRT yet. Potential related issue - awslabs/aws-crt-ruby#43. Could you please add details or a new issue in aws-crt-ruby instead?

If you try a different architecture, try installing the latest aws-crt gem and the latest aws-sigv4 gem - do not use the CRT version of aws-sigv4 (developer preview version only - it's been merged into the latest aws-sigv4)

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@mullermp mullermp added dependencies This issue is a problem in a dependency. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies This issue is a problem in a dependency.
Projects
None yet
Development

No branches or pull requests

2 participants