[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users-jp 00172] Re: mgpnet on linux



>>> Jun-ichiro == Jun-ichiro itojun Itoh <itojun@iijlab.net> さんは
>>>>> <>の中で書きました。

> 	えーと、このパッチでは全然guessしていることにならないのですが、
> 	どこがどうguessできていないか、かわりにguessするならどうすれば
> 	いいのか教えて頂けますか?


よく見てみるとどうも私の環境があやしいのかもしれません。以下状況を報告
させてもらいます。

エラーメッセージによると /usr/include/bytesex.h で #error で止っ
てしまっていました。
$ ./mgpnet ../sample/ascii.mgp
welcome to MagicPoint Netserver...
In file included from /usr/include/sys/wait.h:30,
		 from :2:
/usr/include/gnu/types.h:133: warning: `__FD_SETSIZE' redefined
/usr/include/linux/posix_types.h:33: warning: this is the location of the previous definition
/usr/include/gnu/types.h:136: warning: `__NFDBITS' redefined
/usr/include/linux/posix_types.h:30: warning: this is the location of the previous definition
/usr/include/gnu/types.h:138: warning: `__FDMASK' redefined
/usr/include/linux/posix_types.h:42: warning: this is the location of the previous definition
/usr/include/gnu/types.h:147: warning: `__FD_ZERO' redefined
/usr/include/asm/posix_types.h:61: warning: this is the location of the previous definition
/usr/include/gnu/types.h:148: warning: `__FD_SET' redefined
/usr/include/asm/posix_types.h:41: warning: this is the location of the previous definition
/usr/include/gnu/types.h:149: warning: `__FD_CLR' redefined
/usr/include/asm/posix_types.h:46: warning: this is the location of the previous definition
/usr/include/gnu/types.h:150: warning: `__FD_ISSET' redefined
/usr/include/asm/posix_types.h:54: warning: this is the location of the previous definition
In file included from /usr/include/endian.h:34,
		 from /usr/include/waitstatus.h:70,
		 from /usr/include/sys/wait.h:78,
		 from :2:
/usr/include/bytesex.h:13: #error architecture not supported by the Linux C library
could not guess system parameter. edit by hand.


で
>>>> /usr/include/bytesex.h より

#if defined(__i386__) || defined(__alpha__) \
	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
# define __BYTE_ORDER	1234
#elif defined(__mc68000__) || defined (__sparc__) || defined (__PPC__) \
	|| (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
# define __BYTE_ORDER	4321
#else
# error architecture not supported by the Linux C library
#endif

cpp にオプションなしだと "__なになに__" が定義されないのでそこで終っ
てしまっているようなのですが試しにコマンドラインから次の様にするとエラー
になりません。

$ (cat /usr/include/waitflags.h; echo WNOHANG)|cpp | tail -n1
1

$ ( cat /usr/include/sys/socket.h; echo AF_INET )|cpp | tail -n1
2
とかちゃんと動きます。ところがmgpnetを動かすと先
の様になってしまいます。

やっぱり私の環境が怪しいのでしょうか。もう一度見直してみます。


[参考]
Slackware 3.3/kernel 3.0.34/gcc version 2.7.2.2

perl, version 5.004_04 built for i486-linux
  jperl5.004_04-980303
  EUC version
--
PGP public key http://plaza6.mbn.or.jp/~tito/tito-pgppub.txt
email  tito@ca.mbn.or.jp                        伊藤 剛@BITS