Forum: Ruby-core [Ruby 1.9 - Bug #5384][Open] Ruby 1.9.3-RC1 Fails to Compile on Solaris

Posted by Cyrus Lopez (Guest)
on 2011-09-30 23:28
(Received via mailing list)
Issue #5384 has been reported by Cyrus Lopez.

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

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


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.
Posted by Naohisa Goto (Guest)
on 2011-10-01 03:29
(Received via mailing list)
Issue #5384 has been updated by Naohisa Goto.


Solaris 10 released from Oracle (Sun Microsystems) does not have such 
limitation.
It seems the problem is Illumos (OpenSolaris) specific problem,
and the title "on Solaris" is wrong.
----------------------------------------
Bug #5384: Ruby 1.9.3-RC1 Fails to Compile on Solaris
http://redmine.ruby-lang.org/issues/5384

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


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.
Posted by KOSAKI Motohiro (Guest)
on 2011-10-01 03:34
(Received via mailing list)
> 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
> ....

I wonder how OpenSolaris support large files if it doesn't support
_D_FILE_OFFSET_BITS=64.
Is it broken? or is there unknown alternative way?

I have no idea how to make fixed patch.
Posted by Naohisa Goto (Guest)
on 2011-10-01 03:49
(Received via mailing list)
Issue #5384 has been updated by Naohisa Goto.

Subject changed from Ruby 1.9.3-RC1 Fails to Compile on Solaris to Ruby 
1.9.3-RC1 Fails to Compile on Illumos (OpenSolaris)


----------------------------------------
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: 1.9.3rc1


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.
Posted by Matt Lewandowsky (Guest)
on 2011-10-01 13:51
(Received via mailing list)
Issue #5384 has been updated by Matt Lewandowsky.


=begin
In all fairness, Ruby 1.9.3-RC1 doesn't compile out of the box on Sun 
Solaris 10, either, but for a different reason (one which should be 
handled by configure, but is not):

 compiling iconv.c
 linking shared-object iconv.so
 ld: fatal: library -liconv: not found
 ld: fatal: File processing errors. No output written to 
../../.ext/sparc-solaris2.10/iconv.so
 collect2: ld returned 1 exit status
 gmake[2]: *** [../../.ext/sparc-solaris2.10/iconv.so] Error 1
 gmake[2]: Leaving directory `/home/lewellyn/ruby-1.9.3-rc1/ext/iconv'
 gmake[1]: *** [ext/iconv/all] Error 2
 gmake[1]: Leaving directory `/home/lewellyn/ruby-1.9.3-rc1'
 gmake: *** [build-ext] Error 2
 670 lewellyn@looking-glass$ uname -a
 SunOS looking-glass 5.10 Generic_137137-09 sun4u sparc SUNW,UltraAX-i2 
Solaris

As for illumos's libelf, it's currently unchanged from what Sun 
open-sourced in 2005. The comments in the file indicate that it's 
probably mostly unchanged from what AT&T had 20 years ago. 
[[http://src.illumos.org/source/xref/illumos-gate/usr/src/head/libelf.h?a=true&h=#40]] 
(Mouse over the "0" in the second column to see the information 
regarding its changeset.) I'd personally be surprised that Ruby 
1.9.3-RC1 builds on a stock Solaris without a replacement libelf.

And, as for (({_FILE_OFFSET_BITS=64})), just use it wherever you need 
64-bit file support. I expect addr2line.c doesn't need it, correct?

Have you also tested on the Oracle Solaris 11 Express or Early Access?
=end

----------------------------------------
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.
Posted by Naohisa Goto (Guest)
on 2011-10-02 17:49
(Received via mailing list)
Issue #5384 has been updated by Naohisa Goto.


> In all fairness, Ruby 1.9.3-RC1 doesn't compile out of the box on Sun Solaris 
10, either, but for a different reason (one which should be handled by configure, 
but is not):

> compiling iconv.c
> linking shared-object iconv.so
> ld: fatal: library -liconv: not found

On the machine, I suppose GNU libiconv is installed and iconv.h coming 
from GNU libiconv is recognized by the compiler but the library 
directory of GNU libiconv is not included in the default library search 
path.
Giving LDFLAGS="-L/usr/local/lib -R/usr/local/lib" to configure may 
solve the error.
----------------------------------------
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.
Posted by Cyrus Lopez (Guest)
on 2011-10-03 04:58
(Received via mailing list)
Issue #5384 has been updated by Cyrus Lopez.


Naohisa Goto wrote:
> > In all fairness, Ruby 1.9.3-RC1 doesn't compile out of the box on Sun Solaris 
10, either, but for a different reason (one which should be handled by configure, 
but is not):
>
> > compiling iconv.c
> > linking shared-object iconv.so
> > ld: fatal: library -liconv: not found
>
> On the machine, I suppose GNU libiconv is installed and iconv.h coming from GNU 
libiconv is recognized by the compiler but the library directory of GNU libiconv 
is not included in the default library search path.
> Giving LDFLAGS="-L/usr/local/lib -R/usr/local/lib" to configure may solve the 
error.


I have tried this and I am met with the same error still.


----------------------------------------
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.
Posted by Naohisa Goto (Guest)
on 2011-10-03 15:53
(Received via mailing list)
Issue #5384 has been updated by Naohisa Goto.


> I have tried this and I am met with the same error still.

I cannot reproduce the error on my machines running Solaris 10, with GNU 
libiconv or with the native iconv on Solaris 10.  So, I think this would 
be specific to your machine.

If you are using native iconv on Solaris, SUNWuiu8 package is required, 
and SUNWciu8, SUNWhiu8, SUNWjiu8, and SUNWkiu8 packages are recommended.
(Reference: http://developer.gnome.org/glib/2.30/glib-building.html )

Since the iconv issue is different from the main topic, please report 
the issue as a new Bug, with following information and files.

* compiler name and version
* which iconv is installed and used
* configure options
* ./config.log
* ./ext/iconv/mkmf.log

----------------------------------------
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.
Posted by Naohisa Goto (Guest)
on 2011-10-04 15:51
(Received via mailing list)
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.
Posted by Naohisa Goto (Guest)
on 2011-10-05 07:33
(Received via mailing list)
Issue #5384 has been updated by Naohisa Goto.


It seems the problem about the use of dl_iterate_phdr issue() defined in 
<link.h> was already reported, but the bug report seems to be 
disappeared possibly due to the change of project website.

In http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02770.html
> * Until Solaris 11 build 154, <link.h> cannot be used with largefile
>   support.  This is tracked as
>
>   6997934  <link.h> cannot be used in largefile-aware program
>   http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6997934

----------------------------------------
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.
Posted by Naohisa Goto (Guest)
on 2012-02-08 16:08
(Received via mailing list)
Issue #5384 has been updated by Naohisa Goto.

Status changed from Open to Third Party's Issue

I think this is a bug of Illumos (OpenSolaris).

In Solaris 11, it was treated as a bug of Solaris 11 and was already 
fixed.
http://wesunsolve.net/bugid/id/6997934

See the discussion in Illumos community for the progress.
https://www.illumos.org/issues/1587

For a workaround,
  ./configure ac_cv_func_dl_iterate_phdr=no
should work.
----------------------------------------
Bug #5384: Ruby 1.9.3-RC1 Fails to Compile on Illumos (OpenSolaris)
https://bugs.ruby-lang.org/issues/5384

Author: Cyrus Lopez
Status: Third Party's Issue
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.