gpt4 book ai didi

perl - 为 Raku 构建多个后端失败

转载 作者:行者123 更新时间:2023-12-03 14:07:35 25 4
gpt4 key购买 nike

阅读后README.mdhttps://github.com/rakudo/rakudo特别here ,我冒险为 rakudo 构建多个后端。

我使用 64 位 Ubuntu 20.04 来做到这一点。首先我安装

  • build essential , libencode-perl
  • default-jdk为编译 rakudo 准备机器。

  • 克隆 repo 后,当我运行命令时 perl Configure.pl --backends=moar,jvm --prefix=/usr ,我收到以下错误:
    root@1145eac1ed77:/rakudo# perl Configure.pl --backends=moar,jvm --prefix=/usr
    No pre-existing installed file found at /usr/bin/nqp-m
    No pre-existing installed file found at /usr/bin/nqp-j
    No pre-existing installed file found at /usr/bin/nqp-m
    No pre-existing installed file found at /usr/bin/nqp-j
    Use of uninitialized value $str in substitution (s///) at /rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 1420.
    Use of uninitialized value $str in substitution (s///) at /rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 1421.
    Use of uninitialized value in concatenation (.) or string at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 361.
    Use of uninitialized value in quotemeta at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 371.
    Use of uninitialized value in substitution (s///) at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 371.
    Use of uninitialized value in substitution (s///) at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 371.
    Use of uninitialized value in quotemeta at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 373.
    Use of uninitialized value in sprintf at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 414.
    Redundant argument in sprintf at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 414.
    Use of uninitialized value in concatenation (.) or string at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 423.
    Use of uninitialized value in concatenation (.) or string at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 423.
    Using /usr/bin/nqp-m (version / MoarVM ).
    Use of uninitialized value in sprintf at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 428.
    Redundant argument in sprintf at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 428.
    ===SORRY!===
    jvm::runtime.jars value not available from /usr/bin/nqp-j --show-config.

    To automatically clone (git) and build a copy of NQP 2020.02.1-154-ga7b0b7be2,
    try re-running Configure.pl with the '--gen-moar' option.
    Or, use '--prefix=' to explicitly specify the path where the NQP and MoarVM
    executables can be found that are use to build Rakudo. at /rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 192.
    at /rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 34.
    NQP::Config::__ANON__("===SORRY!===\x{a} jvm::runtime.jars value not available from /us"...) called at /rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 192
    NQP::Config::sorry(NQP::Config::Rakudo=HASH(0x55e4cb9c5258), "jvm::runtime.jars value not available from /usr/bin/nqp-j --s"..., "\x{a}To automatically clone (git) and build a copy of NQP 2020.02"..., "try re-running Configure.pl with the '--gen-moar' option.", "Or, use '--prefix=' to explicitly specify the path where the "..., "executables can be found that are use to build Rakudo.") called at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 576
    NQP::Config::Rakudo::post_active_backends(NQP::Config::Rakudo=HASH(0x55e4cb9c5258)) called at /rakudo/3rdparty/nqp-configure/lib/NQP/Config.pm line 660
    NQP::Config::configure_active_backends(NQP::Config::Rakudo=HASH(0x55e4cb9c5258)) called at /rakudo/tools/lib/NQP/Config/Rakudo.pm line 473
    NQP::Config::Rakudo::configure_active_backends(NQP::Config::Rakudo=HASH(0x55e4cb9c5258)) called at Configure.pl line 102

    如何修复?

    我想知道什么 ALL在命令中 perl Configure.pl --backends=ALL指。

    有一个项目(我猜仍然在 master 中合并) Rakudo.js herehere .这是 Javascript 后端吗?
    是吗 ALL意味着 moar , jvmJavascript后端?

    最佳答案

    正如@ugexe 所指出的,我失踪了 --gen-moar在我的命令中。

    为了将来引用,我想记录我在尝试构建 Rakudo 的反复尝试后学到的东西.

    Moar 和 JVM 后端

    建筑用moarjvm后端您需要依赖项

    apt-get install -y gcc \
    libc6-dev \
    libencode-perl \
    wget \
    libzstd-dev \
    default-jdk \
    make

    并运行命令
    perl Configure.pl --prefix=/usr --gen-moar --backends=moar,jvm --relocatable

    用于建筑。构建成功后会得到 rakudo-m , rakudo-gdb-m , rakudo-valgrind-m , rakudo-lldb-mmoar后端和 rakudo-j , rakudo-debug-jjvm后端。

    Javascript 和 Moar 后端

    您无法构建独立的 javascript 后端。构建时 js后端 you must also build moar .因此,要构建 javascript 后端,要构建的命令将是,
    perl Configure.pl --prefix=/usr --gen-moar --backends=moar,js --relocatable

    构建的额外依赖项 javascript后端是 nodejs 的可用性, g++npm可以通过
    apt-get install gcc g++ \
    libc6-dev \
    libencode-perl \
    wget \
    libzstd-dev \
    nodejs \
    npm \
    make

    但是在 build 时 javascript后端,我收到以下错误,
    '/usr/bin/perl' tools/build/npm-install-or-link.pl . src/vm/js/nqp-runtime nqp-runtime 
    Can't exec "npm": No such file or directory at tools/build/npm-install-or-link.pl line 18.
    === SORRY! === `npm install /rakudo/nqp/src/vm/js/nqp-runtime` failed with exit code -1 (72057594037927935)
    make: *** [Makefile:852: js-deps] Error 255

    Search揭示了

    If you are developing nqp-js, you may want to pass the --link option to configure to have the nqp-runtime linked instead of installed



    虽然建立隔离没有问题 NQP .我不确定如何在自动构建 rakudo 的同时进行 npm 链接。

    所有后端

    我了解到 ALL确实是指 moar , jvmjs后端。这在您运行命令时得到确认
    perl Configure.pl --prefix=/usr --gen-moar --backends=ALL --relocatable

    您会在终端中看到以下内容:
    /usr/bin/perl Configure.pl --prefix=/usr --make-install --git-protocol=https --relocatable --no-ignore-errors --silent-build --no-force-rebuild --backends=moar,jvm,js --gen-moar

    这的依赖项将是
    apt-get install gcc g++ \
    libc6-dev \
    libencode-perl \
    wget \
    libzstd-dev \
    default-jdk \
    nodejs \
    npm \
    make

    如果可以通过解析 npm link成功构建Javascript后端以上问题,我确定所有后端: moar , jvmjavascript可以建。

    所以这里留下的问题是 如何在构建 rakudo 时进行 npm 链接 .希望有人的专家帮助将解决这个问题。

    关于perl - 为 Raku 构建多个后端失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61430360/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com