我遵循了构建Rakudo 这里的说明。使用类似的这里和这里,我尝试在Windowswithvs-2019中构建它。
但是,在windows中构建Rakudo时,我会收到以下生成警告:
Updating submodules .................................... OK
Configuring native build environment ...................
trying to compile a simple C program ............... YES
did not find libzstd; will not use heap snapshot format version 3
OK
...
src\io\syncfile.c(272): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size
src\io\syncfile.c(334): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size
...
src\io\signals.c(115): warning C4068: unknown pragma
src\io\signals.c(116): warning C4068: unknown pragma
src\io\signals.c(120): warning C4068: unknown pragma
...
src\platform\random.c(132): warning C4113: 'FARPROC' differs in parameter lists from 'CRYPTGENRANDOM'
src\platform\random.c(132): warning C4133: '=': incompatible types - from 'FARPROC' to 'CRYPTGENRANDOM'
src\platform\random.c(130): warning C4113: 'FARPROC' differs in parameter lists from 'CRYPTACQUIRECONTEXTA'
src\platform\random.c(130): warning C4133: 'initializing': incompatible types - from 'FARPROC' to 'CRYPTACQUIRECONTEXTA'
...
src\platform\win32\io.c(27): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size
src\platform\win32\io.c(116): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size
...
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-lm'
minilua.c
...
src\jit\x64\emit.c(8): warning C4129: 'j': unrecognized character escape sequence
src\jit\x64\emit.c(8): warning C4129: 'e': unrecognized character escape sequence
srcjitdemit.dasc(4): warning C4068: unknown pragma
srcjitdemit.dasc(5): warning C4068: unknown pragma
srcjitdemit.dasc(7): warning C4068: unknown pragma
srcjitdemit.dasc(8): warning C4068: unknown pragma
src/jit/x64/tiles.dasc(2): warning C4068: unknown pragma
...只在上面的代码块中显示警告。完整的日志被赋予这里。
用于构建的系统:在Windows2019中使用VS-2019的应用程序
配置
## Appveyor configuration for Rakudo
# Manually build and don't use MSVC's build process so disable it
build: off
platform:
- x64
install:
- '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"'
# install zstd
- choco install zstandard
- SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
- perl Configure.pl --gen-moar --gen-nqp --backends=moar --prefix=%APPVEYOR_BUILD_FOLDER%\raku
- nmake
- nmake install
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
branches:
only:
- masterzstandard(https://github.com/facebook/zstd),但为什么要买.. did not find libzstd; will not use heap snapshot format version 3呢?发布于 2020-06-01 22:04:28
我迅速地看了一眼:
关于conversion from 'int' to 'HANDLE' of greater size的警告可能是由于缺少#include <io.h>,这导致编译器假定_get_osfhandle()返回int而不是intptr_t。--这可能是一个bug (尽管它在实践中可能不明显,具体取决于窗口实际从该函数返回的值的范围)。
有关'FARPROC' differs in parameter lists的警告是由于GetProcAddress()返回到特定类型的泛型指针缺少强制转换造成的。但是,由于所有指针类型都具有兼容的表示形式,因此如果忽略它,就不会发生任何不好的情况。
有关语用的警告也可以被忽略,并且可以通过明智地使用#ifdef __GNUC__来抑制。
关于unrecognized character escape sequence的警告是因为在生成的代码中没有正确地在路径中转义反斜杠。应该是固定的,但也可以忽略。
关于zstd,配置脚本使用pkg-config查找库,因此不支持windows。应该有人解决这个问题。但是,我相信这只会影响分析器,而不会影响MoarVM的正常运行。
我没有研究Command line warning的内容,尽管它看起来像是在一个*nix系统上编译,因此传递了不正确的标志。应该是固定的,但可能不会破坏构建。
https://stackoverflow.com/questions/62137280
复制相似问题