From: Xeno Campanoli on 28 Dec 2009 17:43 # gem install ruby-ldap Building native extensions. This could take a while... ERROR: Error installing ruby-ldap: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --with-ldap-dir=/usr --with-openldap2 checking for ldap.h... yes checking for lber.h... yes checking for ldap_ssl.h... no checking for openssl/ssl.h... yes checking for openssl/crypto.h... yes checking for main() in -lcrypto... yes checking for main() in -lssl... yes checking for main() in -lnsl... yes checking for main() in -lpthread... yes checking for main() in -lresolv... yes checking for main() in -llber... yes checking for main() in -lldap_r... yes checking for main() in -lldap... yes checking for ldap_init()... yes checking for ldap_set_option()... yes checking for ldap_get_option()... yes checking for ldap_start_tls_s()... yes checking for ldap_memfree()... yes checking for ldap_perror()... yes checking for ldap_sort_entries()... yes checking for ldapssl_init()... no checking for ldap_sslinit()... no checking for ldap_sasl_bind_s()... yes checking for ldap_compare_s()... yes checking for ldap_add_ext_s()... yes checking for ldap_compare_ext_s()... yes checking for ldap_delete_ext_s()... yes checking for ldap_modify_ext_s()... yes checking for ldap_search_ext_s()... yes checking for ldap_unbind_ext_s()... yes checking for ldap_sasl_interactive_bind_s()... yes creating Makefile make gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DUSE_OPENLDAP2 -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H -DHAVE_LBER_H -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_CRYPTO_H -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_GET_OPTION -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S -DHAVE_LDAP_COMPARE_S -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S -DHAVE_LDAP_DELETE_EXT_S -DHAVE_LDAP_MODIFY_EXT_S -DHAVE_LDAP_SEARCH_EXT_S -DHAVE_LDAP_UNBIND_EXT_S -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S -DRUBY_VERSION_CODE=185 -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 -c ldap.c gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DUSE_OPENLDAP2 -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H -DHAVE_LBER_H -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_CRYPTO_H -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_GET_OPTION -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S -DHAVE_LDAP_COMPARE_S -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S -DHAVE_LDAP_DELETE_EXT_S -DHAVE_LDAP_MODIFY_EXT_S -DHAVE_LDAP_SEARCH_EXT_S -DHAVE_LDAP_UNBIND_EXT_S -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S -DRUBY_VERSION_CODE=185 -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 -c misc.c misc.c: In function �rb_ldap_get_apiinfo�: misc.c:56: warning: implicit declaration of function �RARRAY_LEN� misc.c:60: warning: implicit declaration of function �RARRAY_PTR� misc.c:60: error: subscripted value is neither array nor pointer misc.c:61: warning: implicit declaration of function �RSTRING_LEN� misc.c:61: warning: implicit declaration of function �RSTRING_PTR� misc.c:61: warning: passing argument 2 of �__builtin___memcpy_chk� makes pointer from integer without a cast misc.c:61: warning: passing argument 2 of �__memcpy_ichk� makes pointer from integer without a cast misc.c:64: warning: passing argument 2 of �__builtin___memcpy_chk� makes pointer from integer without a cast misc.c:64: warning: passing argument 2 of �__memcpy_ichk� makes pointer from integer without a cast misc.c: In function �rb_ldap_control_set_value�: misc.c:164: warning: passing argument 2 of �__builtin___memcpy_chk� makes pointer from integer without a cast misc.c:164: warning: passing argument 2 of �__memcpy_ichk� makes pointer from integer without a cast misc.c: In function �rb_ldap_control_set_oid�: misc.c:237: warning: passing argument 2 of �__builtin___memcpy_chk� makes pointer from integer without a cast misc.c:237: warning: passing argument 2 of �__memcpy_ichk� makes pointer from integer without a cast make: *** [misc.o] Error 1 Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/ruby-ldap-0.9.9 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/ruby-ldap-0.9.9/gem_make.out # I have tried to install all the yum openssl and openldap stuff that seems reasonable, but still get the above. xc -- "It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member
From: Xeno Campanoli on 28 Dec 2009 18:47 I guess it might be helpful to add that, though one file and two methods are listed as not found, more help would be desireable if these being missing imply some package I need to yum install or something. I have tried all the various openssl and openldap thingies, including the -devel packages, and all that stuff seems to be in there in good stead. This is CentOS 5 if that helps, as well as it's standard pieces for the recent installs. That reminds me...I'll try a yum update right now just in case that fixes it...nope, I did a complete yum update, and rebooted, and the gem install still fails the same way...Anyone? Xeno Campanoli wrote: > # gem install ruby-ldap > Building native extensions. This could take a while... > ERROR: Error installing ruby-ldap: > ERROR: Failed to build gem native extension. > > /usr/bin/ruby extconf.rb > --with-ldap-dir=/usr > --with-openldap2 > checking for ldap.h... yes > checking for lber.h... yes > checking for ldap_ssl.h... no > checking for openssl/ssl.h... yes > checking for openssl/crypto.h... yes > checking for main() in -lcrypto... yes > checking for main() in -lssl... yes > checking for main() in -lnsl... yes > checking for main() in -lpthread... yes > checking for main() in -lresolv... yes > checking for main() in -llber... yes > checking for main() in -lldap_r... yes > checking for main() in -lldap... yes > checking for ldap_init()... yes > checking for ldap_set_option()... yes > checking for ldap_get_option()... yes > checking for ldap_start_tls_s()... yes > checking for ldap_memfree()... yes > checking for ldap_perror()... yes > checking for ldap_sort_entries()... yes > checking for ldapssl_init()... no > checking for ldap_sslinit()... no > checking for ldap_sasl_bind_s()... yes > checking for ldap_compare_s()... yes > checking for ldap_add_ext_s()... yes > checking for ldap_compare_ext_s()... yes > checking for ldap_delete_ext_s()... yes > checking for ldap_modify_ext_s()... yes > checking for ldap_search_ext_s()... yes > checking for ldap_unbind_ext_s()... yes > checking for ldap_sasl_interactive_bind_s()... yes > creating Makefile > > make > gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DUSE_OPENLDAP2 > -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H > -DHAVE_LBER_H -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_CRYPTO_H > -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_GET_OPTION > -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR > -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S -DHAVE_LDAP_COMPARE_S > -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S -DHAVE_LDAP_DELETE_EXT_S > -DHAVE_LDAP_MODIFY_EXT_S -DHAVE_LDAP_SEARCH_EXT_S > -DHAVE_LDAP_UNBIND_EXT_S -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S > -DRUBY_VERSION_CODE=185 -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 -c ldap.c > gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DUSE_OPENLDAP2 > -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H > -DHAVE_LBER_H -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_CRYPTO_H > -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_GET_OPTION > -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR > -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S -DHAVE_LDAP_COMPARE_S > -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S -DHAVE_LDAP_DELETE_EXT_S > -DHAVE_LDAP_MODIFY_EXT_S -DHAVE_LDAP_SEARCH_EXT_S > -DHAVE_LDAP_UNBIND_EXT_S -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S > -DRUBY_VERSION_CODE=185 -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 -c misc.c > misc.c: In function �rb_ldap_get_apiinfo�: > misc.c:56: warning: implicit declaration of function �RARRAY_LEN� > misc.c:60: warning: implicit declaration of function �RARRAY_PTR� > misc.c:60: error: subscripted value is neither array nor pointer > misc.c:61: warning: implicit declaration of function �RSTRING_LEN� > misc.c:61: warning: implicit declaration of function �RSTRING_PTR� > misc.c:61: warning: passing argument 2 of �__builtin___memcpy_chk� makes > pointer from integer without a cast > misc.c:61: warning: passing argument 2 of �__memcpy_ichk� makes pointer > from integer without a cast > misc.c:64: warning: passing argument 2 of �__builtin___memcpy_chk� makes > pointer from integer without a cast > misc.c:64: warning: passing argument 2 of �__memcpy_ichk� makes pointer > from integer without a cast > misc.c: In function �rb_ldap_control_set_value�: > misc.c:164: warning: passing argument 2 of �__builtin___memcpy_chk� > makes pointer from integer without a cast > misc.c:164: warning: passing argument 2 of �__memcpy_ichk� makes pointer > from integer without a cast > misc.c: In function �rb_ldap_control_set_oid�: > misc.c:237: warning: passing argument 2 of �__builtin___memcpy_chk� > makes pointer from integer without a cast > misc.c:237: warning: passing argument 2 of �__memcpy_ichk� makes pointer > from integer without a cast > make: *** [misc.o] Error 1 > > > Gem files will remain installed in > /usr/lib64/ruby/gems/1.8/gems/ruby-ldap-0.9.9 for inspection. > Results logged to > /usr/lib64/ruby/gems/1.8/gems/ruby-ldap-0.9.9/gem_make.out > # > > I have tried to install all the yum openssl and openldap stuff that > seems reasonable, but still get the above. > > xc > -- "It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member
From: Eric Wong on 28 Dec 2009 23:30 Xeno Campanoli <xeno.campanoli(a)gmail.com> wrote: > misc.c: In function 'rb_ldap_get_apiinfo': > misc.c:56: warning: implicit declaration of function 'RARRAY_LEN' > misc.c:60: warning: implicit declaration of function 'RARRAY_PTR' > misc.c:60: error: subscripted value is neither array nor pointer > misc.c:61: warning: implicit declaration of function 'RSTRING_LEN' > misc.c:61: warning: implicit declaration of function 'RSTRING_PTR' Hi Xeno, it looks like the code was ported to work with Ruby 1.9 and didn't bother maintaining 1.8.5 (or 1.8.6?) compatibility. What happens when you add the following to misc.c? #ifndef RSTRING_PTR # define RSTRING_PTR(s) (RSTRING(s)->ptr) #endif #ifndef RSTRING_LEN # define RSTRING_LEN(s) (RSTRING(s)->len) #endif -- Eric Wong
From: Xeno Campanoli on 29 Dec 2009 13:39 Eric Wong wrote: > Xeno Campanoli <xeno.campanoli(a)gmail.com> wrote: >> misc.c: In function 'rb_ldap_get_apiinfo': >> misc.c:56: warning: implicit declaration of function 'RARRAY_LEN' >> misc.c:60: warning: implicit declaration of function 'RARRAY_PTR' >> misc.c:60: error: subscripted value is neither array nor pointer >> misc.c:61: warning: implicit declaration of function 'RSTRING_LEN' >> misc.c:61: warning: implicit declaration of function 'RSTRING_PTR' > > Hi Xeno, it looks like the code was ported to work with Ruby 1.9 and > didn't bother maintaining 1.8.5 (or 1.8.6?) compatibility. > > What happens when you add the following to misc.c? > > #ifndef RSTRING_PTR > # define RSTRING_PTR(s) (RSTRING(s)->ptr) > #endif > #ifndef RSTRING_LEN > # define RSTRING_LEN(s) (RSTRING(s)->len) > #endif > I'm trying to find the gem sequence to extract it to a directory and then install the local directory. No such thing is mentioned in the documentation I am reading. Can you help me with that? -- "It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member
From: Xeno Campanoli on 29 Dec 2009 14:04
Eric Wong wrote: Okay, I found the sequence in the README. Sorry. It still fails, and I tried putting the preprocessor stuff you recommend both before and after the two initial includes in the file, with these results: # ruby extconf.rb --with-ldap-dir=/usr --with-openldap2 checking for ldap.h... yes checking for lber.h... yes checking for ldap_ssl.h... no checking for openssl/ssl.h... yes checking for openssl/crypto.h... yes checking for main() in -lcrypto... yes checking for main() in -lssl... yes checking for main() in -lnsl... yes checking for main() in -lpthread... yes checking for main() in -lresolv... yes checking for main() in -llber... yes checking for main() in -lldap_r... yes checking for main() in -lldap... yes checking for ldap_init()... yes checking for ldap_set_option()... yes checking for ldap_get_option()... yes checking for ldap_start_tls_s()... yes checking for ldap_memfree()... yes checking for ldap_perror()... yes checking for ldap_sort_entries()... yes checking for ldapssl_init()... no checking for ldap_sslinit()... no checking for ldap_sasl_bind_s()... yes checking for ldap_compare_s()... yes checking for ldap_add_ext_s()... yes checking for ldap_compare_ext_s()... yes checking for ldap_delete_ext_s()... yes checking for ldap_modify_ext_s()... yes checking for ldap_search_ext_s()... yes checking for ldap_unbind_ext_s()... yes checking for ldap_sasl_interactive_bind_s()... yes creating Makefile # make gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DUSE_OPENLDAP2 -DUSE_OPENLDAP -DLDAP_DEPRECATED -D_REENTRANT -DHAVE_LDAP_H -DHAVE_LBER_H -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_CRYPTO_H -DHAVE_LDAP_INIT -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_GET_OPTION -DHAVE_LDAP_START_TLS_S -DHAVE_LDAP_MEMFREE -DHAVE_LDAP_PERROR -DHAVE_LDAP_SORT_ENTRIES -DHAVE_LDAP_SASL_BIND_S -DHAVE_LDAP_COMPARE_S -DHAVE_LDAP_ADD_EXT_S -DHAVE_LDAP_COMPARE_EXT_S -DHAVE_LDAP_DELETE_EXT_S -DHAVE_LDAP_MODIFY_EXT_S -DHAVE_LDAP_SEARCH_EXT_S -DHAVE_LDAP_UNBIND_EXT_S -DHAVE_LDAP_SASL_INTERACTIVE_BIND_S -DRUBY_VERSION_CODE=185 -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 -c misc.c misc.c: In function 'rb_ldap_get_apiinfo': misc.c:63: warning: implicit declaration of function 'RARRAY_LEN' misc.c:67: warning: implicit declaration of function 'RARRAY_PTR' misc.c:67: error: subscripted value is neither array nor pointer make: *** [misc.o] Error 1 # ---snip--- I don't see any other of these R.*_ preprocessor functions (well, there is an RB.*something, but hopefully) so that maybe if you can give me an appropriate #define for that one it might work...???? xc > Xeno Campanoli <xeno.campanoli(a)gmail.com> wrote: >> misc.c: In function 'rb_ldap_get_apiinfo': >> misc.c:56: warning: implicit declaration of function 'RARRAY_LEN' >> misc.c:60: warning: implicit declaration of function 'RARRAY_PTR' >> misc.c:60: error: subscripted value is neither array nor pointer >> misc.c:61: warning: implicit declaration of function 'RSTRING_LEN' >> misc.c:61: warning: implicit declaration of function 'RSTRING_PTR' > > Hi Xeno, it looks like the code was ported to work with Ruby 1.9 and > didn't bother maintaining 1.8.5 (or 1.8.6?) compatibility. > > What happens when you add the following to misc.c? > > #ifndef RSTRING_PTR > # define RSTRING_PTR(s) (RSTRING(s)->ptr) > #endif > #ifndef RSTRING_LEN > # define RSTRING_LEN(s) (RSTRING(s)->len) > #endif > -- "It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member |