Project

General

Profile

Actions

Bug #3260

closed

Can't build Ruby with SunStudio on sparc Solaris

Added by yugui (Yuki Sonoda) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-05-08 trunk 27674) [sparc-solaris2.10]
Backport:
[ruby-dev:41227]

Description

=begin
trunkをsparc solaris上でSunのccでコンパイルした場合、次のエラーが出てext/jsonをビルドできませんでした。

ccache cc -I. -I../../../.ext/include/sparc-solaris2.10 -I../../../../../mri/include -I../../../../../mri/ext/json/generator -DRUBY_EXTCONF_H=¥"extconf.h¥" -D_FILE_OFFSET_BITS=64 -KPIC -m32 -xO4 -g -ogenerator.o -c ../../../../../mri/ext/json/generator/generator.c
"../../../../../mri/ext/json/generator/generator.c", line 342: a cast does not yield an lvalue
cc: acomp failed for /export/home/yugui/.ccache/generator.tmp.blade1000dev.home.yugui.jp.18621.i
*** Error code 1
make: Fatal error: Command failed for target `generator.o'
Current working directory /export/home/yugui/dev/ruby/build/1.9.2/ext/json/generator

当該箇所を見ると次のようになってます。
fb->ptr = (char ) REALLOC_N((long) fb->ptr, char, required);

このlong*へのキャストってどういう意図で行ってますか?
=end

Actions

Also available in: Atom PDF

Like0
Like0