Hi,
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.
The reason I want to use the native compilers rather than gcc is to be
sure that C++ name mangling is not an issue when I link Ruby’s libraries
with my own code.
The output and my rbconfig.rb are attached below. Anyone have any
ideas?
Cheers,
Graza.
– control frame ----------
c:0009 p:-570765290 s:0022 b:0022 l:000021 d:000021 TOP
c:0008 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :require
c:0007 p:0014 s:0016 b:0016 l:000007 d:000015 BLOCK
internal:prelude:3
c:0006 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :each
c:0004 p:0014 s:0008 b:0008 l:000007 d:000007 TOP
internal:prelude:1
c:0003 p:---- s:0006 b:0006 l:000005 d:000005 FINISH
c:0002 p:-570713662 s:0004 b:0004 l:000003 d:000003 TOP
c:0001 p:0000 s:0002 b:0002 l:000f28 d:000f28 TOP
– Ruby level backtrace
information-----------------------------------------
internal:prelude:3:in require' <internal:prelude>:3:in
block in ’
internal:prelude:1:in each' <internal:prelude>:1:in
’
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
make: *** [test-sample] IOT/Abort trap (core dumped)
module RbConfig
RUBY_VERSION == “1.9.1” or
raise “ruby lib version (1.9.1) doesn’t match executable version
(#{RUBY_VERSION})”
TOPDIR =
File.dirname(FILE).chomp!(“/lib/ruby/1.9.1/powerpc-aix5.3.0.0”)
DESTDIR = ‘’ unless defined? DESTDIR
CONFIG = {}
CONFIG[“DESTDIR”] = DESTDIR
CONFIG[“INSTALL”] = ‘’
CONFIG[“EXEEXT”] = “”
CONFIG[“prefix”] = (TOPDIR || DESTDIR + “/ruby/install/path”)
CONFIG[“ruby_install_name”] = “ruby”
CONFIG[“RUBY_INSTALL_NAME”] = “ruby”
CONFIG[“RUBY_SO_NAME”] = “ruby”
CONFIG[“BUILTIN_TRANSSRCS”] = " newline.c"
CONFIG[“MANTYPE”] = “man”
CONFIG[“NROFF”] = “/usr/bin/nroff”
CONFIG[“vendorhdrdir”] = “$(rubyhdrdir)/vendor_ruby”
CONFIG[“sitehdrdir”] = “$(rubyhdrdir)/site_ruby”
CONFIG[“rubyhdrdir”] =
“$(includedir)/$(RUBY_INSTALL_NAME)-$(ruby_version)”
CONFIG[“configure_args”] = " ‘–prefix=/ruby/install/path’
‘CC=/usr/vac/bin/xlc’ ‘CFLAGS=-O3 -q64 -qcpluscmt -qlanglvl=extended
-qcheck=nullptr -Wl,-brtl -I/nfs/home/gagnew/aix/app/include’
‘LDFLAGS=-L/nfs/home/gagnew/aix/app/lib’ ‘CXX=/usr/vac/bin/xlc’"
CONFIG[“vendordir”] = “$(libdir)/$(RUBY_INSTALL_NAME)/vendor_ruby”
CONFIG[“sitedir”] = “$(libdir)/$(RUBY_INSTALL_NAME)/site_ruby”
CONFIG[“ruby_version”] = “1.9.1”
CONFIG[“sitearch”] = “powerpc-aix5.3.0.0”
CONFIG[“arch”] = “powerpc-aix5.3.0.0”
CONFIG[“MAKEFILES”] = “Makefile”
CONFIG[“THREAD_MODEL”] = “pthread”
CONFIG[“EXPORT_PREFIX”] = “”
CONFIG[“COMMON_HEADERS”] = “”
CONFIG[“COMMON_MACROS”] = “”
CONFIG[“COMMON_LIBS”] = “”
CONFIG[“MAINLIBS”] = “”
CONFIG[“ENABLE_SHARED”] = “no”
CONFIG[“DLDLIBS”] = " -lc"
CONFIG[“SOLIBS”] = “”
CONFIG[“LIBRUBYARG_SHARED”] = “-l$(RUBY_SO_NAME)”
CONFIG[“LIBRUBYARG_STATIC”] = “-l$(RUBY_SO_NAME)-static”
CONFIG[“LIBRUBYARG”] = “$(LIBRUBYARG_STATIC)”
CONFIG[“LIBRUBY”] = “$(LIBRUBY_A)”
CONFIG[“LIBRUBY_ALIASES”] = “lib$(RUBY_SO_NAME).so”
CONFIG[“LIBRUBY_SO”] =
“lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY)”
CONFIG[“LIBRUBY_A”] = “lib$(RUBY_SO_NAME)-static.a”
CONFIG[“RUBYW_INSTALL_NAME”] = “”
CONFIG[“rubyw_install_name”] = “”
CONFIG[“LIBRUBY_DLDFLAGS”] = “-eInit_$(TARGET)”
CONFIG[“LIBRUBY_LDSHARED”] = “$(CC) -G”
CONFIG[“warnflags”] = “”
CONFIG[“debugflags”] = “-g”
CONFIG[“optflags”] = “”
CONFIG[“cflags”] = “$(optflags) $(debugflags) $(warnflags)”
CONFIG[“cppflags”] = “”
CONFIG[“RDOCTARGET”] = “install-doc”
CONFIG[“ARCHFILE”] = “ruby.imp”
CONFIG[“EXTOUT”] = “.ext”
CONFIG[“PREP”] = “miniruby$(EXEEXT)”
CONFIG[“setup”] = “Setup”
CONFIG[“EXTSTATIC”] = “”
CONFIG[“STRIP”] = “strip”
CONFIG[“TRY_LINK”] = “$(CC) $(LDFLAGS) -oconftest $(INCFLAGS)
-I$(hdrdir) $(CPPFLAGS) $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS)
$(LIBS)”
CONFIG[“LIBPATHENV”] = “SHLIB_PATH”
CONFIG[“RPATHFLAG”] = " -blibpath:%1$-s"
CONFIG[“LIBPATHFLAG”] = " -L%1$-s"
CONFIG[“LINK_SO”] = “”
CONFIG[“LIBEXT”] = “a”
CONFIG[“DLEXT2”] = “”
CONFIG[“DLEXT”] = “so”
CONFIG[“LDSHAREDXX”] = “$(CXX) -G”
CONFIG[“LDSHARED”] = “$(CC) -G”
CONFIG[“CCDLFLAGS”] = “”
CONFIG[“STATIC”] = “”
CONFIG[“ARCH_FLAG”] = “”
CONFIG[“DLDFLAGS”] = “-eInit_$(TARGET)”
CONFIG[“ALLOCA”] = “”
CONFIG[“RMALL”] = “rm -fr”
CONFIG[“RMDIRS”] = “$(top_srcdir)/tool/rmdirs”
CONFIG[“MAKEDIRS”] = “mkdir -p”
CONFIG[“CP”] = “cp”
CONFIG[“RM”] = “rm -f”
CONFIG[“INSTALL_DATA”] = “$(INSTALL) -m 644”
CONFIG[“INSTALL_SCRIPT”] = “$(INSTALL)”
CONFIG[“INSTALL_PROGRAM”] = “$(INSTALL)”
CONFIG[“SET_MAKE”] = “”
CONFIG[“LN_S”] = “ln -s”
CONFIG[“DLLWRAP”] = “”
CONFIG[“WINDRES”] = “”
CONFIG[“NM”] = “nm”
CONFIG[“OBJCOPY”] = “”
CONFIG[“OBJDUMP”] = “”
CONFIG[“ASFLAGS”] = “”
CONFIG[“AS”] = “as”
CONFIG[“AR”] = “ar”
CONFIG[“RANLIB”] = “ranlib”
CONFIG[“COUTFLAG”] = “-o "
CONFIG[“OUTFLAG”] = “-o "
CONFIG[“CPPOUTFILE”] = “> conftest.i”
CONFIG[“GNU_LD”] = “no”
CONFIG[“EGREP”] = “/usr/bin/grep -E”
CONFIG[“GREP”] = “/usr/bin/grep”
CONFIG[“CPP”] = “/usr/vac/bin/xlc -E”
CONFIG[“CXXFLAGS”] = " -g”
CONFIG[“CXX”] = “/usr/vac/bin/xlc”
CONFIG[“OBJEXT”] = “o”
CONFIG[“CPPFLAGS”] = " $(DEFS) $(cppflags)”
CONFIG[“LDFLAGS”] = “-L. -L/home/build/aix/app/lib”
CONFIG[“CFLAGS”] = “-O3 -q64 -qcpluscmt -qlanglvl=extended
-qcheck=nullptr -Wl,-brtl -I/nfs/home/gagnew/aix/app/include -g”
CONFIG[“CC”] = “/usr/vac/bin/xlc”
CONFIG[“target_os”] = “aix5.3.0.0”
CONFIG[“target_vendor”] = “ibm”
CONFIG[“target_cpu”] = “powerpc”
CONFIG[“target”] = “powerpc-ibm-aix5.3.0.0”
CONFIG[“host_os”] = “aix5.3.0.0”
CONFIG[“host_vendor”] = “ibm”
CONFIG[“host_cpu”] = “powerpc”
CONFIG[“host”] = “powerpc-ibm-aix5.3.0.0”
CONFIG[“build_os”] = “aix5.3.0.0”
CONFIG[“build_vendor”] = “ibm”
CONFIG[“build_cpu”] = “powerpc”
CONFIG[“build”] = “powerpc-ibm-aix5.3.0.0”
CONFIG[“TEENY”] = “1”
CONFIG[“MINOR”] = “9”
CONFIG[“MAJOR”] = “1”
CONFIG[“BASERUBY”] = “ruby”
CONFIG[“target_alias”] = “”
CONFIG[“host_alias”] = “”
CONFIG[“build_alias”] = “”
CONFIG[“LIBS”] = "-lpthread -lrt -ldl -lcrypt -lm "
CONFIG[“ECHO_T”] = “”
CONFIG[“ECHO_N”] = “”
CONFIG[“ECHO_C”] = “\\c”
CONFIG[“DEFS”] = “”
CONFIG[“mandir”] = “$(datarootdir)/man”
CONFIG[“localedir”] = “$(datarootdir)/locale”
CONFIG[“libdir”] = “$(exec_prefix)/lib”
CONFIG[“psdir”] = “$(docdir)”
CONFIG[“pdfdir”] = “$(docdir)”
CONFIG[“dvidir”] = “$(docdir)”
CONFIG[“htmldir”] = “$(docdir)”
CONFIG[“infodir”] = “$(datarootdir)/info”
CONFIG[“docdir”] = “$(datarootdir)/doc/$(PACKAGE)”
CONFIG[“oldincludedir”] = “/usr/include”
CONFIG[“includedir”] = “$(prefix)/include”
CONFIG[“localstatedir”] = “$(prefix)/var”
CONFIG[“sharedstatedir”] = “$(prefix)/com”
CONFIG[“sysconfdir”] = “$(prefix)/etc”
CONFIG[“datadir”] = “$(datarootdir)”
CONFIG[“datarootdir”] = “$(prefix)/share”
CONFIG[“libexecdir”] = “$(exec_prefix)/libexec”
CONFIG[“sbindir”] = “$(exec_prefix)/sbin”
CONFIG[“bindir”] = “$(exec_prefix)/bin”
CONFIG[“exec_prefix”] = “$(prefix)”
CONFIG[“PACKAGE_BUGREPORT”] = “”
CONFIG[“PACKAGE_STRING”] = “”
CONFIG[“PACKAGE_VERSION”] = “”
CONFIG[“PACKAGE_TARNAME”] = “”
CONFIG[“PACKAGE_NAME”] = “”
CONFIG[“PATH_SEPARATOR”] = “:”
CONFIG[“SHELL”] = “/bin/sh”
CONFIG[“rubylibdir”] =
“$(libdir)/$(ruby_install_name)/$(ruby_version)”
CONFIG[“archdir”] = “$(rubylibdir)/$(arch)”
CONFIG[“sitelibdir”] = “$(sitedir)/$(ruby_version)”
CONFIG[“sitearchdir”] = “$(sitelibdir)/$(sitearch)”
CONFIG[“vendorlibdir”] = “$(vendordir)/$(ruby_version)”
CONFIG[“vendorarchdir”] = “$(vendorlibdir)/$(sitearch)”
CONFIG[“topdir”] = File.dirname(FILE)
MAKEFILE_CONFIG = {}
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
def RbConfig::expand(val, config = CONFIG)
val.gsub!(/$$|$(([^()]+))|${([^{}]+)}/) do
var = $&
if !(v = $1 || $2)
‘$’
elsif key = config[v = v[/\A[^:]+(?=(?::(.?)=(.))?\z)/]]
pat, sub = $1, $2
config[v] = false
RbConfig::expand(key, config)
config[v] = key
key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
key
else
var
end
end
val
end
CONFIG.each_value do |val|
RbConfig::expand(val)
end
end
Config = RbConfig # compatibility for ruby-1.8.4 and older.
CROSS_COMPILING = nil unless defined? CROSS_COMPILING