首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有图表的Haskell GHCJS给出错误:没有为该平台提供C编译器

带有图表的Haskell GHCJS给出错误:没有为该平台提供C编译器
EN

Stack Overflow用户
提问于 2021-02-02 08:17:10
回答 1查看 119关注 0票数 2

我试图构建一个POC,使用反射和图表。我在Ubuntu-20.04中使用WSL2。我使用了反射石模板,它构建得很好。然后我将图表库添加到依赖项列表中,并获得此错误。

代码语言:javascript
复制
xeno@PCB-CWO:/mnt/c/Users/CWO/repos/reflex-platform/Animazing$ nix-build --show-trace
error: while evaluating the attribute 'buildCommand' of the derivation 'reflex-stone-site' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildInputs' of the derivation 'reflex-stone-0.1.0.0-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'diagrams-lib-1.4.2.3-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'JuicyPixels-3.3.3.1-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'buildInputs' of the derivation 'zlib-0.6.2.1-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'makeFlags' of the derivation 'zlib-1.2.11-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'cc.targetPrefix' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/default.nix:158:14:
no C compiler provided for this platform

我得到了一些帮助,有人建议这可能是一个需要c ++的测试。

代码语言:javascript
复制
overrides = self: super: {
    diagrams-lib = pkgs.haskell.lib.dontCheck super.diagrams-lib;
    JuicyPixels = pkgs.haskell.lib.dontCheck super.JuicyPixels;
    zlib = pkgs.haskell.lib.dontCheck super.zlib;
};

但没有效果。有一个图表-反射回购,但我也不能让它构建。不过,我对尼克斯很陌生。

EN

回答 1

Stack Overflow用户

发布于 2022-06-02 01:09:12

似乎可以通过重写nixpkgs来使用更新的zlib版本来解决这个问题(至少在这里是这样的),并且对ghcjs有更好的支持。

这件事最终为我工作:

代码语言:javascript
复制
overrides = self: super: {
    diagrams-lib = pkgs.haskell.lib.dontCheck super.diagrams-lib;
    JuicyPixels = pkgs.haskell.lib.dontCheck super.JuicyPixels;
    zlib = self.callHackageDirect {
        pkg = "zlib";
        ver = "0.6.3.0";
        sha256 = "3PLCQ94ONQtjQc8AqVMgCVrZZW766T8PDevOvKC4VDw=";
    } {};
};
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66005898

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档