apache / apache/arrow-adbc

Unable to install ruby red-adbc on Mac M1

Open
#1,253 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
627
Forks
217
Avg merge
17h
Merged PRs (30d)
57

Description

When I attempt to install the `red-adbc` gem , it fails.

```
gem install red-adbc
Building native extensions. This could take a while...
ERROR: Error installing red-adbc:
ERROR: Failed to build gem native extension.

current directory: /Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/gems/red-adbc-0.7.0/dependency-check
/Users/pstalcup/.rvm/rubies/ruby-3.2.2/bin/ruby -rrubygems /Users/pstalcup/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=/Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/extensions/arm64-darwin-22/3.2.0/red-adbc-0.7.0 RUBYLIBDIR\=/Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/extensions/arm64-darwin-22/3.2.0/red-adbc-0.7.0

rake failed, exit code 1

Gem files will remain installed in /Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/gems/red-adbc-0.7.0 for inspection.
Results logged to /Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/extensions/arm64-darwin-22/3.2.0/red-adbc-0.7.0/gem_make.out
```

I had similar failures for trying to install `red-arrow`, and was able to install it following a suggestion from https://github.com/apache/arrow/issues/14945#issuecomment-1352598282
However, when I attempt to apply the same technique it says
```
gem install red-adbc -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
Building native extensions with: '--with-ldflags=-Wl,-undefined,dynamic_lookup'
This could take a while...
ERROR: Error installing red-adbc:
ERROR: Failed to build gem native extension.

current directory: /Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/gems/red-adbc-0.7.0/dependency-check
/Users/pstalcup/.rvm/rubies/ruby-3.2.2/bin/ruby -rrubygems /Users/pstalcup/.rvm/rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=/Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/extensions/arm64-darwin-22/3.2.0/red-adbc-0.7.0 RUBYLIBDIR\=/Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/extensions/arm64-darwin-22/3.2.0/red-adbc-0.7.0 --with-ldflags\=-Wl,-undefined,dynamic_lookup
invalid option: --with-ldflags=-Wl,-undefined,dynamic_lookup

rake failed, exit code 1

Gem files will remain installed in /Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/gems/red-adbc-0.7.0 for inspection.
Results logged to /Users/pstalcup/.rvm/gems/ruby-3.2.2@tiosftr/extensions/arm64-darwin-22/3.2.0/red-adbc-0.7.0/gem_make.out
```
Is there any way I can install this gem?

Contributor guide

Open the contributing guide

Research direction

Start with the reported `gem install red-adbc` failure and inspect the `dependency-check` directory and the generated `gem_make.out` log for the native-extension error. Reproduce the install on a Mac M1 with Ruby 3.2.2, then confirm that `red-adbc` installs successfully without the invalid linker option.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.