首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在鸡中安装鸡蛋计划

在鸡中安装鸡蛋计划
EN

Stack Overflow用户
提问于 2018-02-15 19:07:15
回答 3查看 560关注 0票数 1

在MSYS2中,我尝试用::

代码语言:javascript
复制
chicken-install http-client

我得到了几个类似以下的错误:

代码语言:javascript
复制
"c:\msys64\usr\local\bin\csc" -feature compiling-extension -setup-mode    mathh.scm -shared -optimize-leaf-routines -inline -output-file mathh.so -emit-import-library mathh -emit-type-file mathh.types -local -no-procedure-checks
mathh.c:24:1: error: static declaration of 'log2' follows non-static declaration
 log2( double x )
 ^~~~
In file included from c:/msys64/usr/local/include/chicken/chicken.h:131:0,
                 from mathh.c:11:
C:/msys64/mingw64/x86_64-w64-mingw32/include/math.h:773:25: note: previous declaration of 'log2' was here
   extern double __cdecl log2 (double);
                         ^~~~
mathh.c:41:1: error: static declaration of 'log1p' follows non-static declaration
 log1p( double x )
^~~~~

编辑

依赖关系:

代码语言:javascript
复制
chicken-install mathh

提供:

代码语言:javascript
复制
...
mathh.c: In function 'stub181':
mathh.c:357:19: warning: implicit declaration of function 'mm_hypot'; did you mean '_hypot'? [-Wimplicit-function-declaration]
 C_r=C_flonum(&C_a,mm_hypot(t0,t1));
                   ^~~~~~~~
                   _hypot
mathh.o:mathh.c:(.text+0x177f): undefined reference to `mm_hypot'
collect2.exe: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 1: ""gcc" "mathh.o" -o "mathh.so" -Wl,--enable-auto-import -shared -Lc:\msys64\usr\local\lib\ -lchicken -lm -lws2_32"

Error: shell command failed with nonzero exit status 1:

  ""c:\msys64\usr\local\bin\csc" -feature compiling-extension -setup-mode    mathh.scm -shared -optimize-leaf-routines -inline -output-file mathh.so -emit-import-library mathh -emit-type-file mathh.types -local -no-procedure-checks"


Error: shell command terminated with nonzero exit code
70
"\"\"c:\\msys64\\usr\\local\\bin\\csi\" -bnq -setup-mode -e \"(require-lib...

编辑

由@krl提出的修复方案:

代码语言:javascript
复制
msys2_shell.cmd -mingw64 # see http://wiki.call-cc.org/msys2
export CHICKEN_PREFIX="c:\msys64\usr\local\\"
export CHICKEN_REPOSITORY="c:\msys64\usr\local\lib\chicken\8\\"
chicken-install -retrieve mathh
sed  -i.bak -r 's/define +mathh-compile-options.+\(/&\n  -C -mwin32/' ./mathh/mathh.setup
chicken-install test
chicken-install -test -transport local -location . mathh

这仍然会给出以下错误:

代码语言:javascript
复制
...

installing mathh: ...
changing current directory to C:\msys64\home\user\.\mathh
  ""c:\msys64\usr\local\bin\csi" -bnq -setup-mode -e "(require-library setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e "(extension-name-and-version '(\"mathh\" \"\"))" "mathh.setup""
  "c:\msys64\usr\local\bin\csc" -feature compiling-extension -setup-mode mathh.scm -shared -optimize-leaf-routines -inline -output-file mathh.so -emit-import-library mathh -emit-type-file mathh.types -local -no-procedure-checks
mathh.c:29:1: error: static declaration of 'log2' follows non-static declaration
 log2( double x )
 ^~~~
In file included from c:/msys64/usr/local/include/chicken/chicken.h:131:0,
                 from mathh.c:11:
C:/msys64/mingw64/x86_64-w64-mingw32/include/math.h:773:25: note: previous                                   declaration of 'log2' was here
   extern double __cdecl log2 (double);
                         ^~~~
... further errors like above
EN

回答 3

Stack Overflow用户

发布于 2018-02-16 15:33:13

这看起来像是数学彩蛋中的一个bug。我已经请它的作者看过了,他已经发布了一个新版本。你能再试一次吗?

票数 1
EN

Stack Overflow用户

发布于 2018-02-18 04:09:07

http://www.davidegrayson.com/windev/msys2/可以看出,需要使用MSYS2 -mwin32 http://www.davidegrayson.com/windev/msys2/选项来定义_WIN32。mathh使用已定义的(_WIN32)来触发windows等log2的q&d实现的扩展。

可以修改mathh egg mathh.setup文件以提供编译选项。请参阅mathh.setup中数学编译选项的定义。

代码语言:javascript
复制
ex: (define mathh-compile-options '(-local -no-procedure-checks -mwin32))
票数 1
EN

Stack Overflow用户

发布于 2018-02-19 00:51:04

我刚刚发布了http-client版本0.16,在这个版本中,我去掉了过于复杂的md5依赖,并将其替换为新的simple-md5鸡蛋。

这应该更容易安装。它应该很快就会出现在蛋镜上。

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

https://stackoverflow.com/questions/48805740

复制
相关文章

相似问题

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