-
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
fails to load oci.dll on windows x64/msys2 rub 3.1.4p223 after update of msys2 #254
Comments
to sum up: work on ruby 3.1.4 with msys2 shipped with work on ruby 3.2.2 with current msys2 updated the same way so the problem seems to be generated after applying the msys2 update (list of package updated listed in previous post) Serge |
after testing, the problem appear after updating the packages:
the log: perhaps some problem with gcc libs between v12 and 13 ? downgrading those 2 packages |
I tried it one more time on ruby 3.1.4.
And this time it work! Hope this can help someone. |
thanks, I have some notes on: https://notepad.onghu.com/2021/ruby-oracle-oci-windows-sequel/ and will try to describe your issue and solution there, in case it shows up in search results at some point for others. |
I assume that the .so module of this gem was compiled with gcc12 and that there is a compatibility issue with the msys2 libs that have migrated to gcc13. A compilation solves the problem. With ruby 3.2 this problem does not exist. |
For a long time I used this gem (ruby-oci8-2.2.12-x64-mingw-ucrt) on windows10 (latest version and patch) to connect to a Oracle11 DB located on a linux server.
I update the msys2 subsystem with
ridk exec pacman -S -u -y
2 or times in a month.And now this gem won't load.
I checked with a simple:
ruby -r oci8 -e "OCI8.new('dbpresenter', 'dbpresenter',' sk-oracle1.sk.loc/XE).exec('select login from users') do |r| puts r.join(','); end"
and it fail with
D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8/check_load_error.rb:60:in
block in check_os_specific_load_error': Cannot find DLLs depended by D:\program\Oracle\x64\instantclient_18_5\OCI.DLL. (LoadError)See http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-instant-client.md#Windows
from D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8/check_load_error.rb:48:in
each' from D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8/check_load_error.rb:48:in
check_os_specific_load_error'from D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8/check_load_error.rb:138:in
check_load_error' from D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8.rb:115:in
rescue in <top (required)>'from D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8.rb:113:in
<top (required)>' from <internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160:in
require'from internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:160:in
rescue in require' from <internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in
require'internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in
require': 126: Le module spÚcifiÚ est introuvable. - D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8lib_310.so (LoadError) from <internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
require'from D:/program/Ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-oci8-2.2.12-x64-mingw-ucrt/lib/oci8.rb:112:in
<top (required)>' from <internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160:in
require'from internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:160:in
rescue in require' from <internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:149:in
require'internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in
require': cannot load such file -- oci8 (LoadError) from <internal:D:/program/Ruby/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
require'`
I checked that the correct Visual C++ runtime library is installed.
It fails with all supported versions of InstantClient!
I did remove the 314p2223 version and msys2 from the system and reinstalled it with the this package:
https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.4-1/rubyinstaller-devkit-3.1.4-1-x64.exe
the msys subsystem is:
D:\Dvlt\ruby\projects\_active>ridk exec uname -a MINGW64_NT-10.0-19045 SK-XPS 3.4.6.x86_64 2023-02-15 18:03 UTC x86_64 Msys
installed the ruby-oci8 gem:
D:\Dvlt\ruby\projects\_active>gem install ruby-oci8 Fetching ruby-oci8-2.2.12-x64-mingw-ucrt.gem Successfully installed ruby-oci8-2.2.12-x64-mingw-ucrt 1 gem installed
After that oci.dll is correctly loaded!
ruby -r oci8 -e "OCI8.new('dbpresenter', 'dbpresenter',' sk-oracle1.sk.loc/XE).exec('select login from users') do |r| puts r.join(','); end"
After upgrading msys2, it fail.
So, some library break ruby-oci8, but I don't have any clue about it. (the latest time it was running was may the 8)
the msys2 updates:
On ruby 3.2.2 it work with the laatest msys update:
D:\Dvlt\ruby\projects\_active>ridk
exec uname -aMINGW64_NT-10.0-19045 SK-XPS 3.4.6.x86_64 2023-04-01 11:43 UTC x86_64 Msys`
Could you help me about this problem?
regards
The text was updated successfully, but these errors were encountered: