Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > 64-bit Ruby on Solaris?

Reply
Thread Tools

64-bit Ruby on Solaris?

 
 
Daniel Berger
Guest
Posts: n/a
 
      10-31-2003
Hi all,

Solaris 9
gcc 3.3.1
Ruby 1.8.1 p2
Sunblade 100, UltraSparc IIe

As usual, I'm playing with things I don't truly understand. Anyway, I
thought I'd try building 1.8.1 p2 as 64 bit since I've upgraded my
compiler since last time.

After running configure, I manually added "-m64 -mcpu=ultrasparc" into
the CC line of the Makefile. I seemed to get further this time, and
died with a different error:

gcc -m64 -mcpu=ultrasparc -g -O2 -I. -I. -c io.c
io.c: In function `rb_read_pending':
io.c:259: error: structure has no member named `_cnt'
io.c: In function `rb_read_check':
io.c:266: error: structure has no member named `_cnt'
io.c: In function `rb_io_eof':
io.c:564: error: structure has no member named `_cnt'
io.c:565: error: structure has no member named `_cnt'
io.c: In function `rb_io_fread':
io.c:683: error: structure has no member named `_cnt'
io.c:686: error: structure has no member named `_cnt'
io.c: In function `read_all':
io.c:780: error: structure has no member named `_cnt'
io.c: In function `io_read':
io.c:842: error: structure has no member named `_cnt'
io.c: In function `appendline':
io.c:873: error: structure has no member named `_cnt'
io.c:875: error: structure has no member named `_ptr'
io.c: In function `swallow':
io.c:963: error: structure has no member named `_cnt'
io.c:965: error: structure has no member named `_ptr'
io.c: In function `rb_io_each_byte':
io.c:1222: error: structure has no member named `_cnt'
io.c: In function `rb_io_getc':
io.c:1254: error: structure has no member named `_cnt'
io.c: In function `rb_getc':
io.c:1277: error: structure has no member named `_cnt'
io.c: In function `rb_io_sysseek':
io.c:1515: error: structure has no member named `_cnt'
io.c: In function `rb_io_sysread':
io.c:1572: error: structure has no member named `_cnt'
io.c: In function `rb_f_select':
io.c:3256: error: structure has no member named `_cnt'
make: *** [io.o] Error 1

Here's my config.h file:
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_UNISTD_H 1
#define _FILE_OFFSET_BITS 64
#define HAVE_LONG_LONG 1
#define HAVE_OFF_T 1
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF___INT64 0
#define SIZEOF_OFF_T 8
#define SIZEOF_VOIDP 4
#define SIZEOF_FLOAT 4
#define SIZEOF_DOUBLE 8
#define HAVE_PROTOTYPES 1
#define TOKEN_PASTE(x,y) x##y
#define HAVE_STDARG_PROTOTYPES 1
#define NORETURN(x) x __attribute__ ((noreturn))
#define HAVE_DECL_SYS_NERR 0
#define HAVE_LIBCRYPT 1
#define HAVE_LIBDL 1
#define HAVE_DIRENT_H 1
#define STDC_HEADERS 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_UNISTD_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SYS_FILE_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_FCNTL_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_PWD_H 1
#define HAVE_GRP_H 1
#define HAVE_UTIME_H 1
#define HAVE_MEMORY_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_MKDEV_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_FLOAT_H 1
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
#define HAVE_ST_BLKSIZE 1
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
#define HAVE_ST_BLOCKS 1
#define HAVE_STRUCT_STAT_ST_RDEV 1
#define HAVE_ST_RDEV 1
#define GETGROUPS_T gid_t
#define RETSIGTYPE void
#define HAVE_ALLOCA_H 1
#define HAVE_ALLOCA 1
#define HAVE_FSEEKO 1
#define HAVE_FTELLO 1
#define HAVE_DUP2 1
#define HAVE_MEMMOVE 1
#define HAVE_MKDIR 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOUL 1
#define HAVE_CRYPT 1
#define HAVE_VSNPRINTF 1
#define HAVE_ISNAN 1
#define HAVE_FINITE 1
#define HAVE_HYPOT 1
#define HAVE_ACOSH 1
#define HAVE_ERF 1
#define HAVE_FMOD 1
#define HAVE_KILLPG 1
#define HAVE_WAIT4 1
#define HAVE_WAITPID 1
#define HAVE_SYSCALL 1
#define HAVE_CHROOT 1
#define HAVE_FSYNC 1
#define HAVE_TRUNCATE 1
#define HAVE_TIMES 1
#define HAVE_UTIMES 1
#define HAVE_FCNTL 1
#define HAVE_LOCKF 1
#define HAVE_LSTAT 1
#define HAVE_SYMLINK 1
#define HAVE_READLINK 1
#define HAVE_SETITIMER 1
#define HAVE_SETEUID 1
#define HAVE_SETREUID 1
#define HAVE_SETEGID 1
#define HAVE_SETREGID 1
#define HAVE_ISSETUGID 1
#define HAVE_PAUSE 1
#define HAVE_LCHOWN 1
#define HAVE_GETPGRP 1
#define HAVE_SETPGRP 1
#define HAVE_GETPGID 1
#define HAVE_SETPGID 1
#define HAVE_INITGROUPS 1
#define HAVE_GETGROUPS 1
#define HAVE_SETGROUPS 1
#define HAVE_GETPRIORITY 1
#define HAVE_GETRLIMIT 1
#define HAVE_DLOPEN 1
#define HAVE_SIGPROCMASK 1
#define HAVE_SIGACTION 1
#define HAVE__SETJMP 1
#define HAVE_SETSID 1
#define HAVE_TELLDIR 1
#define HAVE_SEEKDIR 1
#define HAVE_FCHMOD 1
#define HAVE_MKTIME 1
#define HAVE_COSH 1
#define HAVE_SINH 1
#define HAVE_TANH 1
#define HAVE_SETUID 1
#define HAVE_SETGID 1
#define HAVE_TZNAME 1
#define HAVE_DAYLIGHT 1
#define NEGATIVE_TIME_T 1
#define POSIX_SIGNAL 1
#define GETPGRP_VOID 1
#define SETPGRP_VOID 1
#define WORDS_BIGENDIAN 1
#define RSHIFT(x,y) ((x)>>(int)y)
#define FILE_COUNT _cnt
#define FILE_READPTR _ptr
#define NEED_IO_SEEK_BETWEEN_RW 1
#define HUGE_ST_INO 1
#define STACK_GROW_DIRECTION -1
#define DEFAULT_KCODE KCODE_NONE
#define USE_ELF 1
#define DLEXT ".so"
#define RUBY_LIB "/opt/lib/ruby/1.8"
#define RUBY_SITE_LIB "/opt/lib/ruby/site_ruby"
#define RUBY_SITE_LIB2 "/opt/lib/ruby/site_ruby/1.8"
#define RUBY_PLATFORM "sparc-solaris2.9"
#define RUBY_ARCHLIB "/opt/lib/ruby/1.8/sparc-solaris2.9"
#define RUBY_SITE_ARCHLIB "/opt/lib/ruby/site_ruby/1.8/sparc-solaris2.9"

I tried messing with the LDFLAGS and CFLAGS settings as well but no
luck. Any ideas?

Regards,

Dan

 
Reply With Quote
 
 
 
 
Yukihiro Matsumoto
Guest
Posts: n/a
 
      10-31-2003
Hi,

In message "64-bit Ruby on Solaris?"
on 03/10/31, Daniel Berger <(E-Mail Removed)> writes:

|Solaris 9
|gcc 3.3.1
|Ruby 1.8.1 p2
|Sunblade 100, UltraSparc IIe
|
|As usual, I'm playing with things I don't truly understand. Anyway, I
|thought I'd try building 1.8.1 p2 as 64 bit since I've upgraded my
|compiler since last time.
|
|After running configure, I manually added "-m64 -mcpu=ultrasparc" into
|the CC line of the Makefile. I seemed to get further this time, and
|died with a different error:

Seems like configure failed to detect platform stdio information. I
hope you (or others) can help me to support newer Solaris.

matz.

 
Reply With Quote
 
 
 
 
Daniel Berger
Guest
Posts: n/a
 
      10-31-2003
ts wrote:
>
> >>>>> "D" == Daniel Berger <(E-Mail Removed)> writes:

>
> Here the reason, why it don't find _cnt and _ptr
>
> D> #ifdef _LP64
> D> #ifndef _FILE64_H
> D> struct __FILE_TAG {
> D> long __pad[16];
> D> };
> D> #endif /* _FILE64_H */
>
> Guy Decoux


Sorry if the attachment on that last post didn't come through properly -
ack.

In any case, I tried setting CFLAGS to '-m64 -mcpu=ultrasparc' (which I
thought I had done but apparently not) and then re-running configure.
The good news is that configure seems to work properly, i.e. I got past
io.c without incident. However, it died when I got here:

gcc -fPIC -m64 -mcpu=ultrasparc -I. -I/usr/local/src/ruby-1.8.1
-I/usr/local/src/ruby-1.8.1 -I/usr/local/src/ruby-1.8.1/ext/bigdecimal
-c bigdecimal.c
gcc -Wl,-G -L"/usr/local/src/ruby-1.8.1" -L"/opt/lib" -o bigdecimal.so
bigdecimal.o -ldl -lcrypt -lm -lc
ld: fatal: file bigdecimal.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to bigdecimal.so
collect2: ld returned 1 exit status
make[1]: *** [bigdecimal.so] Error 1
make[1]: Leaving directory `/usr/local/src/ruby-1.8.1/ext/bigdecimal'
make: *** [all] Error 1

I tried setting LDFLAGS to '-m64' but that didn't seem to help. Is
there some other env variable I need to set?

Regards,

Dan

 
Reply With Quote
 
ts
Guest
Posts: n/a
 
      11-01-2003
>>>>> "D" == Daniel Berger <(E-Mail Removed)> writes:

D> ld: fatal: file bigdecimal.o: wrong ELF class: ELFCLASS64

What say file bigdecimal.o and what loader do you use (/usr/ccs/bin/ld
or ? )


Guy Decoux

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby extension (C++) on OS X [ruby 1.8.2] and Google-Sketchup [ruby 1.8.5] Nicholas Ruby 3 01-28-2007 01:48 AM
The Ruby Edge - Digg for Ruby and Ruby On Rails roschler Ruby 0 10-15-2006 11:35 PM
ruby-talk, comp.lang.ruby, ruby-talk-google Phrogz Ruby 4 09-06-2006 06:43 PM
#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1... anne001 Ruby 1 04-23-2006 03:02 PM
[ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge guillaume.pierronnet@ratp.fr Ruby 0 08-31-2003 11:57 PM



Advertisments