In the gem's extconf.rb, there is a line which checks if there is a
"cascci" library like "if have_library("cascci", "cci_init")". The path
to cascci library is correctly set in "C:/CUBRID/lib", include files are
in "C:/CUBRID/include".

However, when I install cubrid gem using "gem install cubrid", or when I
compile it using "ruby extconf.rb" I got the following error:
------------------------------------------------
checking for cci_init() in -lcascci... no
cascci could not be found. Either you have not installed CUBRID Database
yet or the path to CUBRID is not set.
*** 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.
------------------------------------------------
have_library: checking for cci_init() in -lcascci... --------- no

I checked the path, it is correct, CUBRID is installed. I have
successfully installed both through gem and through manual compilation
the same cubrid gem on Windows 32 bit. But on x64 it fails.

How should I compile the gem under Windows x64? Should I have some
libraries for it? Why rubygem cannot find the library in x64? I suppose
some flags should be present to indicate that this is x64 machine. Or is
there anything else I should know?

> However, when I install cubrid gem using "gem install cubrid", or when I
> compile it using "ruby extconf.rb" I got the following error:
> ------------------------------------------------

Did you provide the above parameters?

When calling ruby extconf.rb, you can do them directly. When doing
with the gem, you need separate them with --

gem install cubrid -- --with-cascci-lib=C:/CUBRID/lib --with-cascci-
include=C:/CUBRID/include
> have_library: checking for cci_init() in -lcascci... --------- no
>
> I checked the path, it is correct, CUBRID is installed. I have
> successfully installed both through gem and through manual compilation
> the same cubrid gem on Windows 32 bit. But on x64 it fails.
>

Are you sure are supplying these parameters to the gem installation?
> How should I compile the gem under Windows x64? Should I have some
> libraries for it? Why rubygem cannot find the library in x64? I suppose
> some flags should be present to indicate that this is x64 machine. Or is
> there anything else I should know?

No, Ruby is 32bits, you don't need a 64bits cubrid library because is
not going to work (32bits Ruby needs 32bits libraries)
> Any help would be highly appreciated. Thank you in advance!
>

Something I noticed is that CUBRID libraries were compiled with newer
Visual C runtime libraries. That might have issues (or not, since
haven't installed it to test).

Please test the above suggestions for command line and let us know.

There should be no issue under x64 unless you installed CUBRID 64bits.

Luis Lavena wrote in post #949880:
> seems you have tried --with-cascci-lib=C:/CUBRID/lib --with-cascci-
> include=C:/CUBRID/include
> Did you provide the above parameters?

I did. In fact, extconf.rb automatically includes the path. But I tried
manually as well.
> When calling ruby extconf.rb, you can do them directly. When doing
> with the gem, you need separate them with --
> gem install cubrid -- --with-cascci-lib=C:/CUBRID/lib --with-cascci-
> include=C:/CUBRID/include

I have just tried this, but the same error:
"checking for cci_init() in -lcascci... no".
I don't understand, Ruby should at least see the library. If x64
compiled library is the problem, it should see it and say "not
compatible" or "not Win32" at least. But Ruby cannot find the library at
all.
> Are you sure are supplying these parameters to the gem installation?

Absolutely.
> No, Ruby is 32bits, you don't need a 64bits cubrid library because is
> not going to work (32bits Ruby needs 32bits libraries)

It's good to know this for sure.
> Something I noticed is that CUBRID libraries were compiled with newer
> Visual C runtime libraries. That might have issues (or not, since
> haven't installed it to test).

For building CUBRID on Windows, Visual Studio 2008 is used. I am not
sure about Ruby. I wonder how did you "noticed is that CUBRID libraries
were compiled with newer Visual C runtime libraries"? How is it possible
to notice?

Luis Lavena wrote in post #949882:
> You have CUBRID x64 installed. But Ruby is 32bits. That will not work.
> You can't mix 32bits Ruby with 64bits libraries.
> You need CUBRID 32bits libraries to compile against.

If so, how users use MySQL x64 with Ruby? I heard many cases downloading
third-party x64 compiled libmysql and successfully using it with Ruby.
So how is that possible if Ruby SHOULD NEVER work with x64 compiled
libraries? What about on Linux x64 with MySQL x64 and Ruby installed? It
just does not make any sense to me.

On Oct 13, 10:28 pm, Esen Sagynov <> wrote:
> Luis Lavena wrote in post #949880:
>
> > Something I noticed is that CUBRID libraries were compiled with newer
> > Visual C runtime libraries. That might have issues (or not, since
> > haven't installed it to test).
>
> For building CUBRID on Windows, Visual Studio 2008 is used. I am not
> sure about Ruby. I wonder how did you "noticed is that CUBRID libraries
> were compiled with newer Visual C runtime libraries"? How is it possible
> to notice?
>

That is a hint that it depends on newer MSVCRT library (MSVCR80.DLL
actually)
> Luis Lavena wrote in post #949882:
>
> > You have CUBRID x64 installed. But Ruby is 32bits. That will not work.
> > You can't mix 32bits Ruby with 64bits libraries.
> > You need CUBRID 32bits libraries to compile against.
>
> If so, how users use MySQL x64 with Ruby? I heard many cases downloading
> third-party x64 compiled libmysql and successfully using it with Ruby.
> So how is that possible if Ruby SHOULD NEVER work with x64 compiled
> libraries? What about on Linux x64 with MySQL x64 and Ruby installed? It
> just does not make any sense to me.
>

Simple: you can install MySQL x64, but you need a 32bits libmysql.dll
in your Ruby\bin directory. That is what Ruby mysql extension uses and
then it can communicate with a local or remote 32/64 bits MySQL, that
is not a problem.

Now, if you need to build the extension (which is something you're
doing), then you need a 32bits MySQL to be able to compile against.

To our bad, Windows lack the concept of universal binaries that can
provide in the same DLL both 32 and 64 bits linking.

And I know is too much to say this but trust me, I kind of know what
is involved in this 32/64 bits and specially the MySQL subject.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!