From: Justin Bailey Date: 2006-12-15T02:56:54+09:00 Subject: Problem compiling openssl on ruby-1.8.5-p2 with gcc 3.2 ------=_Part_162474_3816546.1166119010062 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry to resurrect this old post - but I just ran into the problem referenced below. I thought ruby-1.8.5-p2 would have the fix, but it did not. Applying the patch worked for me too. I just thought it'd be good for folks to know. FYI, uname -a says: Linux C621184 2.4.21-40.EL-3 #1 Tue Nov 28 02:57:02 PST 2006 i686 i686 i386 GNU/Linux On 9/17/06, Nobuyoshi Nakada wrote: > > Hi, > > At Mon, 18 Sep 2006 01:06:07 +0900, > Bil Kleb wrote in [ruby-talk:214856]: > > > RFILE seems redefined somewhere after here. > > > > But I can't find another RFILE in /ext/openssl or below... > > `Somewhere' inside below it. > > > $ cd /ext/openssl && grep -nr RFILE * > > ossl.h:21:* OpenSSL has defined RFILE and Ruby has defined RFILE - so > undef it! > > ossl.h:23:#if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/ > > ossl.h:24:# undef RFILE > > > > Suggestions? > > Moving the code block after #include lines of openssl. Try > this patch. > > > Index: ext/openssl/ossl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/ruby/src/ruby/ext/openssl/ossl.h,v > retrieving revision 1.14.2.4 > diff -p -u -2 -r1.14.2.4 ossl.h > --- ext/openssl/ossl.h 27 Jul 2006 07:45:33 -0000 1.14.2.4 > +++ ext/openssl/ossl.h 18 Sep 2006 02:49:17 -0000 > @@ -16,14 +16,13 @@ > #if defined(__cplusplus) > extern "C" { > +#elif 0 > +} > #endif > > /* > -* OpenSSL has defined RFILE and Ruby has defined RFILE - so undef it! > -*/ > -#if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/ > -# undef RFILE > -#endif > -#include > -#include > + *_FILE_OFFSET_BITS needs to be defined before some system headers on > + * Solaris. > + */ > +#include "config.h" > > /* > @@ -70,4 +69,13 @@ extern "C" { > > /* > +* OpenSSL has defined RFILE and Ruby has defined RFILE - so undef it! > +*/ > +#if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/ > +# undef RFILE > +#endif > +#include > +#include > + > +/* > * Common Module > */ > @@ -212,5 +220,7 @@ void ossl_debug(const char *, ...); > void Init_openssl(void); > > -#if defined(__cplusplus) > +#if 0 > +{ > +#elif defined(__cplusplus) > } > #endif > =0C > > -- > Nobu Nakada > > ------=_Part_162474_3816546.1166119010062--