From: djberg96@... (Daniel Berger) Date: 2003-07-30T11:24:43+09:00 Subject: procfs.h problems (continued) Daniel Berger wrote in message news:<3F217F44.2A4DFAC3@qwest.com>... > Yukihiro Matsumoto wrote: > > > > Hello, > > > > In message "Re: ruby 1.8.0 preview4" > > on 03/07/25, "Berger, Daniel" writes: > > > > |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