Gauche > Archives > 2009/11/01

2009/11/01 05:51:39 UTCllibra
#
OpenSolaris snv_126でrc1をmake checkしました。
#
Total: 9709 tests, 9705 passed, 4 failed, 1 aborted.
2009/11/01 05:55:55 UTCllibra
#
失敗してるのは、
#
test open-input-process-port (redirect/error): expects #t => got #f
test call-with-input-process (redirect/error - ignore): expects #t => got #f
test call-with-input-process (redirect/error - handle): expects 1 => got 2
test call-with-input-process (redirect/error - handle): expects 1 => got 2
#
これは/bin/shがksh93だからっぽいです。
2009/11/01 07:05:46 UTCshiro
#
abortしたのはどのテストだかわかりますか?
#
kshでも2>ってリダイレクトはできると思うんだけどだめなのかな。
2009/11/01 09:04:22 UTCshiro
#
いや、そんなことないな。ksh version 1993-12-28 を入れてそっちを使うようにしてみたけれど、Linuxだとちゃんと通る。
#
実機上でどういう差が出てるのかやってみないと判断できないかな。
#
abortedの方が気になる。
2009/11/01 10:17:05 UTCllibra
#
ksh93経由の場合、エラーメッセージが微妙に他と違うようです。
#
cat: NoSuchFile: cannot open [No such file or directory]
#
それ以外だと、
#
cat: cannot open NoSuchFile: No such file or directory
#
バージョンは2008-11-04です。
#
あと、expects 1 => got 2の方は、catが終了ステータスで2を返している模様。abortedの方はちょっと見てみます。
2009/11/01 12:50:09 UTCnaoya_t
#
うちのMacBook Proでも0.9_rc1を正常にビルドできました。(インストール時にginstall回りでエラーが出て、coreutilsなどバージョンアップする必要がありました)
#
↑OSX10.6.1です
2009/11/01 14:30:46 UTCふじさわ
#
手元にあるDebian lennyでrc1をコンパイルしてみたんですが、どうもうまくいかないです。makeすると次のエラーが出ました。
#
make[1]: ディレクトリ `/ext/home/fujisawa/work/20091101/Gauche/src' に入ります
/bin/sh ./genconfig
GAUCHE_LOAD_PATH="" GAUCHE_DYNLOAD_PATH="" gosh -l./preload -I../src -I../lib ./
builtin-syms.scm
gosh: "error": Compile Error: Compile Error: wrong number of arguments for #<clo
sure make-cgen-type> (required 7, got 6)
#
./DIST genしたときにwarningが出ていて、autoconfのバージョンに問題があるのかもしれません。warningは以下です。
#
$ ./DIST gen
aclocal.m4:16: warning: this file was generated for autoconf 2.64.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
#
$ autoconf --version
autoconf (GNU Autoconf) 2.61
2009/11/01 15:09:28 UTCshiro
#
>ふじさわ tarballから入れるとどうなりますか。tarballからの場合は./DIST genは不要で、autoconfのバージョンも関係ないはずです。
2009/11/01 15:14:18 UTCshiro
#
> libra どちらのエラーメッセージもcatコマンドに吐かせているので、それが違うということは、もしかしてksh経由と直接execを呼ぶ場合とで呼ばれるcatコマンド自体が違うとか。SolarisだとBSD互換コマンドとSolaris本来のやつと2つcatを持ってたりして。ちょっと実際に実行されてるcatコマンドの実体を調べてみて頂けますか。
2009/11/01 21:45:13 UTCshiro
#
む。
#
Core Duoのマシンでthreadのテストが刺さる現象が。simple spin-lockのところ。しかし何度走らせても再現できない…
2009/11/01 21:51:44 UTCenami
#
error message が違うなら他にも失敗しそうなのに実際には成功しているテストがあるのも不思議ですね。
2009/11/01 21:54:08 UTCllibra
#
Shiroさん正解です。調べてみたところ、ksh93はビルトインでcat持ってます。
#
あと、abortしてたのは、netだったみたいです。
#
In file included from ../../src/gauche.h:44,
                 from gauche-net.h:40,
                 from net.c:36:
../../src/gauche/config.h:372:1: warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/types.h:33,
                 from gauche-net.h:39,
                 from net.c:36:
/usr/include/sys/feature_tests.h:209:1: warning: this is the location of the previous definition
net.c: In function `Scm_SocketBuildMsg':
net.c:537: warning: implicit declaration of function `CMSG_SPACE'
net.c:539: error: structure has no member named `msg_controllen'
net.c:541: error: structure has no member named `msg_control'
net.c:543: error: structure has no member named `msg_control'
net.c:545: warning: implicit declaration of function `CMSG_FIRSTHDR'
net.c:545: warning: assignment makes pointer from integer without a cast
net.c:552: warning: implicit declaration of function `CMSG_LEN'
net.c:553: warning: implicit declaration of function `CMSG_DATA'
net.c:553: warning: passing arg 1 of `memcpy' makes pointer from integer without a cast
net.c:554: warning: implicit declaration of function `CMSG_NXTHDR'
net.c:554: warning: assignment makes pointer from integer without a cast
net.c:557: error: structure has no member named `msg_control'
net.c:558: error: structure has no member named `msg_controllen'
net.c:560: error: structure has no member named `msg_flags'
gmake[2]: *** [net.o] エラー 1
2009/11/01 21:58:24 UTCshiro
#
>libra なるほど。catについてはPATHを自力で調べてフルパスで起動すれば回避できるかもしれませんが、それほど大きな問題でないので0.9ではwon't fixにします。net.cの方はsendmsg絡みですね。ヘッダが足りないっぽいですね。man sendmsgしたらどのヘッダが必要と書いてありますか?
2009/11/01 22:01:17 UTCllibra
#
struct msghdrはsys/socketで定義されてるんですが、
#
struct msghdr {
        void            *msg_name;              /* optional address */
        socklen_t       msg_namelen;            /* size of address */
        struct iovec    *msg_iov;               /* scatter/gather array */
        int             msg_iovlen;             /* # elements in msg_iov */

#if defined(_XPG4_2) || defined(_KERNEL)
        void            *msg_control;           /* ancillary data */
        socklen_t       msg_controllen;         /* ancillary data buffer len */
        int             msg_flags;              /* flags on received message */
#else
        caddr_t         msg_accrights;  /* access rights sent/received */
        int             msg_accrightslen;
#endif  /* defined(_XPG4_2) || defined(_KERNEL) */
};
#
だそうで、XPG4v2用のコンパイルオプションを付けないと、メンバが定義されないようです。
2009/11/01 22:06:29 UTCshiro
#
ふーむ。構造体のメンバが違うってことはバイナリ互換性が無くなるので、_XPG4_2を定義したらリンクするライブラリも別にしなくちゃならないような気がします。むしろnet.acでmsg_controlの有無を調べて切り替えるべきかなあ。CMSG_マクロの方はわかります?
2009/11/01 22:10:35 UTCllibra
#
そちらも、sys/socket.hで、#if defined(_XPG4_2)の中で定義されています。
2009/11/01 22:31:54 UTCllibra
#
sys/socket.hは http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/socket.h に、どういうマクロ定義があるとPOSIX/XPG互換になるかというのは、 http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/feature_tests.h にあります。