在鸡计划中安装鸡蛋

时间:2018-02-15 11:07:15

标签: scheme chicken-scheme

在MSYS2中,我尝试用::

安装鸡蛋
chicken-install http-client

我收到如下错误:

"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 )
^~~~~

修改

依赖:

chicken-install mathh

给出:

...
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提出的修正:

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

仍然会出现以下错误:

...

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

3 个答案:

答案 0 :(得分:1)

看起来这是mathh蛋中的一个错误。我已经要求其作者看一看并发布了新版本。你能再试一次吗?

答案 1 :(得分:1)

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

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

ex: (define mathh-compile-options '(-local -no-procedure-checks -mwin32))

答案 2 :(得分:0)

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

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

相关问题