Skip to content

Unable to compile on macos bigsur #228

@coding-red-panda

Description

@coding-red-panda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions