Scheme 鸡装蛋计划

Scheme 鸡装蛋计划,scheme,chicken-scheme,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-fil

在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

看起来这是一只母虫子。我已经请它的作者看一看,他已经出版了一个新版本。您能再试一次吗?

从中可以看出,定义WIN32需要MSYS2-mwin32 gcc选项。mathh使用已定义的(_WIN32)来触发windows的log2等q&d实现的扩展

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

ex: (define mathh-compile-options '(-local -no-procedure-checks -mwin32))
我刚刚发布了版本0.16,在那里我去掉了过于复杂的依赖项,并用新的egg替换了它


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

我运行了
chicken-install-math
。还是不走运。请参阅问题编辑。抱歉:(定义MathCompile选项’(-local-无过程检查-C-mwin32))据我所知,这假设我应该单独下载
mathh
egg,修改
mathh.setup
并重新编译。任何关于如何做到这一点的指针?cd鸡安装-检索数学。。。编辑./mathh/mathh.setup。。。鸡肉安装-测试-运输-本地-位置。MathStill获得生成错误。请检查我的最后一个问题编辑。为什么没有定义WIN32?尝试显式定义:(定义数学编译选项`(-local-无过程检查-C-D_WIN32)