From: KUBO Takehiro Date: 2005-01-19T21:52:06+09:00 Subject: Re: Ruby on AIX? Hi, nobu.nokada@softhome.net writes: >> > Anyway, -eInit_foo option is required on AIX in general? >> >> I can't say about other AIX platforms. >> As far as in my environment each extionsion library requires -eInit_foo. > > Sorry, it seems my typo. > > Index: configure.in > =================================================================== > RCS file: /cvs/ruby/src/ruby/configure.in,v > retrieving revision 1.263 > diff -U2 -p -r1.263 configure.in > --- configure.in 30 Dec 2004 15:09:42 -0000 1.263 > +++ configure.in 17 Jan 2005 14:24:32 -0000 > @@ -882,5 +882,5 @@ if test "$with_dln_a_out" != yes; then > XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp" > DLDFLAGS='-brtl -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 '"$DLDFLAGS" > - ARCH_FLAGS='-eInit_$(TARGET)' > + ARCH_FLAG='-eInit_$(TARGET)' > : LDFLAGS="-brtl $LDFLAGS" > : ${ARCHFILE="ruby.imp"} This cause an error while linking miniruby by passing '-eInit_' to the linker. The following obviously unacceptable patch solved the problem. It will be available only on AIX.... --- ruby-1.8.2/lib/mkmf.rb~ 2004-09-18 15:56:36.000000000 +0900 +++ ruby-1.8.2/lib/mkmf.rb 2005-01-19 21:22:27.000000000 +0900 @@ -1035,7 +1035,7 @@ if CONFIG["DLEXT"] == $OBJEXT "ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS)\n" else - "$(LDSHARED) $(DLDFLAGS) $(LIBPATH) #{OUTFLAG}$(DLLIB) " \ + "$(LDSHARED) $(DLDFLAGS) $(LIBPATH) #{OUTFLAG}$(DLLIB) -eInit_$(TARGET) " \ "$(OBJS) $(LOCAL_LIBS) $(LIBS)" end LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L"%s"' 1. apply this patch. 2. 'make distclean' 3. configure and make again. -- KUBO Takehiro kubo@jiubao.org