From: guillaume.pierronnet@... Date: 2003-01-14T18:32:43+09:00 Subject: Re: [PATCH] ruby-1.8.0-preview1 AIX 4 compiling On Tue, Jan 14, 2003 at 03:14:15AM +0900, nobu.nokada@softhome.net wrote: > Hi, > > At Mon, 13 Jan 2003 20:33:32 +0900, > moumar@netcourrier.com wrote: > > 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 > > - > > #include "ruby.h" > > #include "rubyio.h" > > #include "st.h" > > #include "util.h" > > + > > +#include > > 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. # "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