Hello everyone, I’m trying to run the command “cabal build” the Week02 code of plutus-pioneer-program but it has this error and I have tried everything but the same error keeps appear:
Failed to build lzma-0.0.0.3.
Build log (
/root/.cabal/logs/ghc-8.10.4.20210212/lzma-0.0.0.3-0c9bb4b908cda90da75c6385d28bd3027ce216c08ab1b83c43f13ae414b04d3b.log
):
Configuring library for lzma-0.0.0.3..
Preprocessing library for lzma-0.0.0.3..
compiling dist/build/LibLzma_hsc_make.c failed (exit code 1)
rsp file was: "dist/build/hsc2hscall1082370-0.rsp"
command was: /nix/store/d2fqghv083a8q7j8sjb2m5q6i840h691-gcc-wrapper-10.2.0/bin/cc -c dist/build/LibLzma_hsc_make.c -o dist/build/LibLzma_hsc_make.o -D__GLASGOW_HASKELL__=810 -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Idist/build/autogen -Idist/build/global-autogen -include dist/build/autogen/cabal_macros.h -I/nix/store/3av3p9ky0lg2f1bc5jgg2sl872z7g4m9-ghc-8.10.4.20210212/lib/ghc-8.10.4.20210212/bytestring-0.10.12.0/include -I/nix/store/3av3p9ky0lg2f1bc5jgg2sl872z7g4m9-ghc-8.10.4.20210212/lib/ghc-8.10.4.20210212/base-4.14.1.0/include -I/nix/store/grcf3skqwdw35pki3d0gf7mj0flskni7-gmp-6.2.1-dev/include -I/nix/store/3av3p9ky0lg2f1bc5jgg2sl872z7g4m9-ghc-8.10.4.20210212/lib/ghc-8.10.4.20210212/integer-gmp-1.0.3.0/include -I/nix/store/3av3p9ky0lg2f1bc5jgg2sl872z7g4m9-ghc-8.10.4.20210212/lib/ghc-8.10.4.20210212/include -I/nix/store/wxb1awkkkbjp26jwqf854488qbzlkk25-libffi-3.3-dev/include -I/nix/store/3av3p9ky0lg2f1bc5jgg2sl872z7g4m9-ghc-8.10.4.20210212/lib/ghc-8.10.4.20210212/include/
error: LibLzma.hsc:44:10: fatal error: lzma.h: No such file or directory
compilation terminated.
cabal: Failed to build lzma-0.0.0.3 (which is required by
plutus-pioneer-program-week02-0.1.0.0). See the build log above for details.
Here are the steps I do:
- cd into plutus-apps directory then
$ git checkout 81ba78edb1d634a13371397d8c8b19829345ce0d
You might ask why this commit, because from the tutorial. Then I run
$ nix-shell
- Now I’m inside the nix-shell, I cd into plutus-pioneer-program’s Week2 code and then run:
[nix-shell:…/plutus-pioneer-program/code/week02]# cabal update
[nix-shell:…/plutus-pioneer-program/code/week02]# cabal build
That’s all, the error above appears of ‘cabal build’ command. After investigating, I think the error is caused by missing lzma.h, I installed liblzma-dev from https:// cardano.stackexchange .com/questions/6425/lzma-0-0-0-3-missing-when-building-week-01-code (forum doesn’t allow me to post 2 links lul), but the error remains.
Would anyone help me out please? Thank you very much!