0

cygwinでスキンを流してみたいと思いました。

シェッド スキンlibgcのインストールは問題ないように見えますがmake、シェッド スキンの Python スクリプトを実行しようとすると、次のようにエラーが表示されます。

/usr/lib/python2.7/site-packages/shedskin/lib/builtin.hpp:31:22: fatal error: execinfo.h: No such file or directory
compilation terminated.

(以下の完全なリスト)

libgc の Cygwin にインストールされているファイルのリストを確認しましたが、 execinfo.hは含まれていません。

Cygwinではshed スキンを使用できないということですか?


$ Make
g++  -O2 -march=native -Wno-deprecated  -I. -I/usr/lib/python2.7/site-packages/shedskin/lib -g -fPIC -D__SS_BIND -I/usr/include/python2.7 -I/usr/include/python2.7 /home/Administrator/python/shedskin/shedskinfn.cpp /usr/lib/python2.7/site-packages/shedskin/lib/re.cpp /usr/lib/python2.7/site-packages/shedskin/lib/builtin.cpp -lgc -lpcre  -shared -Xlinker -export-dynamic -ldl  -lpython2.7 -o shedskinfn.so
/home/Administrator/python/shedskin/shedskinfn.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
 #include "builtin.hpp"
 ^
In file included from /home/Administrator/python/shedskin/shedskinfn.cpp:1:0:
/usr/lib/python2.7/site-packages/shedskin/lib/builtin.hpp:31:22: fatal error: execinfo.h: No such file or directory
compilation terminated.
/usr/lib/python2.7/site-packages/shedskin/lib/re.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
 /* Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE) */
 ^
In file included from /usr/lib/python2.7/site-packages/shedskin/lib/re.hpp:9:0,
                 from /usr/lib/python2.7/site-packages/shedskin/lib/re.cpp:3:
/usr/lib/python2.7/site-packages/shedskin/lib/builtin.hpp:31:22: fatal error: execinfo.h: No such file or directory
compilation terminated.
/usr/lib/python2.7/site-packages/shedskin/lib/builtin.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
 /* Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE) */
 ^
In file included from /usr/lib/python2.7/site-packages/shedskin/lib/builtin.cpp:3:0:
/usr/lib/python2.7/site-packages/shedskin/lib/builtin.hpp:31:22: fatal error: execinfo.h: No such file or directory
compilation terminated.
Makefile:17: recipe for target 'shedskinfn.so' failed
Make: *** [shedskinfn.so] Error 1

編集1:

不足しているexecinfo.h (インターネットからダウンロード) を make の lib パスに追加しても役に立ちません。

$ shedskin  -L `pwd`  shedskinfn.py && make
*** SHED SKIN Python-to-C++ Compiler 0.9.4 ***
Copyright 2005-2011 Mark Dufour; License GNU GPL version 3 (See LICENSE)

[analyzing types..]
********************************100%
[generating c++ code..]
[elapsed time: 2.43 seconds]
g++  -O2 -march=native -Wno-deprecated  -I. -I/usr/lib/python2.7/site-packages/shedskin/lib -I/home/Administrator/python/shedskin /home/Administrator/python/shedskin/shedskinfn.cpp /usr/lib/python2.7/site-packages/shedskin/lib/re.cpp /usr/lib/python2.7/site-packages/shedskin/lib/builtin.cpp -lgc -lpcre  -o shedskinfn
In file included from /usr/lib/python2.7/site-packages/shedskin/lib/builtin.cpp:147:0:
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp: In function '__shedskin__::str* __shedskin__::do_asprintf_str(const char*, __shedskin__::str*, __shedskin__::pyobj*, __shedskin__::pyobj*)':
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:93:104: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, ((int)(((int_ *)a1)->unit)), ((int)(((int_ *)a2)->unit)), s->unit.c_str());
                                                                                                        ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:95:75: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, ((int)(((int_ *)a1)->unit)), s->unit.c_str());
                                                                           ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:97:46: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, s->unit.c_str());
                                              ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp: In instantiation of '__shedskin__::str* __shedskin__::do_asprintf(const char*, T, __shedskin__::pyobj*, __shedskin__::pyobj*) [with T = int]':
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:129:91:   required from here
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:70:21: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, ((int)(((int_ *)a1)->unit)), ((int)(((int_ *)a2)->unit)), t);
                     ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:72:21: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, ((int)(((int_ *)a1)->unit)), t);
                     ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:74:21: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, t);
                     ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp: In instantiation of '__shedskin__::str* __shedskin__::do_asprintf(const char*, T, __shedskin__::pyobj*, __shedskin__::pyobj*) [with T = double]':
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:136:93:   required from here
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:70:21: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, ((int)(((int_ *)a1)->unit)), ((int)(((int_ *)a2)->unit)), t);
                     ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:72:21: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, ((int)(((int_ *)a1)->unit)), t);
                     ^
/usr/lib/python2.7/site-packages/shedskin/lib/builtin/format.cpp:74:21: error: 'asprintf' was not declared in this scope
         x = asprintf(&d, fmt, t);
                     ^
Makefile:17: recipe for target 'shedskinfn' failed
make: *** [shedskinfn] Error 1
4

1 に答える 1

1

ええと、以前に Cygwin で shedskin を使おうとした人を私は知りません。それは主に、ある時点でネイティブ Windows の (限定的な) サポートがあったからだと思います。

それでも、あなたが抱えている問題には Cygwin 自体の既知の制限がいくつかあります。これは、Gnulibなどの互換性レイヤーを使用することで何らかの形で軽減できる可能性があります。

asprintf の問題#include修正される可能性がありますが、stdio.hどこかが欠けているだけかもしれません。

いずれにせよ、私は Windows をまったく使用していないため、Cygwin の完全なサポートを保証することはできませんが、shedskin-discuss@googlegroups.com に電子メールを送ってください。詳しく調べたい人がいるかもしれません。修正やドキュメントに貢献したい場合は、GitHub で支援を歓迎します

于 2016-04-19T15:11:22.367 に答える