From: Yuji Shigehiro Date: 1999-06-25T13:46:10+09:00 Subject: [ruby-list:15108] ruby-1.3.4-990611 can not compile on alphaev56-osf4.0e 重弘です. お世話になっております. VT-Alpha (Alpha 互換機) 上で ruby-1.3.4-990611 を作ろうと思ったのです が, 以下のように, コンパイルできません. コンパイラは gcc version 2.8.1 です. よろしくお願いします. ---- ここから ---- gcc -g -O2 -I. -I. -I/usr/local/include -c pack.c pack.c: In function `encodes': pack.c:868: warning: type mismatch in implicit declaration for built-in function `alloca' pack.c: In function `pack_unpack': pack.c:1182: parse error before `)' pack.c:1192: parse error before `)' pack.c:1201: parse error before `)' pack.c:1212: parse error before `)' pack.c:1223: parse error before `)' pack.c:1234: parse error before `)' pack.c:1245: parse error before `)' pack.c:1256: parse error before `)' pack.c:1267: parse error before `)' pack.c:1279: parse error before `)' pack.c:1291: parse error before `)' pack.c:1303: parse error before `)' pack.c:1316: parse error before `)' pack.c:1327: parse error before `)' pack.c:1341: parse error before `)' pack.c:1356: parse error before `)' pack.c:1367: parse error before `)' pack.c:1381: parse error before `)' make: *** [pack.o] Error 1 ---- ここまで ---- いろいろやってみて, #define PACK_LENGTH_ADJUST(type,sz) do { \ int t__len = NATINT_LEN((type),(sz)); \ ----------------------------^----^ の部分を int t__len = NATINT_LEN(type,(sz)); \ と直せば, コンパイルは通ることがわかりました. (すなわち, 現在は, NATINT_LEN() が展開されたときに sizeof((type)) となり, エラーになっている...?) が, この修正では, make test したときに not ok pack 2 -- /usr/local/DIST/ruby-1.3.4-990611-patched/sample/test.rb:999 test failed と怒られます. (まあ, 他を見ずに修正している私が悪いのですが...) ---- 重弘裕二 大阪工業大学工学部電気工学科 (sigehiro@ee.oit.ac.jp)