1

Centos 2.6 で vSphere Perl SDK をビルドしようとしています。1つ、つまりUUID-0.05を除くすべての依存関係を取得しました。

問題は、uuid.h インクルード ファイルが uuid_t の定義のために unistd.h を参照しているようですが、unistd.h にはそのようなものがありません。さらに悪いことに、この変数の 2 つのインクルード ファイルが競合していると説明した人もいますが、インターネット上でその定義を含む unistd.h ファイルを見つけることができません。

誰かがそのような unistd.h ファイルを指すことができますか? または、より良いアプローチをとることさえできますか?

元の問題に関する情報は次のとおりです。

uuid.1.6.2 の変更ログ:

o uuid_t (Darwin/MacOSX) または uuid_create/uuid_compare (POSIX) が存在する可能性があるベンダー UUID 実装との競合を避けるために、uuid.h に回避策を適用します。【ラルフ・S・エンゲルシャル】

uuid.h で:

/* workaround conflicts with system headers */
#define uuid_t       __vendor_uuid_t
#define uuid_create  __vendor_uuid_create
#define uuid_compare __vendor_uuid_compare
#include <sys/types.h>
#include <unistd.h>
#undef  uuid_t
#undef  uuid_create
#undef  uuid_compare

これが元の問題です(コンパイル):

jloiacon@flowviewerprime /home/jloiacon/UUID-0.05 249 >make
cp UUID.pm blib/lib/UUID.pm
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp  -typemap /usr/share/perl5/ExtUtils/typemap  UUID.xs > UUID.xsc && mv UUID.xsc UUID.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"0.05\" -DXS_VERSION=\"0.05\" -fPIC "-I/usr/lib64/perl5/CORE"   UUID.c
UUID.xs: In function âdo_generateâ:
UUID.xs:13: error: storage size of âuuidâ isnât known
UUID.xs:14: warning: implicit declaration of function âuuid_generateâ
UUID.xs:13: warning: unused variable âuuidâ
UUID.xs: In function âdo_unparseâ:
UUID.xs:20: error: storage size of âuuidâ isnât known
UUID.xs:23: warning: implicit declaration of function âuuid_unparseâ
UUID.xs:20: warning: unused variable âuuidâ
UUID.xs: In function âdo_parseâ:
UUID.xs:29: error: storage size of âuuidâ isnât known
UUID.xs:33: warning: implicit declaration of function âuuid_parseâ
UUID.xs:30: warning: unused variable âstrâ
UUID.xs:29: warning: unused variable âuuidâ
make: *** [UUID.o] Error 1

ありがとう

4

1 に答える 1

0

インストールしますuuid-c++-devel

ロレム・イプサム

于 2013-08-07T14:13:21.630 に答える