From: Nobuyoshi Nakada Date: 2009-03-20T11:38:35+09:00 Subject: Re: Compiling 1.9.1p0 on AIX 5.3 using xlc Hi, At Thu, 5 Mar 2009 00:54:05 +0900, Graham Agnew wrote in [ruby-talk:330286]: > I'm trying to compile Ruby using the native compiler xlc on AIX. Ruby > seems to have compiled, but it falls over with a SEGV as soon as I run > 'make test', it falls over. Why not register to http://redmine.ruby-lang.org ? At Fri, 20 Mar 2009 00:11:00 +0900, Graham Agnew wrote in [ruby-talk:331586]: > So, I've gotten over this hurdle by modifying the enc.mk file to use the > following value for dldflags: > > > dldflags = -eInit_$(basename $(notdir $@)) Does the following patch work? > I've further modified enc.mk to link in encoding.o to resolve these > missing symbols. So now encdb.so loads. Now I'm getting a problem with > miniruby getting into an infinite loop. For some reason it's spinning > on line 384 in st.c. What are missing symbols? Index: enc/depend =================================================================== --- enc/depend (revision 23012) +++ enc/depend (working copy) @@ -1,2 +1,4 @@ +% CONFIG["DLDFLAGS"].sub!(/(\A|\s)(-\S+(?:\s*\w*)?\$\(TARGET\)\S*)/, '\1') +% dldflags = $2 % enable_shared = CONFIG['ENABLE_SHARED'] == 'yes' % deffile = (true if /\$\(DEFFILE\)/ =~ CONFIG["LINK_SO"]) @@ -104,10 +106,15 @@ $(TRANSOBJS): ruby.h intern.h config.h d % df = ("enc/#{e}.def" if deffile) $(ENCSODIR)/<%=e%>.$(DLEXT): <%=obj%> +% cmd = link_so.sub(/\$\(OBJS\)/) {obj} +% base = File.basename(e) +% cmd.sub!(/(?=\$\(DLDFLAGS\))/) {dldflags.sub(/\$\(TARGET\)/) {base} + " "} if dldflags % if df echo> <%=df%> EXPORTS - echo>> <%=df%> <%=EXPORT_PREFIX%>Init_<%=File.basename(e)%> + echo>> <%=df%> <%=EXPORT_PREFIX%>Init_<%=base%> +% cmd.sub!(/\$\(DEFFILE\)/) {df} +% cmd.gsub!(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"} % end @$(MAKEDIRS) "$(@D)" - <%=link_so.sub(/\$\(OBJS\)/) {obj}.sub(/\$\(DEFFILE\)/) {df}.gsub(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}%> + <%=cmd%> % end -- Nobu Nakada