Topic: gem install curb errors

Hi,

I am trying to install curb on a RHEL 4 server and I get the following errors:

# gem install curb
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 -lcurl... yes
checking for curl/curl.h... yes
creating Makefile

make
Makefile:129: warning: overriding commands for target `/usr/local/lib/ruby/gems/1.8/gems/curb-0.1.2/lib'
Makefile:127: warning: ignoring old commands for target `/usr/local/lib/ruby/gems/1.8/gems/curb-0.1.2/lib'
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_CURL_CURL_H  -fPIC -g -O2 -Wall  -c curb.c
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_CURL_CURL_H  -fPIC -g -O2 -Wall  -c curb_easy.c
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_CURL_CURL_H  -fPIC -g -O2 -Wall  -c curb_postfield.c
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_CURL_CURL_H  -fPIC -g -O2 -Wall  -c curb_errors.c
curb_errors.c: In function `raise_curl_easy_error_exception':
curb_errors.c:302: error: `CURLE_SEND_FAIL_REWIND' undeclared (first use in this function)
curb_errors.c:302: error: (Each undeclared identifier is reported only once
curb_errors.c:302: error: for each function it appears in.)
curb_errors.c:305: error: `CURLE_SSL_ENGINE_INITFAILED' undeclared (first use in this function)
curb_errors.c:308: error: `CURLE_LOGIN_DENIED' undeclared (first use in this function)
make: *** [curb_errors.o] Error 1


Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/curb-0.1.2 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/curb-0.1.2/ext/gem_make.out

I've tried googling for the errors but not managed to find anything. Does anyone know what the problem is?

Thanks

Re: gem install curb errors

Fixed this, had to install the latest curl into a different folder (so not to conflict with the existing install), then manually download curb, edit the Makefile curl lib path and use rake to install with the custom path.

Re: gem install curb errors

can you specify the command? I'm trying to install curb-0.1.4 manually and nothing was installed (did gem list and curb wasn't found).

Here is what I did:
download latest curl-7.17.1 and installed it under /opt/curl
dowload curb src file, and used the following command:
rake install EXTCONF_OPTS='--with-curl-dir=/tmp/curl'

Here is the output:
have_library: checking for main() in -lcurl... -------------------- yes

"gcc -o conftest -I. -I/opt/ruby/lib/ruby/1.8/i686-linux -I. -I/opt/curl/include  -g -O2 conftest.c  -L'/opt/ruby/lib' -Wl,-R'/opt/ruby/lib' -L'/opt/curl/lib' -Wl,-R'/opt/curl/lib'  -rdynamic -Wl,-export-dynamic     -lruby-static -lcurl  -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

--------------------

have_header: checking for curl/curl.h... -------------------- yes

"gcc -E -I. -I/opt/ruby/lib/ruby/1.8/i686-linux -I. -I/opt/curl/include  -g -O2  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <curl/curl.h>
/* end */

--------------------

"gcc -I. -I/opt/ruby/lib/ruby/1.8/i686-linux -I. -I/opt/curl/include  -g -O2  -Wall -c conftest.c"
checked program was:
/* begin */
1: int main() { return 0; }
/* end */