[PATCH] ruby-1.8.0-preview1 AIX 4 compiling

here is a patch against 1.8.0-preview1 which fixes compiling problems on AIX 4.3

ruby-1.8.0-preview1_aix_compiling.patch (1.85 KB)

···

En janvier, faites le plein de cadeau avec Europe 1…

Pendant le Dakar, gagnez un 4x4, puis partez au bout du monde suivre la Coupe de
l’America. Appelez le 0 897 66 10 11 (0,56€ par appel) ou jouez par SMS
au 6 10 11 (0,35€ par envoi).

Hi,

here is a patch against 1.8.0-preview1 which fixes compiling problems on AIX 4.3
(snip)
-all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
+all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY) ruby.imp

Well, I intended @ARCHFILE@ would be replaced with ruby.imp on
AIX, but isn’t it? If you use gcc, following patch may fix it.

diff -Nru ruby-1.8.0.orig/marshal.c ruby-1.8.0/marshal.c
— ruby-1.8.0.orig/marshal.c Tue Dec 24 00:55:30 2002
+++ ruby-1.8.0/marshal.c Mon Jan 13 11:17:41 2003
@@ -10,12 +10,12 @@

**********************************************************************/

-#include <math.h>

#include “ruby.h”
#include “rubyio.h”
#include “st.h”
#include “util.h”
+
+#include <math.h>

What error occured?

Index: configure.in

···

At Mon, 13 Jan 2003 20:33:32 +0900, moumar@netcourrier.com wrote:

RCS file: /cvs/ruby/src/ruby/configure.in,v
retrieving revision 1.164
diff -u -2 -p -r1.164 configure.in
— configure.in 10 Jan 2003 16:47:03 -0000 1.164
+++ configure.in 13 Jan 2003 18:12:06 -0000
@@ -1092,6 +1092,6 @@ if test “$enable_shared” = ‘yes’; then
LIBRUBY_LDSHARED=‘/usr/ccs/bin/ld’
LIBRUBY_DLDFLAGS=‘-bE:ruby.imp -bM:SRE -bnoentry’

  •   ARCHFILE="ruby.imp"
    
    fi
  • ARCHFILE=“ruby.imp”
    LIBRUBYARG_SHARED=‘-L${libdir} -Wl,lib$(RUBY_SO_NAME).so’
    SOLIBS=‘-lm -lc’


Nobu Nakada

Hi,

here is a patch against 1.8.0-preview1 which fixes compiling problems on AIX 4.3
(snip)
-all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
+all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY) ruby.imp

Well, I intended @ARCHFILE@ would be replaced with ruby.imp on
AIX, but isn’t it? If you use gcc, following patch may fix it.

@ARCHFILE@ is replaced only if “enable-shared” is modified. Moving
@ARCHFILE@ affectation resolves the problem.

— ruby-1.8.0.orig/configure.in Wed Dec 18 19:03:57 2002
+++ ruby-1.8.0/configure.in Tue Jan 14 10:17:21 2003
@@ -788,5 +788,8 @@
DLDFLAGS=‘-brtl -eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 -lc’
LDFLAGS=“-brtl”

  •   	rb_cv_dlopen=yes ;;
    
  •   	rb_cv_dlopen=yes
    
  •   	if test "$GCC" != yes; then
    
  •   		  ARCHFILE="ruby.imp"
    
  •   	fi ;;
    

    human*) DLDFLAGS=‘’
    @@ -1073,5 +1076,4 @@
    LIBRUBY_LDSHARED=‘/usr/ccs/bin/ld’
    LIBRUBY_DLDFLAGS=‘-bE:ruby.imp -bM:SRE -bnoentry’

  •   ARCHFILE="ruby.imp"
    
    fi
    LIBRUBYARG_SHARED=‘-L${libdir} -Wl,lib$(RUBY_SO_NAME).so’

diff -Nru ruby-1.8.0.orig/marshal.c ruby-1.8.0/marshal.c
— ruby-1.8.0.orig/marshal.c Tue Dec 24 00:55:30 2002
+++ ruby-1.8.0/marshal.c Mon Jan 13 11:17:41 2003
@@ -10,12 +10,12 @@

**********************************************************************/

-#include <math.h>

#include “ruby.h”
#include “rubyio.h”
#include “st.h”
#include “util.h”
+
+#include <math.h>

What error occured?

make

cc -g -I. -I. -c marshal.c
“config.h”, line 7.9: 1506-236 (W) Macro name _ALL_SOURCE has been redefined.
“config.h”, line 7.9: 1506-358 (I) “_ALL_SOURCE” is defined on line 111 of /usr/include/standards.h.
“/usr/include/stdio.h”, line 434.12: 1506-343 (S) Redeclaration of fgetpos64 differs from previous declaration on line 274 of “/usr/include/stdio.h”.
“/usr/include/stdio.h”, line 434.12: 1506-377 (I) The type “long long*” of parameter 2 differs from the previous type “long*”.
“/usr/include/stdio.h”, line 437.12: 1506-343 (S) Redeclaration of fseeko64 differs from previous declaration on line 380 of “/usr/include/stdio.h”.
“/usr/include/stdio.h”, line 437.12: 1506-377 (I) The type “long long” of parameter 2 differs from the previous type “long”.
“/usr/include/stdio.h”, line 438.12: 1506-343 (S) Redeclaration of fsetpos64 differs from previous declaration on line 276 of “/usr/include/stdio.h”.
“/usr/include/stdio.h”, line 438.12: 1506-377 (I) The type “const long long*” of parameter 2 differs from the previous type “const long*”.
“/usr/include/stdio.h”, line 439.16: 1506-343 (S) Redeclaration of ftello64 differs from previous declaration on line 381 of “/usr/include/stdio.h”.
“/usr/include/stdio.h”, line 439.16: 1506-050 (I) Return type “long long” in redeclaration is not compatible with the previous return type “long”.
make: The error code from the last command is 1.

Stop.

···

On Tue, Jan 14, 2003 at 03:14:15AM +0900, nobu.nokada@softhome.net wrote:

At Mon, 13 Jan 2003 20:33:32 +0900, > moumar@netcourrier.com wrote:

“standards.h” (which is included in “math.h”) redefines _ALL_SOURCE if not
defined previously. _ALL_SOURCE needs to be defined before including “math.h”
I currently use standard AIX compiler, not GCC.

moumar moumar@netcourrier.com

Hi,

@ARCHFILE@ is replaced only if “enable-shared” is modified. Moving
@ARCHFILE@ affectation resolves the problem.

Nice, thank you.

“standards.h” (which is included in “math.h”) redefines _ALL_SOURCE if not
defined previously. _ALL_SOURCE needs to be defined before including “math.h”
I currently use standard AIX compiler, not GCC.

Certainly, other files include “ruby.h” and so on before those
system headers.

···

At Tue, 14 Jan 2003 18:32:43 +0900, guillaume.pierronnet@ratp.fr wrote:


Nobu Nakada