cannot find -lgssapi_krb5 on 64 bit linux

1185 views
Skip to first unread message

mattalbright

unread,
Dec 4, 2008, 12:16:20 AM12/4/08
to Curb - Ruby libcurl Bindings
When I try to install the curb-0.2.4.0 gem on 64 bit CentOS, I get:

# gem install ./curb-0.2.4.0.gem
Building native extensions. This could take a while...
ERROR: Error installing ./curb-0.2.4.0.gem:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install ./curb-0.2.4.0.gem
checking for curl-config... yes
checking for curlinfo_redirect_time... yes
checking for curlinfo_response_code... yes
checking for curlinfo_filetime... yes
checking for curlinfo_redirect_count... yes
checking for curlinfo_os_errno... yes
checking for curlinfo_num_connects... yes
checking for curlinfo_ftp_entry_path... yes
checking for curl_version_ssl... yes
checking for curl_version_libz... yes
checking for curl_version_ntlm... yes
checking for curl_version_gssnegotiate... yes
checking for curl_version_debug... yes
checking for curl_version_asynchdns... yes
checking for curl_version_spnego... yes
checking for curl_version_largefile... yes
checking for curl_version_idn... yes
checking for curl_version_sspi... yes
checking for curl_version_conv... yes
checking for curlproxy_http... yes
checking for curlproxy_socks4... yes
checking for curlproxy_socks5... yes
checking for curlauth_basic... yes
checking for curlauth_digest... yes
checking for curlauth_gssnegotiate... yes
checking for curlauth_ntlm... yes
checking for curlauth_anysafe... yes
checking for curlauth_any... yes
checking for curle_tftp_notfound... yes
checking for curle_tftp_perm... yes
checking for curle_tftp_diskfull... yes
checking for curle_tftp_illegal... yes
checking for curle_tftp_unknownid... yes
checking for curle_tftp_exists... yes
checking for curle_tftp_nosuchuser... yes
creating curb_config.h
creating Makefile

make
Makefile:123: warning: overriding commands for target `/usr/lib/ruby/
gems/1.8/gems/curb-0.2.4.0/lib'
Makefile:121: warning: ignoring old commands for target `/usr/lib/ruby/
gems/1.8/gems/curb-0.2.4.0/lib'
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -g -
pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --
param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fPIC -Wall -c
curb_easy.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -g -
pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --
param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fPIC -Wall -c
curb_postfield.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -g -
pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --
param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fPIC -Wall -c
curb_multi.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -g -
pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --
param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fPIC -Wall -c
curb_errors.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -g -
pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --
param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fPIC -Wall -c
curb.c
gcc -shared -L"/usr/lib64" -o curb_core.so curb_easy.o
curb_postfield.o curb_multi.o curb_errors.o curb.o -lruby -lpthread -
ldl -lcrypt -lm -lc -L/usr/kerberos/lib64 -lcurl -lgssapi_krb5 -
lkrb5 -lk5crypto -lcom_err -lresolv -ldl -lidn -lssl -lcrypto -lz
/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.so when
searching for -lgssapi_krb5
/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.a when
searching for -lgssapi_krb5
/usr/bin/ld: cannot find -lgssapi_krb5
collect2: ld returned 1 exit status
make: *** [curb_core.so] Error 1

I can fix it by creating a bunch of missing /usr/lib64/foo.so files
(by linking to the /usr/lib64/foo.so.x files), but it seems like
there's something that can be done to the build/install config to fix
it. Did Redhat/CentOS really screw up and omit all the symbolic links
for all those 64 bit libraries? I had to create links for
gssapi_krb5, krb5, com_err, ssl, crypto, and z (and maybe a couple
more I'm forgetting).

Any ideas?

ruby-1.8.5-5.el5_2.3
rubygems-1.0.1
curl and curl-devel 7.15.5-2.el5

matt

taf2

unread,
Dec 4, 2008, 11:46:36 AM12/4/08
to Curb - Ruby libcurl Bindings
Here's what I get after installing CentOS 64bit.

ruby extconf.rb
checking for curl-config… yes
checking for curlinfo_redirect_time… yes
checking for curlinfo_response_code… yes
checking for curlinfo_filetime… yes
checking for curlinfo_redirect_count… yes
checking for curlinfo_os_errno… yes
checking for curlinfo_num_connects… yes
checking for curlinfo_ftp_entry_path… yes
checking for curl_version_ssl… yes
checking for curl_version_libz… yes
checking for curl_version_ntlm… yes
checking for curl_version_gssnegotiate… yes
checking for curl_version_debug… yes
checking for curl_version_asynchdns… yes
checking for curl_version_spnego… yes
checking for curl_version_largefile… yes
checking for curl_version_idn… yes
checking for curl_version_sspi… yes
checking for curl_version_conv… yes
checking for curlproxy_http… yes
checking for curlproxy_socks4… yes
checking for curlproxy_socks5… yes
checking for curlauth_basic… yes
checking for curlauth_digest… yes
checking for curlauth_gssnegotiate… yes
checking for curlauth_ntlm… yes
checking for curlauth_anysafe… yes
checking for curlauth_any… yes
checking for curle_tftp_notfound… yes
checking for curle_tftp_perm… yes
checking for curle_tftp_diskfull… yes
checking for curle_tftp_illegal… yes
checking for curle_tftp_unknownid… yes
checking for curle_tftp_exists… yes
checking for curle_tftp_nosuchuser… yes
creating curb_config.h
creating Makefile
[taf2@centos-test ext]$ make
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\”curb_config.h\” -fPIC -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector—param=ssp-
buffer-size=4 -m64 -mtune=generic -Wall -fno-strict-aliasing -fPIC -
Wall -c curb_errors.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\”curb_config.h\” -fPIC -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector—param=ssp-
buffer-size=4 -m64 -mtune=generic -Wall -fno-strict-aliasing -fPIC -
Wall -c curb_multi.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\”curb_config.h\” -fPIC -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector—param=ssp-
buffer-size=4 -m64 -mtune=generic -Wall -fno-strict-aliasing -fPIC -
Wall -c curb_postfield.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\”curb_config.h\” -fPIC -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector—param=ssp-
buffer-size=4 -m64 -mtune=generic -Wall -fno-strict-aliasing -fPIC -
Wall -c curb_easy.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/
x86_64-linux -I. -DRUBY_EXTCONF_H=\”curb_config.h\” -fPIC -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector—param=ssp-
buffer-size=4 -m64 -mtune=generic -Wall -fno-strict-aliasing -fPIC -
Wall -c curb.c
gcc -shared -L”/usr/lib64” -o curb_core.so curb_errors.o curb_multi.o
curb_postfield.o curb_easy.o curb.o -lruby -lpthread -ldl -lcrypt -lm -
lc -L/usr/kerberos/lib64 -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -
lcom_err -lresolv -ldl -lidn -lssl -lcrypto -lz
[taf2@centos-test ext]$ uname -a
Linux centos-test 2.6.24-19-xen #1 SMP Wed Aug 20 21:08:51 UTC 2008
x86_64×86_64×86_64 GNU/Linux

Matthew Albright

unread,
Dec 4, 2008, 3:22:01 PM12/4/08
to curb---ruby-li...@googlegroups.com
Yeah, I see the same thing.

I figured out what was wrong, in case anyone else runs in to this.  Turns out, I had the i386 versions of all the necessary -devel packages, but NOT the x86_64 versions.  I have no idea why that would be... the i386 rpms aren't required by anything else (rpm -q --whatrequires).

The following fixed it all up:

 yum -y install krb5-devel e2fsprogs-devel libidn-devel openssl-devel zlib-devel

matt
Reply all
Reply to author
Forward
0 new messages