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 compile on macos bigsur #228

Open
coding-bunny opened this issue Jan 18, 2021 · 4 comments
Open

Unable to compile on macos bigsur #228

coding-bunny opened this issue Jan 18, 2021 · 4 comments

Comments

@coding-bunny
Copy link

Hello,

I'm unable to get the client to compile under macos bigsur.
I have the Oracle Instant Client v12 installed as we use this for other projects well, but one legacy project seems to have issues installing this properly.

The project originally uses ruby-oci8 2.1.5 on Ruby 1.9.3 (Old I Know)

When not setting any ENV vars, this is what happens:

Fetching ruby-oci8 2.1.5
Installing ruby-oci8 2.1.5 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/olivar/.rbenv/versions/1.9.3-p551/bin/ruby extconf.rb --with-instant-client=/usr/local/opt/oracle-instant-client
=======================================================

  '--with-instant-client' is an obsolete option. ignore it.

=======================================================
checking for load library path... 
  DYLD_LIBRARY_PATH is not set.
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for sys/types.h... yes
checking for ruby header... ok
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/Users/olivar/.rbenv/versions/1.9.3-p551/bin/ruby
        --with-instant-client
/Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:889:in `get_home': RuntimeError (RuntimeError)
        from /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:705:in `initialize'
        from /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new'
        from /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get'
        from extconf.rb:18:in `<main>'
---------------------------------------------------
Error Message:
  Set the environment variable ORACLE_HOME if Oracle Full Client.
  Append the path of Oracle client libraries to DYLD_LIBRARY_PATH if Oracle Instant Client.
  
Backtrace:
  /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:889:in `get_home'
  /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:705:in `initialize'
  /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new'
  /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get'
  extconf.rb:18:in `<main>'
---------------------------------------------------
See:
 * http://ruby-oci8.rubyforge.org/en/HowToInstall.html
 * http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html



Gem files will remain installed in /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5 for inspection.
Results logged to /Users/olivar/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.1.5/ext/oci8/gem_make.out

An error occurred while installing ruby-oci8 (2.1.5), and Bundler cannot continue.
Make sure that `gem install ruby-oci8 -v '2.1.5' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  oracle_query was resolved to 0.1.6, which depends on
    ruby-oci8

  • Setting the DYLD_LIBRARY_PATH to the lib folder of the client doesn't do anything
  • Setting the OCI_DIR doesn't seem to help either
  • Upgrading the gem produces the same errors
  • Setting the --with-instant-client doens't solve the problem either.

Not sure if this is a client problem or a macos Big Sur issue.

@kubo
Copy link
Owner

kubo commented Jan 18, 2021

Is it Intel Mac? Otherwise, M1 Mac?

How did you install instant client?
It is installed at /usr/local/opt/oracle-instant-client?
Let me know file names in the directory by ls -l /usr/local/opt/oracle-instant-client?

@coding-bunny
Copy link
Author

This is an Intel Mac.
The client is installed with Homebrew, we have our custom tap, but the principle is exactly the same as described in the documentation for homebrew, we just have the files hosted ourselves.

brew --prefix oracle-instant-client
/usr/local/opt/oracle-instant-client
ls -l /usr/local/opt/oracle-instant-client
lrwxr-xr-x  1 olivar  admin  42 Jan 18 10:29 /usr/local/opt/oracle-instant-client -> ../Cellar/oracle-instant-client/12.2.0.1.0

@kubo
Copy link
Owner

kubo commented Jan 18, 2021

Instant client 12.2.0.1.0 is too old. It doesn't run on Big Sur.

Could you use instant client 19.8?
See https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html#ic_osx_inst

@coding-bunny
Copy link
Author

I'll have to run this through our teams as this will have a major impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants