1

I am in a nix-shell and attempting to build the code for week 1. After lots of promising output, it fails with this error.

Failed to build lzma-0.0.0.3. The failure occurred during the configure step.
Build log (
/Users/jwb/.cabal/logs/ghc-8.10.2.20201118/lzm-0.0.0.3-09eda932.log ):
Configuring library for lzma-0.0.0.3..
cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: lzma.h
* Missing (or bad) C library: lzma
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.

cabal: Failed to build lzma-0.0.0.3 (which is required by plutus-pioneer-program-week01-0.1.0.0). See the build log above for details.

I did cabal update beforehand, both outside and inside nix-shell. Any suggestions?

2
  • 1
    are you sure you're in the nix-shell window? Nix should build any external dependencies you need. Commented Jan 15, 2022 at 3:37
  • Still learning. I ended up completely re-installing the Plutus-playground, and then compiled this code directly in the playground, which worked, and which appears to be the "correct" way for these lessons. I needed to remove the module header code as demonstrated in the current Plutus Pioneers lesson #1 (youtube.com/… from 1:10 to 1:40) Perhaps the week 01 code is not intended to be built as an actual real app?
    – XiTouch
    Commented Jan 16, 2022 at 16:53

1 Answer 1

4

You probably need to install the development package:

apt install liblzma-dev

1
  • 1
    Works for me. Thanks.
    – Adam
    Commented Nov 29, 2022 at 1:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.