-
Notifications
You must be signed in to change notification settings - Fork 75
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
Plans for arm (Mac M1 to be exact)? #257
Comments
Ruby-oci8 doesn't support macOS Arm while Oracle instant client for macOS Arm isn't released. You need to use intel ruby for a while. As for Oracle Database on macOS, it runs on Linux Arm containers. Oracle client in the container isn't available outside of it.
|
thanks for your response! Am I able to run ruby-oci8 while using arm based oracle db container? |
Yes, you are enable to run Oracle database container as a server and ruby-oci8 for intel macOS as a client on one macOS Arm machine. |
Oracle Instant Client for macOS arm64 is out. I hope it works without ruby-oci8 code change. |
I've just installed EDIT: |
Hmm, looks like there may be an issue:
|
Thanks for running on macOS! I updated plthook. Could you try to use the latest revision in the master branch? Replace ruby-oci8 entry in
|
Hi, I was able to install it from the master branch but running it generates following error
|
Yeah, I get an error too:
|
Same here, but commenting out that line makes it work as expected. Only caveat I can see is that you won't have your tcp keepalive time set to 10 minutes as per this doc. |
I may have spoken too soon...
|
Thanks you all. I removed Oracle enhanced adapter ignores the exception. |
hi, I tried the update and still able to install it but getting the same error as before
|
The message was displayed by dyld (dynamic loader). After googling, I found https://www.rubyonmac.dev/how-to-fix-missing-symbol-called-when-running-rails-commands. |
Could you make a minimal reproducible example? |
@kubo I have tried to reproduce the issue, but to no avail... Read: Issue fixed, possibly because of system restart and/or messing around with exports in my terminal source file. Thank you for your assistance, I currently have no issues with arm64 ruby, arm64 macOS Oracle instant client and ruby-oci8 gem on latest Just an FYI: When I was seeing an issue, it was happening only at runtime for a Rails server and I wasn't able to reproduce it in a Rails console, with the same queries. (So, possibly something else was messing around with those memory locations, I'm not sure...) |
I'm also getting a "Hook error", although with a different error message:
I get this when trying to use
|
I have found a pretty interesting crash when running To reproduce minimally, place the 4 files from files.tgz somewhere: Then edit your Oracle connection into
This is as expected. Now look at the script. At the top there are some
If you uncomment any one of these, then instead of the previous behaviour, you should get a SIGSEGV:
This always happens at
Funnily, the line immediately previous to that is the same but for the username, and that works. This also happens when switching Now the funniest bit: if you move all those
These four gems are a small subset of those in my app; any other gem in that app does not trigger the problem when required before I don't have time to dig deeper at this moment, so will just dump my findings here. Tbh I am also a little bit at wits end of how to debug this further. Presumably those 4 somehow cause some monkey patching or overloading to happen, which then leads to the SIGSEGV in The workaround in my real app is to make sure
(Similarly in binaries like For context: this is a pretty old app and has been compiled and run on many environments (several different Linuxes; in CI/CD pipelines; in k8s containers; on an Intel Macbook Pro and on dedicated hardware servers running some weird special Linux). The issue only appeared on a fresh M3 install with the current (as of 07/2024) Oracle instantclient 23.3.0.23.09. |
@ekr1 macOS binary files built with default options work fine in the case. In https://forums.developer.apple.com/forums/thread/715385:
Ruby C extensions use the two-level namespace. $ xcrun dyld_info -fixups oci8lib_330.bundle
oci8lib_330.bundle [arm64]:
-fixups:
segment section address type target
__DATA_CONST __got 0x00020000 bind libSystem.B.dylib/___chkstk_darwin
__DATA_CONST __got 0x00020008 bind libSystem.B.dylib/___stack_chk_guard
__DATA_CONST __got 0x00020010 bind libruby.3.3.dylib/_rb_cFalseClass
__DATA_CONST __got 0x00020018 bind libruby.3.3.dylib/_rb_cFloat
__DATA_CONST __got 0x00020020 bind libruby.3.3.dylib/_rb_cInteger
__DATA_CONST __got 0x00020028 bind libruby.3.3.dylib/_rb_cNilClass
... However this feature is disabled by a linker option $ xcrun dyld_info -fixups libclntsh.dylib
libclntsh.dylib [arm64]:
-fixups:
segment section address type target
__DATA_CONST __got 0x02B78000 bind flat-namespace/_BZ2_blockSort
__DATA_CONST __got 0x02B78008 bind flat-namespace/_BZ2_bzCompress
__DATA_CONST __got 0x02B78010 bind flat-namespace/_BZ2_bzCompressEnd
__DATA_CONST __got 0x02B78018 bind flat-namespace/_BZ2_bzCompressInit
__DATA_CONST __got 0x02B78020 bind flat-namespace/_BZ2_bzDecompress
__DATA_CONST __got 0x02B78028 bind flat-namespace/_BZ2_bzDecompressEnd
... When |
ruby-oci8 2.2.13 was released. It runs on macOS arm. |
I'm still seeing infrequent crashes on my machine. I'm not sure if the crashes dump out to a file, but I can share them if I find them. |
Curious, are there plans for this gem to support arm? oracle db is now supporting images running on arm architectures already is there still a need for us to toggle between intel vs arm when installing ruby?
The text was updated successfully, but these errors were encountered: