Issue #5384 has been updated by Naohisa Goto.


Naohisa Goto wrote:
> Solaris 10 released from Oracle (Sun Microsystems) does not have such limitation.

I'm sorry I mistook. /usr/include/libelf.h in Oracle Solaris 10 still does not support large files when _ILP32 is defined.

The reason why Solaris10 is not affected is that it does not have dl_iterate_phdr() and the macro HAVE_DL_ITERATE_PHDR is not defined and thus addr2line.c does not include <link.h> that internally includes libelf.h.

Simple workaround is to remove the line "#define HAVE_DL_ITERATE_PHDR 1" in .ext/include/*/ruby/config.h after configure.

Another possible workaroud is to install alternative libelf from http://www.mr511.de/software/english.html and set CPPFLAGS="-I/usr/local/include/libelf -I/usr/local/include" (when libelf is installed to /usr/local) when configure.

----------------------------------------
Bug #5384: Ruby 1.9.3-RC1 Fails to Compile on Illumos (OpenSolaris)
http://redmine.ruby-lang.org/issues/5384

Author: Cyrus Lopez
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: -


An attempt was made recently to compile http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-rc1.tar.bz2 and it seems every call to the compiler passes _D_FILE_OFFSET_BITS=64 which returns the fatal error 'large files are not supported by libelf' on a fresh install of OpenIndiana with GCC 4.6.1. 

Snippet of Error:
....
compiling addr2line.c
In file included from /usr/include/link.h:31:0,
                 from addr2line.c:42:
/usr/include/libelf.h:42:2: error: #error "large files are not supported by libelf"
make: *** [addr2line.o] Error 1
....

Discussion on IRC pointed out http://src.illumos.org/source/xref/illumos-gate/usr/src/head/libelf.h#41 and a request was made to file a bug report.



-- 
http://redmine.ruby-lang.org