[#39222] [Bug #2036] AIX 5L 5.2にて、ruby-1.8.7-p174のビルド時にmake testをするとエラーになった。not ok float 7 -- ./sample/test.rb:1232 — 和弥 寺元 <redmine@...>

Bug #2036: AIX 5L 5.2にて、ruby-1.8.7-p174のビルド時にmake testをするとエラーになった。not ok float 7 -- ./sample/test.rb:1232

13 messages 2009/09/03

[#39249] [Bug #2060] DLをCからRubyに変換する事を勧めます — Aaron Patterson <redmine@...>

Bug #2060: DLをCからRubyに変換する事を勧めます

10 messages 2009/09/07

[#39282] [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — takeru sasaki <redmine@...>

チケット #2067 が更新されました。 (by takeru sasaki)

15 messages 2009/09/10
[#39283] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — Yukihiro Matsumoto <matz@...> 2009/09/10

まつもと ゆきひろです

[#39284] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — Nobuyoshi Nakada <nobu@...> 2009/09/10

なかだです。

[#39297] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — Yukihiro Matsumoto <matz@...> 2009/09/10

まつもと ゆきひろです

[#39298] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — Tanaka Akira <akr@...> 2009/09/10

In article <E1MliJq-0000yc-4o@x61.netlab.jp>,

[#39302] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — takeru sasaki <sasaki.takeru@...> 2009/09/10

言いだしっぺの佐々木です。

[#39307] Re: [Bug #2067] bodyが大きいエラーページをopen-uriで取得するとfdがリークしている — Yukihiro Matsumoto <matz@...> 2009/09/10

まつもと ゆきひろです

[#39345] [Bug #2111] Error:test_rm_f(TestFileUtils) — Kazuhiro NISHIYAMA <redmine@...>

Bug #2111: Error:test_rm_f(TestFileUtils)

11 messages 2009/09/17

[#39352] [ruby19] Thread 切替えが異常に遅い? — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

12 messages 2009/09/20

[#39367] Almost endless loop of BigMath::atan(x) when x.abs >= 1 — "Masahiro Kanai (CanI)" <cani.m.61st@...>

金井 仁弘と申します。

13 messages 2009/09/23
[#39980] Re: Almost endless loop of BigMath::atan(x) when x.abs >= 1 — TOYOFUKU Chikanobu <nobu_toyofuku@...> 2010/01/07

豊福です。遅い反応ですが。

[#39982] Re: Almost endless loop of BigMath::atan(x) when x.abs >= 1 — TOYOFUKU Chikanobu <nobu_toyofuku@...> 2010/01/07

豊福です。

[#39388] Re: [ruby-cvs:32331] Ruby:r25113 (trunk): String#inspect's encoding should be fixed. — "Martin J. Dürst" <duerst@...>

成瀬さん、こんにちは。

9 messages 2009/09/28

[ruby-dev:39350] [Bug #2118] SUN の cc (SunStudio11 C 5.8 コンパイラ) で dir.c のコンパイルに失敗する

From: Naohisa Goto <redmine@...>
Date: 2009-09-18 11:49:32 UTC
List: ruby-dev #39350
Bug #2118: SUN の cc (SunStudio11 C 5.8 コンパイラ) で dir.c のコンパイルに失敗する
http://redmine.ruby-lang.org/issues/show/2118

起票者: Naohisa Goto
ステータス: Open, 優先度: Normal
ruby -v: ruby 1.9.2dev (2009-09-18) [sparc-solaris2.10]

Solaris10 上の Sun Studio 11 C 5.8 コンパイラにて trunk r25000 の
コンパイルに失敗します。

$ ./configure --prefix=/XXXXX/testruby/sparc/trunk-25000_64cc \
  MAKE=/usr/local/64/bin/make \
  CC=/opt/SUNWspro/bin/cc \
  CXX=/opt/SUNWspro/bin/CC \
  CFLAGS="-xarch=v9 -xtarget=native64 -I/usr/local/64/include" \
  LDSHARED="/opt/SUNWspro/bin/cc -G" \
  LDFLAGS="-xarch=v9 -xtarget=native64 -L/usr/local/64/lib -R/usr/local/64/lib"

$ /usr/local/64/bin/make
(中略)
/opt/SUNWspro/bin/cc -xarch=v9 -xtarget=native64 -I/usr/local/64/include -I. -I.ext/include/sparc-solaris2.10 -I./include -I. -DRUBY_EXPORT   -o dir.o -c dir.c
"./include/ruby/ruby.h", line 958: warning: implicit function declaration: rb_type
"dir.c", line 394: operands have incompatible types:
         void ":" unsigned long
"dir.c", line 394: operands have incompatible types:
         volatile unsigned long ":" void
"dir.c", line 1632: operands have incompatible types:
         void ":" unsigned long
"dir.c", line 1632: operands have incompatible types:
         volatile unsigned long ":" void
"dir.c", line 1662: operands have incompatible types:
         void ":" unsigned long
"dir.c", line 1662: operands have incompatible types:
         volatile unsigned long ":" void
cc: acomp failed for dir.c
make: *** [dir.o] Error 2

Warningはいったんは無視して、エラーに着目すると、

"dir.c", line 394: operands have incompatible types:
         void ":" unsigned long
が発生している行の内容は、
    GlobPathValue(dirname, FALSE);
です。これはマクロで、
#define GlobPathValue(str, safe) \
    /* can contain null bytes as separators */	\
    (!RB_TYPE_P(str, T_STRING) ?		\
     FilePathValue(str) :			\
     (safe) ? rb_check_safe_obj(str) : (str))
のように3項演算子を使用していて、
この中で rb_check_safe_obj(str) が void を返す関数のため、
3項演算子内で型に互換性がないというエラーを出しているようです。

以下のように「,」を使って値 0 を返すようにしたらコンパイルは通りました。
rb_check_safe_obj(str) を囲む()は不要かもしれませんが念のため入れました。
===================================================================
--- dir.c	(revision 25000)
+++ dir.c	(working copy)
@@ -343,7 +343,7 @@
     /* can contain null bytes as separators */	\
     (!RB_TYPE_P(str, T_STRING) ?		\
      FilePathValue(str) :			\
-     (safe) ? rb_check_safe_obj(str) : (str))
+     (safe) ? ((rb_check_safe_obj(str)),0) : (str))
 
 static VALUE
 dir_s_alloc(VALUE klass)
===================================================================


"./include/ruby/ruby.h", line 958: warning: implicit function declaration: rb_type
は今のところ gcc 以外の場合にのみ出る warning のようで、
rb_type のプロトタイプ宣言を TYPE() が使われる前に入れれば消えました。
===================================================================
--- include/ruby/ruby.h	(revision 25000)
+++ include/ruby/ruby.h	(working copy)
@@ -952,6 +952,7 @@
 #ifdef __GNUC__
 # define NUM2CHR(x) ({VALUE num2chr_x = (x); NUM2CHR_internal(num2chr_x);})
 #else
+static inline int rb_type(VALUE);
 static inline char
 NUM2CHR(VALUE x)
 {
===================================================================


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next