raku / nqp-configure Goto Github PK
View Code? Open in Web Editor NEWConfiguration and build modules for NQP
License: Artistic License 2.0
Configuration and build modules for NQP
License: Artistic License 2.0
I'm seeing the error below for about 50% of my appveyor builds. Appears to be incomplete stdout... can this potentially be fixed or is this just appveyor being weird?
+++ Compiling blib\CORE.d.setting.moarvm
The following step can take a long time, please be patient.
Stage start : 0.000
Stage parse : 0.552
Stage syntaxcheck: 0.001
Stage ast : 0.001
Stage optimize : 0.042
Stage mast : 0.079
Stage mbc : 0.003
+++ Generating gen\moar\BOOTSTRAP\v6e.nqp
+++ Compiling blib\Perl6\BOOTSTRAP\v6e.moarvm
+++ Compiling blib\CORE.e.setting.moarvm
===SORRY!===
Cannot determine the brand of your nmake utility.
It is reporting itself as:
Microsoft (R) Program Mai at C:/projects/rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 192.
at C:/projects/rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 34.
NQP::Config::__ANON__("===SORRY!===\x{a} Cannot determine the brand of your nmake utili"...) called at C:/projects/rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 192
NQP::Config::sorry(NQP::Config::Rakudo=HASH(0x1643e8), "Cannot determine the brand of your nmake utility.\x{a}It is repor"...) called at C:/projects/rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 537
NQP::Config::configure_commands(NQP::Config::Rakudo=HASH(0x1643e8)) called at C:\projects\rakudo\Configure.pl line 91
NMAKE : fatal error U1077: 'C:\strawberry\perl\bin\perl.exe' : return code '0xff'
Stop.
Command exited with code 2
I think it would make sense to get rid of the tie and runtime NQP::Config::* subclass loading.
Any reasons why we want to keep that instead of using NQP::Config::Rakudo->new(...)?
In nfp
it assumes that splitpath
and splitdir
will work with Unix paths. This is not guaranteed.
It happens to work only because File::Spec::Win32
inherits from File::Spec::Unix
, and they are close enough.
(A small change to File::Spec::Win32
may break the existing code.)
sub nfp {
my ( $vol, $dirs, $file ) = File::Spec->splitpath(shift); # <--
return File::Spec->catpath( $vol,
File::Spec->catdir( File::Spec->splitdir($dirs) ), $file ); # <--
}
It should really use File::Spec::Unix->split[path|dir]
.
sub nfp {
my ( $vol, $dirs, $file ) = File::Spec::Unix->splitpath(shift);
# ^--------- Unix ----------^
# v---- whatever ---v
return File::Spec->catpath( $vol,
File::Spec->catdir( File::Spec::Unix->splitdir($dirs) ), $file );
# ^--- whatever ---^ ^--------- Unix ---------^
}
Think of the above code as path.decode('Unix').encode($current-system)
.
The existing code would then be path.decode($current-system).encode($current-system)
, which is not correct.
File::Spec::Unix
should be used anywhere it is assumed to be a Unix path, and File::Spec
everywhere else.
With the above changes, it should work on any system we care to support in the future.
(The existing code will not work properly on MacOS Classic, and may not work on VMS.)
Also there is no reason to load File::Spec::Win32
because it will be loaded automatically if it needs to be.
With simple instructions about what to do.
$ perl Configure.pl --backends=nope
===ATTENTION===
No --prefix supplied, building and installing to /Volumes/BUKKIT/Users/coke/sandbox/nqp/install
Unknown backend: 'nope'; Known backends: moar, jvm, js
at /Volumes/BUKKIT/Users/coke/sandbox/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 34.
NQP::Config::__ANON__("Unknown backend: 'nope'; Known backends: moar, jvm, js\x{a}") called at /Volumes/BUKKIT/Users/coke/sandbox/nqp/tools/lib/NQP/Config/NQP.pm line 21
NQP::Config::NQP::configure_backends(NQP::Config::NQP=HASH(0x7ffcd0020738)) called at Configure.pl line 82
Do we need the stack trace?
Sample output on a Simplified Chinese Windows 10 machine:
X:\Build\nqp-2020.05>chcp
活动代码页: 936
X:\Build\nqp-2020.05>perl ./Configure.pl --prefix X:/Prefix --relocatable --make-install --backends=moar --with-moar=X:/Prefix/bin/moar.exe
fatal: not in a git directory
fatal: not in a git directory
===SORRY!===
Cannot determine the brand of your nmake utility.
It is reporting itself as:
Microsoft (R) 程序维护实用工具 14.25.28614.0 版
版权所有 (C) Microsoft Corporation。 保留所有权利。
用法: NMAKE @commandfile
NMAKE [选项] [/f makefile] [/x stderrfile] [macrodefs] [targets]
选项:
/A 生成所有已计算的目标
/B 如果时间戳相等则生成
/C 取消输出消息
/D 显示生成消息
/E 覆盖 env-var 宏
/ERRORREPORT:{NONE|PROMPT|QUEUE|SEND} 向 Microsoft 报告错误
/G 显示 !include 文件名
/HELP 显示简短的用法消息
/I 忽略命令中的退出代码
/K 遇到错误时继续生成不相关的目标
/N 显示命令但不执行
/NOLOGO 取消显示版权信息
/P 显示 NMAKE 信息
/Q 检查时间戳但不生成
/R 忽略预定义的规则/宏
/S 取消显示已执行的命令
/T 更改时间戳但不生成
/U 转储内联文件
/Y 禁用批处理模式
at X:/Build/nqp-2020.05/3rdparty/nqp-configure/lib/NQP/Config.pm line 192.
at X:/Build/nqp-2020.05/3rdparty/nqp-configure/lib/NQP/Config.pm line 34.
NQP::Config::__ANON__("===SORRY!===\x{a} Cannot determine the brand of your nmake utili"...) called at X:/Build/nqp-2020.05/3rdparty/nqp-configure/lib/NQP/Config.pm line 192
NQP::Config::sorry(NQP::Config::NQP=HASH(0x2915634), "Cannot determine the brand of your nmake utility.\x{a}It is repor"...) called at X:/Build/nqp-2020.05/3rdparty/nqp-configure/lib/NQP/Config.pm line 537
NQP::Config::configure_commands(NQP::Config::NQP=HASH(0x2915634)) called at ./Configure.pl line 79
NQP version: 2020.05
To reproduce, install a language pack (e.g. Chinese Simplified), change the code page of your console (936 for Chinese Simplified) and build NQP.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.