kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

Cygwin issue: makefile not working, not specifying which libs are missing #39

Closed HoneyryderChuck closed 11 years ago

HoneyryderChuck commented 11 years ago

I'm using Cygwin on Windows 7. I've most of the packages installed to make the ruby-c-extended gems work. Just having issues currently with this one. I tried to build it locally, as specified in one of your receipts. This is the output for calling make on it:

$ make ruby -w setup.rb config setup.rb:278: warning: assigned but unused variable - vname setup.rb:278: warning: assigned but unused variable - desc setup.rb:278: warning: assigned but unused variable - default2 setup.rb:109: Use RbConfig instead of obsolete and deprecated Config. ---> lib ---> lib/dbd <--- lib/dbd ---> lib/oci8 <--- lib/oci8 <--- lib ---> ext ---> ext/oci8 /usr/bin/ruby /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/extconf.rb checking for load library path... PATH... checking /usr/local/bin... no checking /usr/bin... no checking /cygdrive/c/Program Files (x86)/HP SimplePass 2012... no checking /cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64... no checking /cygdrive/c/Program Files (x86)/AMD APP/bin/x86... no checking /cygdrive/c/Program Files/Broadcom/Broadcom 802.11/Driver... no checking /cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live... no checking /cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live... no checking /cygdrive/c/Windows/system32... no checking /cygdrive/c/Windows... no checking /cygdrive/c/Windows/System32/Wbem... no checking /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0... no checking /cygdrive/c/Program Files (x86)/Windows Live/Shared... no checking /cygdrive/c/Program Files/WIDCOMM/Bluetooth Software... no checking /cygdrive/c/Program Files/WIDCOMM/Bluetooth Software/syswow64... no checking /cygdrive/c/Program Files/Broadcom/WHL... no checking /cygdrive/c/Program Files/Broadcom/WHL/syswow64... no checking /cygdrive/c/Program Files/Broadcom/WHL/SysWow64... no checking /cygdrive/c/Program Files/Broadcom/WHL/SysWow64/syswow64... no checking /cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static... no checking /cygdrive/c/Program Files (x86)/Intel/Services/IPT... no checking /usr/bin... no checking /cygdrive/c/RailsInstaller/Git/cmd... no checking /cygdrive/c/RailsInstaller/Ruby1.9.3/bin... no checking /cygdrive/c/Program Files (x86)/Git/bin... no checking /cygdrive/c/Program Files/Java/jdk1.7.0_07/bin... no checking /cygdrive/c/bin... no checking /usr/lib/lapack... no checking for cc... ok checking for gcc... yes checking for LP64... no checking for sys/types.h... yes

checking for ruby header... ok

Error Message: MiniRegistry::MiniRegistryError Backtrace: /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:56:in enum_homes' /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:785:inget_home' /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:703:in initialize' /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:319:innew' /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:319:in `get'

/home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/extconf.rb:18:in `
'

See:

* /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/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}/ --with-make-prog --without-make-prog --srcdir=/home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8 --curdir --ruby=/usr/bin/ruby --with-instant-client --without-instant-client /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:56:in enum_homes': RuntimeError (RuntimeError) from /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:785:inget_home' from /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:703:in initialize' from /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:319:innew' from /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/oraconf.rb:319:in get' from /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/extconf.rb:18:in

' 'system /usr/bin/ruby /home/Tiago/Projects/ruby-oci8-2.1.2/ext/oci8/extconf.rb ' failed Try 'ruby setup.rb --help' for detailed usage. Makefile:8: recipe for target `config.save' failed make: *\ [config.save] Error 1

By the way, the RailsInstaller issue stating a 'no' is puzzling because in cygwin I should be using cygwin's ruby.

kubo commented 11 years ago

What type of Oracle client do you use? If it is a full client, look at http://ruby-oci8.rubyforge.org/en/file.install-instant-client.html. If it is a instant client, look at http://ruby-oci8.rubyforge.org/en/file.install-instant-client.html. The cygwin ruby is a 32-bit application. The Oracle client bitness must be 32.

By the way, the RailsInstaller issue stating a 'no' is puzzling because in cygwin I should be using cygwin's ruby.

What is "the RailsInstaller issue"?

HoneyryderChuck commented 11 years ago

Sorry for the late reply. Encountered other issues that were more prioritary than oci8 and delayed it until now.

I installed the instant client. That is, I installed the basiclite package, plus sql-plus and SDK as it was stated in the page. I added all the package dirs to PATH. Same error.

HoneyryderChuck commented 11 years ago

Hi, somehow managed to make it work. Seems that I wasn't setting the right platform for my windows7 cygwin (platform should be mswin, mingw, by the way) on the Gemfile, and it was trying to compile the regular gem.

kubo commented 11 years ago

Could you post the output of make again? It outputs the following lines if the instant client is installed at c:\instantclient_11_2 and PATH is correctly added,

checking for load library path...
  PATH...
    checking /cygdrive/c/instantclient_11_2... yes
  /cygdrive/c/instantclient_11_2/oci.dll looks like an instant client.
HoneyryderChuck commented 11 years ago

it does find my instant client, but since it's not a win version of the gem being compiled, it fails. I came around the issue installing the mingw version of it. Just now my Gemfile looks ugly. Windows sucks, I know :)