I’m trying to compile ruby-1.8.5 on a rather old Linux box,
and it’s failing in ext/openssl,
gcc -I. -I…/… -I…/…/. -I…/…/./ext/openssl
-DRUBY_EXTCONF_H=“extconf.h” -I/users/kleb/local/openssl/include
-fPIC -g -O2 -c ossl_bio.c
ossl_bio.c: In function `ossl_obj2bio’:
ossl_bio.c:23: called object is not a function
make: *** [ossl_bio.o] Error 1
But I can’t find another RFILE in /ext/openssl or below…
$ 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?
I tried removing the comment from the “#if defined” line
and just putting "#undef RFILE’ with no apparent effect.
At Mon, 18 Sep 2006 01:06:07 +0900,
Bil K. 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 <openssl/*.h> 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.
/*
-* OpenSSL has defined RFILE and Ruby has defined RFILE - so undef it!
-/
-#if defined(RFILE) /&& !defined(OSSL_DEBUG)*/
-# undef RFILE
-#endif
-#include <ruby.h>
-#include <rubyio.h>
*_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 <ruby.h>
+#include <rubyio.h>
+
+/