首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >可以在Cygwin ( libgc安装时缺少execinfo.h)使用脱落的皮肤吗?

可以在Cygwin ( libgc安装时缺少execinfo.h)使用脱落的皮肤吗?
EN

Stack Overflow用户
提问于 2016-04-19 13:51:47
回答 1查看 176关注 0票数 0

我想试着在雪佛兰身上脱皮。

shed皮肤和libgc的安装似乎还可以,但是当我尝试make这个带棚皮的Python脚本时,它抱怨道:

代码语言:javascript
复制
/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 是否意味着脱皮不能在上使用

代码语言:javascript
复制
$ 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路径中没有帮助。

代码语言:javascript
复制
$ 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
EN

回答 1

Stack Overflow用户

发布于 2016-04-19 15:11:22

嗯,我不知道以前有人试图在Cygwin上使用shedskin,我认为主要是因为在某个时候对本机Windows有一些(有限的)支持。

但是,Cygwin本身也存在一些已知的限制,您可以通过使用兼容性层(如格努利卜 )来减轻这些限制。

这可能解决了asprintf问题也是,尽管它可能只是某个地方缺少的#include of stdio.h

无论如何,我不能保证对Cygwin的完全支持,因为我自己根本不使用Windows,但是可以随意发送电子邮件给shedskin-讨论@googlegroups.com--也许有人想更深入地了解它。如果您想提供一些修复或文档,您的帮助是非常欢迎的论GitHub

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36720473

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档