Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-272

Cannot install CUBRID Ruby Driver on Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Ruby 9.2.0.0001
    • Component/s: Ruby Driver
    • Labels:
      None
    • Environment:

      Windows 7 64 bit

      Description

      I followed the tutorial described here:
      http://www.cubrid.org/wiki_apis/entry/cubrid-ruby-driver-installation-instructions

      When running "gem install cubrid", I get these messages:

      {code}
      Temporarily enhancing PATH to include DevKit...
      Building native extensions. This could take a while...
      ERROR: Error installing cubrid:
      ERROR: Failed to build gem native extension.

      C:/Ruby187/bin/ruby.exe extconf.rb
      checking for cci_init() in -lcascci... no
      *** 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=C:/Ruby187/bin/ruby
      --with-casccilib
      --without-casccilib
      cascci could not be found. Possibly you have not installed CUBRID Database yet.{code}

      Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/cubrid-0.64 for inspection.
      Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/cubrid-0.64/ext/gem_make.out

      I have CUBRID and CUBRID_DATABASES environment variables set correctly. I even tried moving cascci.dll or cascci.lib to various locations, but it didn't work either.

      Why does the installer not find the cubrid cascci library ?

        Activity

        Hide
        jinhu 李金虎 added a comment -

        Analysis:
        When running "gem install cubrid", the below command will be run:
        C:/Ruby187/bin/ruby.exe extconf.rb

        The above command will check the cascci library in $CUBRID/lib if in 32 bit OS or $CUBRID/lib64 if in 64 bit OS.

        This issue occurs in 64 bit Os, because the cascci library can't be found in $CUBRID/lib64. The lib64 directory dosen't exist.

        Solution:
        The cascci library should be always in $CUBRID/lib. So, change the extconf.rb to found out whether cascci exists in $CUBRID/lib.

        Show
        jinhu 李金虎 added a comment - Analysis: When running "gem install cubrid", the below command will be run: C:/Ruby187/bin/ruby.exe extconf.rb The above command will check the cascci library in $CUBRID/lib if in 32 bit OS or $CUBRID/lib64 if in 64 bit OS. This issue occurs in 64 bit Os, because the cascci library can't be found in $CUBRID/lib64. The lib64 directory dosen't exist. Solution: The cascci library should be always in $CUBRID/lib. So, change the extconf.rb to found out whether cascci exists in $CUBRID/lib.
        Hide
        kadishmal Esen Sagynov added a comment - - edited

        Alternatively, as discussed in this issue APIS-474, we can use a static CAS CCI instead of a dynamic one.

        Show
        kadishmal Esen Sagynov added a comment - - edited Alternatively, as discussed in this issue APIS-474 , we can use a static CAS CCI instead of a dynamic one.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        If we use static CAS CCI instead of a dynamic, ruby driver can not support gem on windows, because gem will use mingw to compile code,but cci is compile by vc2008,

        there is a link error. Now, perl driver use static CAS CCI instead of dynamic lib on linux,and use dynamic lib on windows.

        If cci can't offer mingw project,we can not use static CAS CCI instead of dynamic lib on windows.

        Show
        cn15800 谢韦华[Bert] added a comment - If we use static CAS CCI instead of a dynamic, ruby driver can not support gem on windows, because gem will use mingw to compile code,but cci is compile by vc2008, there is a link error. Now, perl driver use static CAS CCI instead of dynamic lib on linux,and use dynamic lib on windows. If cci can't offer mingw project,we can not use static CAS CCI instead of dynamic lib on windows.
        Hide
        kadishmal Esen Sagynov added a comment -

        Static CCI on Linux and dynamic on Windows is an acceptable solution I guess. Usually those who develop on Windows will probably have CUBRID installed, so they can use the dynamic CCI driver. For Linux it would be great to have a static CCI driver to remove CUBRID Server dependency.

        Show
        kadishmal Esen Sagynov added a comment - Static CCI on Linux and dynamic on Windows is an acceptable solution I guess. Usually those who develop on Windows will probably have CUBRID installed, so they can use the dynamic CCI driver. For Linux it would be great to have a static CCI driver to remove CUBRID Server dependency.
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Win7 32bit
        • CUBRID: 9.2.0.0134, 8.4.4.0227
        • Ruby: 1.9.3, 1.8.7
        • Driver: cubrid-ruby 8.4.4.0001, cubrid-ruby 9.2.0.0001 (20130821)

        Test Result: Pass

        Show
        ryin005 Ray Yin added a comment - Test OS: Win7 32bit CUBRID: 9.2.0.0134, 8.4.4.0227 Ruby: 1.9.3, 1.8.7 Driver: cubrid-ruby 8.4.4.0001, cubrid-ruby 9.2.0.0001 (20130821) Test Result: Pass

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ovidiu.veliscu Veliscu Ovidiu
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: