Hi,
Solaris 9
gcc 3.2
This one appeared in preview2, disappeared in preview3 and has reappeared in
preview 4:
gcc -fPIC -g -O2 -I. -I/opt/lib/ruby/1.8/sparc-solaris2.9
-I/opt/lib/ruby/1.8/sparc-solaris2.9 -I. -c proctable.c
In file included from /usr/include/procfs.h:26,
from lib/os/sunos.h:8,
from proctable.c:10:
/usr/include/sys/procfs.h:44:2: #error "Cannot use procfs in the large
file compilation environment"
make: *** [proctable.o] Error 1
Ideas?
Dan
Yukihiro Matsumoto wrote:
Hello,
This one appeared in preview2, disappeared in preview3 and has reappeared in
preview 4:
gcc -fPIC -g -O2 -I. -I/opt/lib/ruby/1.8/sparc-solaris2.9
-I/opt/lib/ruby/1.8/sparc-solaris2.9 -I. -c proctable.c
In file included from /usr/include/procfs.h:26,
from lib/os/sunos.h:8,
from proctable.c:10:
/usr/include/sys/procfs.h:44:2: #error “Cannot use procfs in the large
file compilation environment”
make: *** [proctable.o] Error 1
Hmm, where can I find proctable.c, which is definitely not in the Ruby
source code?
matz.
It’s caused by the inclusion of the header file, not my source. My
guess is that’s it’s some sort of config issue related to
_FILE_OFFSET_BITS and/or _LARGEFILE64_SOURCE. There’s not much on
Google about it. Here’s a quick tidbit that can be used as a test:
/* foo.c */
#include “ruby.h”
#include <procfs.h>
#include <stdio.h>
static VALUE foo_hello()
{
return rb_str_new2(“Hello”);
}
void Init_foo()
{
VALUE cFoo;
cFoo = rb_define_class(“Foo”,rb_cObject);
rb_define_singleton_method(cFoo,“hello”,foo_hello,0);
}
extconf.rb
require “mkmf”
create_makefile(“foo”)
make
gcc -Wall -fPIC -g -O2 -I. -I/opt/lib/ruby/1.8/sparc-solaris2.9
-I/opt/lib/ruby/1.8/sparc-solaris2.9 -I. -c foo.c
In file included from /usr/include/procfs.h:26,
from foo.c:2:
/usr/include/sys/procfs.h:44:2: #error “Cannot use procfs in the large
file compilation environment”
*** Error code 1
make: Fatal error: Command failed for target `foo.o’
My best bet is to compile p3 and p4 and compare config.log files and
Makefiles. I’m also downloading the gcc 3.3 solaris package as I write
this which apparently has better 64 bit support for solaris. Perhaps
that will magically solve my problems.
Regards,
Dan
···
In message “Re: ruby 1.8.0 preview4” > on 03/07/25, “Berger, Daniel” djberge@qwest.com writes:
Daniel Berger djberge@qwest.com wrote in message news:3F217F44.2A4DFAC3@qwest.com…
Yukihiro Matsumoto wrote:
Hello,
This one appeared in preview2, disappeared in preview3 and has reappeared in
preview 4:
gcc -fPIC -g -O2 -I. -I/opt/lib/ruby/1.8/sparc-solaris2.9
-I/opt/lib/ruby/1.8/sparc-solaris2.9 -I. -c proctable.c
In file included from /usr/include/procfs.h:26,
from lib/os/sunos.h:8,
from proctable.c:10:
/usr/include/sys/procfs.h:44:2: #error “Cannot use procfs in the large
file compilation environment”
make: *** [proctable.o] Error 1
Hmm, where can I find proctable.c, which is definitely not in the Ruby
source code?
More relevant info:
getconf LFS_CFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Offending code in procfs.h:
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
#error “Cannot use procfs in the large file compilation environment”
#endif
So, somehow the _LP64 macro isn’t set. The only way I could get
around this was to build my extension with -m64. That got me past the
build phase, but attempting to load the extension then caused ELFCLASS
errors:
ruby test.rb
…/test/tc_all.rb:38:in require': ld.so.1: ruby: fatal: /home/djberge/local/modules/ruby/sys-proctable-0.5.2/sys/proctable.so: wrong ELF class: ELFCLASS64 - /home/djberge/local/modules/ruby/sys-proctable-0.5.2/sys/proctable.so (LoadError) from ./test/tc_all.rb:38 from test.rb:1:in
require’
from test.rb:1
I tried building Ruby 1.8p5 with the -m64 option which resulted in
this:
gcc -m64 -g -O2 -I. -I. -c io.c
io.c: In function rb_read_pending': io.c:252: error: structure has no member named
_cnt’
io.c: In function rb_read_check': io.c:259: error: structure has no member named
_cnt’
io.c: In function rb_io_eof': io.c:557: error: structure has no member named
_cnt’
io.c:558: error: structure has no member named _cnt' io.c: In function
rb_io_fread’:
io.c:676: error: structure has no member named _cnt' io.c:679: error: structure has no member named
_cnt’
io.c: In function read_all': io.c:773: error: structure has no member named
_cnt’
io.c: In function io_read': io.c:835: error: structure has no member named
_cnt’
io.c: In function appendline': io.c:866: error: structure has no member named
_cnt’
io.c:868: error: structure has no member named _ptr' io.c: In function
swallow’:
io.c:956: error: structure has no member named _cnt' io.c:958: error: structure has no member named
_ptr’
io.c: In function rb_io_each_byte': io.c:1217: error: structure has no member named
_cnt’
io.c: In function rb_io_getc': io.c:1249: error: structure has no member named
_cnt’
io.c: In function rb_getc': io.c:1272: error: structure has no member named
_cnt’
io.c: In function rb_io_sysseek': io.c:1512: error: structure has no member named
_cnt’
io.c: In function rb_io_sysread': io.c:1569: error: structure has no member named
_cnt’
io.c: In function rb_f_select': io.c:3259: error: structure has no member named
_cnt’
*** Error code 1
make: Fatal error: Command failed for target `io.o’
Any ideas?
Regards,
Dan
···
In message “Re: ruby 1.8.0 preview4” > > on 03/07/25, “Berger, Daniel” djberge@qwest.com writes:
Daniel Berger wrote:
Daniel Berger djberge@qwest.com wrote in message news:3F217F44.2A4DFAC3@qwest.com…
Yukihiro Matsumoto wrote:
Hello,
This one appeared in preview2, disappeared in preview3 and has reappeared in
preview 4:
gcc -fPIC -g -O2 -I. -I/opt/lib/ruby/1.8/sparc-solaris2.9
-I/opt/lib/ruby/1.8/sparc-solaris2.9 -I. -c proctable.c
In file included from /usr/include/procfs.h:26,
from lib/os/sunos.h:8,
from proctable.c:10:
/usr/include/sys/procfs.h:44:2: #error “Cannot use procfs in the large
file compilation environment”
make: *** [proctable.o] Error 1
Hmm, where can I find proctable.c, which is definitely not in the Ruby
source code?
More relevant info:
getconf LFS_CFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Offending code in procfs.h:
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
#error “Cannot use procfs in the large file compilation environment”
#endif
Note for those interested - building ruby with the --disable-largefile
option seems to solve this problem. Not ideal, however.
Regards,
Dan
···
In message “Re: ruby 1.8.0 preview4” > > > on 03/07/25, “Berger, Daniel” djberge@qwest.com writes: