From: Eric Wong Date: 2009-12-30T05:27:28+09:00 Subject: Re: ERRORs trying to install ruby-ldap on CentOS Xeno Campanoli 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: > > -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--- OK, we got farther since it's no longer barfing on RSTRING_* but RARRAY_* instead. > 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...???? So just add these now, and hopefully there aren't more incompatibilities.... #ifndef RARRAY_PTR # define RARRAY_PTR(s) (RARRAY(s)->ptr) #endif #ifndef RARRAY_LEN # define RARRAY_LEN(s) (RARRAY(s)->len) #endif If upgrading your version of Ruby isn't an option for you, I suggest grabbing the latest 1.8.7 source and taking any other macros you might need from the headers. -- Eric Wong