i386-pc-solaris2.11-gcc -g -O2 -pipe -fno-strict-aliasing -fPIC -DRUBY_EXPORT -I. -I. -c file.c file.c: In function 'file_load_ok': file.c:4369: error: 'O_RDONLY' undeclared (first use in this function) file.c:4369: error: (Each undeclared identifier is reported only once file.c:4369: error: for each function it appears in.) make: *** [file.o] Error 1 * ERROR: dev-lang/ruby-1.8.7_p160 failed: Portage 2.2.00.13621-prefix (prefix/sunos/solaris/5.11/x86, gcc-4.2.4, unavailable, 5.11 i86pc) ================================================================= System uname: Solaris-2.11-i86pc-i386-32bit-ELF Timestamp of tree: Sat, 16 May 2009 00:01:33 +0000 ccache version 2.4 [disabled] app-shells/bash: 4.0_p17-r1 dev-lang/python: 2.5.4-r2, 2.6.2 dev-util/ccache: 2.4-r8 sys-devel/autoconf: 2.63-r01.1 sys-devel/automake: 1.10.2-r00.1 sys-devel/binutils: 2.19.1-r01.1 sys-devel/gcc-config: 1.4.1-r00.2 sys-devel/libtool: 2.2.6a ACCEPT_KEYWORDS="~x86-solaris" CBUILD="i386-pc-solaris2.11" CFLAGS="-g -O2 -pipe" CHOST="i386-pc-solaris2.11" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-g -O2 -pipe" DISTDIR="/var/cache/distfiles" EPREFIX="/opt/gentoo" FEATURES="collision-protect distlocks fixpackages nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="it_IT.UTF-8" LDFLAGS="" PKGDIR="/opt/gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/opt/gentoo/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/opt/gentoo/var/tmp" PORTDIR="/opt/gentoo/usr/portage" PORTDIR_OVERLAY="/opt/gentoo/usr/local/portage/my-overlay" SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix" USE="cracklib midi ncurses prefix readline ssl unicode x86-solaris zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="SunOS" INPUT_DEVICES="keyboard mouse" KERNEL="SunOS" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Problem is also available in Solaris 10 u6. I added the patch from http://redmine.ruby-lang.org/issues/show/1444 to the ebuild. Fixes the compilation problem for me, but results in a segfault of ruby itself. http://overlays.gentoo.org/proj/alt/changeset/45351
-march=core2 -O3: segfaults -march=core2 -O2: no such file to load -- ./ext/purelib.rb (LoadError) -march=core2 -O1: no such file to load -- ./ext/purelib.rb (LoadError) -O3: segfaults -O2: no such file to load -- ./ext/purelib.rb (LoadError) <nothing>: no such file to load -- ./ext/purelib.rb (LoadError) Is this version actually usable at all on Solaris? Manually running it in the builddir also makes it segfault. Interestingly truss says it /can/ open purelib.rb: open("./ext/purelib.rb", O_RDONLY) = 3 fstat64(3, 0x08046918) = 0
Program received signal SIGSEGV, Segmentation fault. 0x08078849 in rb_find_file_ext (filep=0x8046978, ext=0x81254e0) at file.c:4425 4425 for (i=0;i<RARRAY(rb_load_path)->len;i++) { (gdb) bt #0 0x08078849 in rb_find_file_ext (filep=0x8046978, ext=0x81254e0) at file.c:4425 #1 0x08067359 in search_required (fname=135615520, featurep=0x80469f8, path=0x80469f4) at eval.c:7343 #2 0x080675af in rb_require_safe (fname=135615520, safe=0) at eval.c:7399 #3 0x080677b8 in rb_require (fname=0x819a670 "auto_gem") at eval.c:7448 #4 0x08062500 in rb_protect (proc=0x8067760 <rb_require>, data=135898736, state=0x8046aec) at eval.c:5528 #5 0x080cfe4d in require_libraries () at ruby.c:387 #6 0x080d13d2 in load_file (fname=0x811ff4f "-", script=1) at ruby.c:974 #7 0x080d1496 in load_stdin () at ruby.c:1001 #8 0x080d0f12 in proc_options (argc=0, argv=0x8046ce8) at ruby.c:850 #9 0x080d1b02 in ruby_process_options (argc=1, argv=0x8046ce4) at ruby.c:1246 #10 0x08057e04 in ruby_options (argc=1, argv=0x8046ce4) at eval.c:1534 #11 0x08055b89 in main (argc=1, argv=0x8046ce4, envp=0x8046cec) at main.c:47 I think the crash must be in RARRAY, but since rb_load_path isn't modified in the loop itself, it must be a concurrency issue of some sort, which is eeky.
(gdb) p rb_load_path $1 = 135622640 (gdb) p i $2 = 3
masked for the time being. ruby-1.8.6-p368 has the same build and segfault problem. had to bring back 1.8.7_p72-r11 as it is the only non-masked compiling version of ruby on Solaris
Could you retry with ruby-1.8.7_p173 ?
Yes.
[ebuild R ] dev-lang/ruby-1.8.7_p173 USE="berkdb ipv6 ssl -debug -doc -emacs -examples -gdbm -rubytests -socks5 -threads -tk -xemacs" 0 kB Looks alright! Diego, ok for you too? Please close if so.
dev-lang/ruby-1.8.7_p173 builds on both Solaris 10 as well as OpenSolaris 2009.06