Haskell GHCJS with Diagrams 给出错误:没有为此平台提供 C 编译器

问题描述

我正在尝试使用反射和图表构建 POC。我在 Ubuntu-20.04 上使用 WSL2。我使用了 Reflex-stone 模板,它构建得很好。然后我将 diagrams-lib 添加到依赖项列表,并得到这个错误

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 的测试。所以我把它添加到我的 project.nix

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;
};

但是没有效果。存在一个 Diagrams-Reflex 存储库,但我也无法构建它。不过,我对 Nix 很陌生。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...