Closed allthesignals closed 2 years ago
@allthesignals
Could you run file /Users/mattgardner/.rbenv/versions/2.7.3/bin/ruby
?
If it prints Mach-O 64-bit executable arm64
, you need to install ruby compiled for intel mac and run it on Rosetta 2 until Oracle releases Oracle client for M1 chip. I don't know how to install ruby for intel mac on M1 mac.
If it prints Mach-O 64-bit executable x86_64
or Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
, could you run gem install ruby-oci8
on Rosetta 2 as follows? According to this Japanese page, clang creates x86_64 binary by default on Rosetta 2.
$ arch -x86_64 /bin/zsh
$ gem install ruby-oci8
@allthesignals Could you run
file /Users/mattgardner/.rbenv/versions/2.7.3/bin/ruby
?If it prints
Mach-O 64-bit executable arm64
, you need to install ruby compiled for intel mac and run it on Rosetta 2 until Oracle releases Oracle client for M1 chip. I don't know how to install ruby for intel mac on M1 mac.If it prints
Mach-O 64-bit executable x86_64
orMach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
, could you rungem install ruby-oci8
on Rosetta 2 as follows? According to this Japanese page, clang creates x86_64 binary by default on Rosetta 2.$ arch -x86_64 /bin/zsh $ gem install ruby-oci8
Perfect, thank you — this did the trick. I had all the pieces just couldn't put them together in the right order! Thanks again.
@allthesignals Can you detail out your steps? I'm using the same 19.8
instant client but I'm getting errors on the gem install ruby-oci8
step run under x86_64. Probably because my ruby is still arm.
Did you end up installing an entire intel ruby? I'm using RVM and haven't found a way to do that, though it appears to be somewhat architecture aware. You're using rbenv?
$ rvm list
ruby-2.6.9 [ arm64 ]
ruby-2.7.5 [ arm64 ]
=* ruby-3.0.3 [ arm64 ]
$ arch -x86_64 gem install ruby-oci8
...
oci8lib.c:408:10: error: implicit declaration of function 'rb_thread_blocking_region' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
rv = rb_thread_blocking_region((VALUE(*)(void*))parg->func, parg->data, oci8_unblock_func, parg->svcctx);
^
1 error generated.
I'm trying to install 2.2.9 on Big Sur with a 2021 MacBook (M1 chip). I think this is a related issue: https://github.com/kubo/ruby-oci8/issues/236.
I installed from homebrew and set OCI_DIR (/opt/oracle/instantclient_19_8)
Here is the mkmf.log: