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

redhat linux install fails with error "extconf.rb:160:in `<main>': uninitialized constant CONFTEST (NameError)" #234

Open
dub357 opened this issue May 7, 2021 · 2 comments

Comments

@dub357
Copy link

dub357 commented May 7, 2021

[root@dbl2 ~]# gem install ruby-oci8
Building native extensions. This could take a while...
ERROR: Error installing ruby-oci8:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb

attempting to locate oracle-instantclient...
checking load library path...
LD_LIBRARY_PATH...
checking /dbo/oracle/product/18.3/lib... yes
/dbo/oracle/product/18.3/lib/libclntsh.so.10.1 looks like a full client.
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for sys/types.h... yes
checking for ruby header... ok
Get the version of Oracle from SQL*Plus... 1800
try -I/dbo/oracle/product/18.3/rdbms/public
checking for oci.h... yes
checking for OCIEnvCreate() in oci.h... yes
checking for OCI_MAJOR_VERSION in oci.h... 18
checking for OCI_MINOR_VERSION in oci.h... 13
checking for localtime_r()... yes
checking for dladdr()... yes
checking for dlmodinfo()... no
checking for dlgetname()... no
checking for ruby/thread.h... yes
checking for rb_class_superclass() in ruby.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_sym2str() in ruby.h... no
checking for plthook... *** 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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-instant-client
--without-instant-client
--with-instant-client-dir
--without-instant-client-dir
--with-instant-client-include
--without-instant-client-include=${instant-client-dir}/include
--with-instant-client-lib
--without-instant-client-lib=${instant-client-dir}/
--with-oracle-version
--without-oracle-version
--with-runtime-check
--without-runtime-check
extconf.rb:160:in `

': uninitialized constant CONFTEST (NameError)

Gem files will remain installed in /usr/local/share/gems/gems/ruby-oci8-2.2.9 for inspection.
Results logged to /usr/local/share/gems/gems/ruby-oci8-2.2.9/ext/oci8/gem_make.out
)

Linux version:
[root@dbl2 ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterpriseWorkstation
Description: Red Hat Enterprise Linux Workstation release 7.9 (Maipo)
Release: 7.9
Codename: Maipo

@kubo
Copy link
Owner

kubo commented May 8, 2021

Could you use ruby 2.1.0 or later?
Otherwise, could you replace this line with FileUtils.rm_f("conftest.#{$OBJEXT}")?

@dub357
Copy link
Author

dub357 commented May 8, 2021

I'm not sure what Ruby 2.1.0 would do to fix this but I can try a bit later. In the meantime, I tried 2.1.8 based on the README note "Use ruby-oci8 2.1.8 for ruby 1.8" and it installed successfully.

[root@dbl2 ~]# gem install ruby-oci8 --version 2.1.8
Fetching: ruby-oci8-2.1.8.gem (100%)
Building native extensions. This could take a while...
Successfully installed ruby-oci8-2.1.8
Parsing documentation for ruby-oci8-2.1.8
Installing ri documentation for ruby-oci8-2.1.8
1 gem installed

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