[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Installing Curb Was: Re: ruby libcurl maintainer?

Jano Svitok

6/7/2007 5:16:00 PM

On 6/7/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
> Hello Mr. Ross Bamford,
>
> I am trying to install istall curb by trying this >gem install curb
> but it show me the following error message:
> -----------------------------------------
> C:\>gem install curb
> Need to update 1 gems from http://gems.rub...
> .
> complete
> Building native extensions. This could take a while...
> *** 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.
>
> 1 thing more, I am using windows xp insteed of linus and using ruby
> 1.8.5-2.1.

You need to have installed MSVC 6.0 to install this (and maybe something more).

If you want to do scraping (as your message at bugtracker implies) try
scrubyt/mechanize/hpricot - they are easier to install and should do
the job (they differ in abstraction level, in fact scrubyt uses
mechanize that in turn uses hpricot)

Jano

7 Answers

Md.elme focruzzaman Shuvo

6/8/2007 10:39:00 AM

0

Jano Svitok wrote:
> On 6/7/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
>> *** 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.
>>
>> 1 thing more, I am using windows xp insteed of linus and using ruby
>> 1.8.5-2.1.
>
> You need to have installed MSVC 6.0 to install this (and maybe something
> more).
>
> If you want to do scraping (as your message at bugtracker implies) try
> scrubyt/mechanize/hpricot - they are easier to install and should do
> the job (they differ in abstraction level, in fact scrubyt uses
> mechanize that in turn uses hpricot)
>
> Jano

Thank you Jano,

Can you please explain me the entire process of installing curb & why I
need to nstall MSVC6.0.

Regards,
Shuvo.

--
Posted via http://www.ruby-....

Jano Svitok

6/8/2007 11:53:00 AM

0

On 6/8/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
> Can you please explain me the entire process of installing curb & why I
> need to nstall MSVC6.0.

I don't know the precise installation process -- I haven't installed
it and I don't want to, and I don't have time to. ;-)

However (these are more or less generic c extension requirements):

1. you need msvc 6.0 because curb contains c extension - to compile it
you need a c compiler, and that must be the same as ruby was compiled
with, therefore msvc 6. Unfortunately, it's hard to obtain it if you
don't have it already. You can also try mingw, it should be
compatible.

2. you need libcurl installed before you can compile curb (that is
what does the work in the background)
(http://my.guardpuppy.com/libcurl-7.15.1-msvc-win32-ssl-0.9.8a-zlib...)

3. then, find vsvars32.bat (in the program files/ms vs/something,
start cmd.exe, exexute vsvars32.bat and after that you are ready to
issue gem install curb.

4. I know this because the errors you posted complained about missing
tools and looking at the package.


So as I said, if you are not familiar with C development, it's better
for you to either use unix, or choose another package
(scrubit/mechanize/etc). If you are at least a bit familiar, give it a
try...

Md.elme focruzzaman Shuvo

6/8/2007 12:59:00 PM

0

Jano Svitok wrote:
> On 6/8/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
>> Can you please explain me the entire process of installing curb & why I
>> need to nstall MSVC6.0.
>
> I don't know the precise installation process -- I haven't installed
> it and I don't want to, and I don't have time to. ;-)
>
> However (these are more or less generic c extension requirements):
>
> 1. you need msvc 6.0 because curb contains c extension - to compile it
> you need a c compiler, and that must be the same as ruby was compiled
> with, therefore msvc 6. Unfortunately, it's hard to obtain it if you
> don't have it already. You can also try mingw, it should be
> compatible.
>
> 2. you need libcurl installed before you can compile curb (that is
> what does the work in the background)
> (http://my.guardpuppy.com/libcurl-7.15.1-msvc-win32-ssl-0.9.8a-zlib...)
>
> 3. then, find vsvars32.bat (in the program files/ms vs/something,
> start cmd.exe, exexute vsvars32.bat and after that you are ready to
> issue gem install curb.
>
> 4. I know this because the errors you posted complained about missing
> tools and looking at the package.
>
>
> So as I said, if you are not familiar with C development, it's better
> for you to either use unix, or choose another package
> (scrubit/mechanize/etc). If you are at least a bit familiar, give it a
> try...

Thank You again Jano,

One thins again. I already use php curl & libcurlNET. I am familier with
C/C++ also.But never use libcurl in c/c++. So, do not know how can I
install it. I try to put libcurl.dll on the System32 dir but the result
is same.I do not want to built it again just want to use the
libcurl.dll. Can you please help me? How can I install libcurl on my
machine?

Regards,
Shuvo

--
Posted via http://www.ruby-....

Jano Svitok

6/8/2007 1:53:00 PM

0

On 6/8/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
> Jano Svitok wrote:
> > On 6/8/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
> >> Can you please explain me the entire process of installing curb & why I
> >> need to nstall MSVC6.0.
> >
> > I don't know the precise installation process -- I haven't installed
> > it and I don't want to, and I don't have time to. ;-)
> >
> > However (these are more or less generic c extension requirements):
> >
> > 1. you need msvc 6.0 because curb contains c extension - to compile it
> > you need a c compiler, and that must be the same as ruby was compiled
> > with, therefore msvc 6. Unfortunately, it's hard to obtain it if you
> > don't have it already. You can also try mingw, it should be
> > compatible.
> >
> > 2. you need libcurl installed before you can compile curb (that is
> > what does the work in the background)
> > (http://my.guardpuppy.com/libcurl-7.15.1-msvc-win32-ssl-0.9.8a-zlib...)
> >
> > 3. then, find vsvars32.bat (in the program files/ms vs/something,
> > start cmd.exe, exexute vsvars32.bat and after that you are ready to
> > issue gem install curb.
> >
> > 4. I know this because the errors you posted complained about missing
> > tools and looking at the package.
> >
> >
> > So as I said, if you are not familiar with C development, it's better
> > for you to either use unix, or choose another package
> > (scrubit/mechanize/etc). If you are at least a bit familiar, give it a
> > try...
>
> Thank You again Jano,
>
> One thins again. I already use php curl & libcurlNET. I am familier with
> C/C++ also.But never use libcurl in c/c++. So, do not know how can I
> install it. I try to put libcurl.dll on the System32 dir but the result
> is same.I do not want to built it again just want to use the
> libcurl.dll. Can you please help me? How can I install libcurl on my
> machine?

I suppose you have VC6 installed.

from the zip file I mentioned, you need: 1. header files, put them in
c:/program files/msvs/vc/inc/curl
2. libcurl.dll - put it somewhere on the path
3. libcurl_imp.lib - put it into msvs/vc.lib
maybe you'll need to rename it to curl.lib to match the gem config

After that, try again *from the vsvars environment* (I suppose you
should get another kind of message when you call gem from vc
environment.

J.

Md.elme focruzzaman Shuvo

6/8/2007 7:15:00 PM

0

Jano Svitok wrote:
> On 6/8/07, Md.elme focruzzaman Shuvo <shuvo.razi@gmail.com> wrote:
>> > 1. you need msvc 6.0 because curb contains c extension - to compile it
>> > start cmd.exe, exexute vsvars32.bat and after that you are ready to
>>
>> Thank You again Jano,
>>
>> One thins again. I already use php curl & libcurlNET. I am familier with
>> C/C++ also.But never use libcurl in c/c++. So, do not know how can I
>> install it. I try to put libcurl.dll on the System32 dir but the result
>> is same.I do not want to built it again just want to use the
>> libcurl.dll. Can you please help me? How can I install libcurl on my
>> machine?
>
> I suppose you have VC6 installed.
>
> from the zip file I mentioned, you need: 1. header files, put them in
> c:/program files/msvs/vc/inc/curl
> 2. libcurl.dll - put it somewhere on the path
> 3. libcurl_imp.lib - put it into msvs/vc.lib
> maybe you'll need to rename it to curl.lib to match the gem config
>
> After that, try again *from the vsvars environment* (I suppose you
> should get another kind of message when you call gem from vc
> environment.
>
> J.

Thanks Jano,

You are greate.But now I got the following error message:
--------------------------------------------------------

C:\Program Files\Microsoft Visual Studio\VC98\Bin>gem install curb
Bulk updating Gem source index for: http://gems.rub...
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install curb
checking for main() in curl.lib... yes
checking for curl/curl.h... yes
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

c:\ruby\bin\ruby -e "puts 'EXPORTS', 'Init_curb_core'" >
curb_core-i386
-mswin32.def
cl -nologo -I. -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -MD
-Zi -O2b2
xg- -G6 -DHAVE_CURL_CURL_H -c -Tccurb.c
curb.c
curb_easy.h(31) : error C2236: unexpected 'struct' '$S1'
curb_easy.h(31) : error C2027: use of undefined type '$S1'
curb_easy.h(31) : see declaration of '$S1'
curb.c(224) : error C2275: 'curl_version_info_data' : illegal use of
this type a
s an expression
C:\PROGRA~1\MIAF9D~1\VC98\INCLUDE\curl/curl.h(1394) : see
declaration of
'curl_version_info_data'
curb.c(224) : error C2065: 'ver' : undeclared identifier
curb.c(225) : error C2275: 'VALUE' : illegal use of this type as an
expression
c:/ruby/lib/ruby/1.8/i386-mswin32\ruby.h(86) : see declaration
of 'VALUE
'
curb.c(225) : error C2146: syntax error : missing ';' before identifier
'curlver
'
curb.c(225) : error C2065: 'curlver' : undeclared identifier
curb.c(225) : error C2065: 'curllongver' : undeclared identifier
curb.c(225) : error C2065: 'curlvernum' : undeclared identifier
curb.c(229) : error C2223: left of '->version' must point to
struct/union
curb.c(229) : error C2198: 'rb_str_new2' : too few actual parameters
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.


Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2 for
inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2/ext/gem_make.out
------------------------------------------------------------
I put the curl(the header fielse) on to C:\Program Files\Microsoft
Visual Studio\VC98\Include path. Rename libcur_imp.lib to curl.lib and
put it into C:\Program Files\Microsoft Visual Studio\VC98\Lib path. And
finally the libcurl.dll. I do not understand well where it I can put.
So, 1st I put it the path C:\Program Files\Microsoft Visual
Studio\VC98.After got the error message 1st time I put them
(libcurl.dll,libeay32.dll,ssleay32.dll & zlib1.dll) into the path
C:\Program Files\Microsoft Visual Studio\VC98\Include.I got the same
error message.And finally I put then into C:\Program Files\Microsoft
Visual Studio\VC98\Include\curl path and I got the same error
message.What is my misstake? I guss I have failed to put the libcurl.dll
into the right path. Please help me.

Regards,
Shuvo.


--
Posted via http://www.ruby-....

Jano Svitok

6/10/2007 9:35:00 PM

0

> C:\Program Files\Microsoft Visual Studio\VC98\Bin>gem install curb
> Bulk updating Gem source index for: http://gems.rub...
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
> ERROR: Failed to build gem native extension.
>
> ruby extconf.rb install curb
> checking for main() in curl.lib... yes
> checking for curl/curl.h... yes
> creating Makefile
>
> nmake
>
> Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
> Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
>
> c:\ruby\bin\ruby -e "puts 'EXPORTS', 'Init_curb_core'" >
> curb_core-i386
> -mswin32.def
> cl -nologo -I. -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -MD
> -Zi -O2b2
> xg- -G6 -DHAVE_CURL_CURL_H -c -Tccurb.c
> curb.c

These are compiler errors:

> curb_easy.h(31) : error C2236: unexpected 'struct' '$S1'
> curb_easy.h(31) : error C2027: use of undefined type '$S1'
> curb_easy.h(31) : see declaration of '$S1'

These are probably consequences of the above error.

> curb.c(224) : error C2275: 'curl_version_info_data' : illegal use of
> this type a
> s an expression
> C:\PROGRA~1\MIAF9D~1\VC98\INCLUDE\curl/curl.h(1394) : see
> declaration of
> 'curl_version_info_data'
> curb.c(224) : error C2065: 'ver' : undeclared identifier
> curb.c(225) : error C2275: 'VALUE' : illegal use of this type as an
> expression
> c:/ruby/lib/ruby/1.8/i386-mswin32\ruby.h(86) : see declaration
> of 'VALUE
> '
> curb.c(225) : error C2146: syntax error : missing ';' before identifier
> 'curlver
> '
> curb.c(225) : error C2065: 'curlver' : undeclared identifier
> curb.c(225) : error C2065: 'curllongver' : undeclared identifier
> curb.c(225) : error C2065: 'curlvernum' : undeclared identifier
> curb.c(229) : error C2223: left of '->version' must point to
> struct/union
> curb.c(229) : error C2198: 'rb_str_new2' : too few actual parameters
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
>
>
> Gem files will remain installed in
> c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2 for
> inspection.
> Results logged to
> c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2/ext/gem_make.out

> message.What is my misstake? I guss I have failed to put the libcurl.dll
> into the right path. Please help me.

Ok, you're doing good, you're on the right path. Now your compile
environment is right, you can compile.

The error you are facing is a problem somewhere in the sources, or in
the configuration. There's a bug filed that asks for support for
windows, so maybe it just doesn't work. I have looked at the sources,
and can't find that $S1, so I'm confused. I'll have a look tomorrow,
and maybe find something (I don't have a win box here).

In the meantime, you can try to remove the directory
(c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2/), and try again.

J.

Md.elme focruzzaman Shuvo

6/13/2007 11:15:00 AM

0

Jano Svitok wrote:
>>
>> xg- -G6 -DHAVE_CURL_CURL_H -c -Tccurb.c
>> curb.c
>
> These are compiler errors:
>
>> curb_easy.h(31) : error C2236: unexpected 'struct' '$S1'
>> curb_easy.h(31) : error C2027: use of undefined type '$S1'
>> curb_easy.h(31) : see declaration of '$S1'
>
> These are probably consequences of the above error.
>
>> of 'VALUE
>> NMAKE : fatal error U1077: 'cl' : return code '0x2'
>> Stop.
>>
>>
>> Gem files will remain installed in
>> c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2 for
>> inspection.
>> Results logged to
>> c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2/ext/gem_make.out
>
>> message.What is my misstake? I guss I have failed to put the libcurl.dll
>> into the right path. Please help me.
>
> Ok, you're doing good, you're on the right path. Now your compile
> environment is right, you can compile.
>
> The error you are facing is a problem somewhere in the sources, or in
> the configuration. There's a bug filed that asks for support for
> windows, so maybe it just doesn't work. I have looked at the sources,
> and can't find that $S1, so I'm confused. I'll have a look tomorrow,
> and maybe find something (I don't have a win box here).
>
> In the meantime, you can try to remove the directory
> (c:/ruby/lib/ruby/gems/1.8/gems/curb-0.1.2/), and try again.
>
> J.

Hello Jano,

Thank you for contineously helping me. I try it what you say but I got
the same error.Thanks.

Regards,
Shuvo

--
Posted via http://www.ruby-....