user5750: Summary
When running cabal repl inside any week in the Plutus Pioneer Program, it fails with the error message:
cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: lzma.h
* Missing (or bad) C library: lzma


However, when running which lzma I get a path to /Applications/anaconda3/bin/lzma
Also when trying to brew install lzma I am told that lzma is now included in xz.

Overview/Description
When trying to build the cabal repl for the Plutus Pioneer Program on macOS Monterrey, cabal fails with an error message stating it can't find the lzma library.
I've tried using cabal new-build --extra-include-dirs="<path to lzma>" (the path I got from running which lzma on the terminal) and extra-include-dirs: /opt/homebrew/include  extra-lib-dirs: /opt/homebrew/lib to no avail.
Steps to Reproduce
Following the instructions on cardanoacademy, cardano stack exchange, and IOG's technical community discord to build the cabal repl for the Plutus Pioneer Program.

Inside plutus-apps - git checkout 3746610e53654a1167aeb4c6294c6096d16b0502
Run command nix-shell
Inside nix-shell - git checkout (tag of the corresponding week on the cabal.project file, e.g. ee59880f47ab835dbd73bea0847dab7869fc20d8 for week01).
Run command Cabal update
Run command Cabal repl

Test Results
Failed to build lzma-0.0.0.3. The failure occurred during the configure step.
Build log (
/Users/macadmin/.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.

Environment Setup and Configuration
OS: macOS Monterrey version 12.4
Model Name: MacBook Pro
Any help or guidance would be greatly appreciated.

user5750: Two weeks just to realize I hand't followed instructions properly. To be completely fair, it's hard to find documentation that links setting up the plutus playground with the plutus pioneer program, but the information is there.
The problem is simple, I was using the wrong git checkout tag. I was using this reference and incorrectly assumed that the git checkout for the plutus pioneer program's respective week was to be done inside the nix-shell.
It is not. IOHK's guide is pretty straightforward, complete and up to date as far as I can tell.
Basically,

The git checkout for the respective week needs to be done first inside the /plutus-apps directory (i.e. git checkout 41149926c108c71831cfe8d244c83b0ee4bf5c8a for week01)
Run nix-shell
Inside the nix-shell navigate to the plutus-pioneer-program/code/<week no> and run cabal update,
Run cabal build
Run cabal repl


5750: <h2>Summary</h2>
<p>When running cabal repl inside any week in the Plutus Pioneer Program, it fails with the error message:</p>
<pre><code>cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: lzma.h
* Missing (or bad) C library: lzma
</code></pre>
<ul>
<li>However, when running <code>which lzma</code> I get a path to <code>/Applications/anaconda3/bin/lzma</code></li>
<li>Also when trying to <code>brew install lzma</code> I am told that <code>lzma</code> is now included in <code>xz</code>.</li>
</ul>
<h2>Overview/Description</h2>
<p>When trying to build the cabal repl for the Plutus Pioneer Program on macOS Monterrey, cabal fails with an error message stating it can't find the lzma library.
I've tried using <code>cabal new-build --extra-include-dirs=&quot;&lt;path to lzma&gt;&quot;</code> (the path I got from running <code>which lzma</code> on the terminal) and <code>extra-include-dirs: /opt/homebrew/include  extra-lib-dirs: /opt/homebrew/lib</code> to no avail.</p>
<h2>Steps to Reproduce</h2>
<p>Following the instructions on <a href="https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-playground/cloning-plutus-repository" rel="nofollow noreferrer">cardanoacademy</a>, <a href="https://cardano.stackexchange.com/questions/6287/lessons-learned-setting-up-plutus-playground-feedback-welcome">cardano stack exchange</a>, and IOG's technical community discord to build the cabal repl for the Plutus Pioneer Program.</p>
<ol>
<li>Inside plutus-apps - git checkout 3746610e53654a1167aeb4c6294c6096d16b0502</li>
<li>Run command <code>nix-shell</code></li>
<li>Inside <code>nix-shell</code> - <code>git checkout</code> (tag of the corresponding week on the cabal.project file, e.g. ee59880f47ab835dbd73bea0847dab7869fc20d8 for week01).</li>
<li>Run command <code>Cabal update</code></li>
<li>Run command <code>Cabal repl</code></li>
</ol>
<h2>Test Results</h2>
<pre><code>Failed to build lzma-0.0.0.3. The failure occurred during the configure step.
Build log (
/Users/macadmin/.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 &quot;-dev&quot; 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.
</code></pre>
<h2>Environment Setup and Configuration</h2>
<p>OS: macOS Monterrey version 12.4
Model Name: MacBook Pro</p>
<p>Any help or guidance would be greatly appreciated.</p>
 5750: <p>Two weeks just to realize I hand't followed instructions properly. To be completely fair, it's hard to find documentation that links setting up the plutus playground with the plutus pioneer program, but the information is there.</p>
<p>The problem is simple, I was using the wrong <strong>git checkout tag</strong>. I was using <a href="https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-playground/cloning-plutus-repository" rel="nofollow noreferrer">this reference</a> and incorrectly assumed that the <code>git checkout</code> for the plutus pioneer program's respective week was to be done <strong>inside</strong> the <code>nix-shell</code>.</p>
<p><strong>It is not</strong>. <a href="https://iohk.zendesk.com/hc/en-us/articles/4415402727321-Running-a-local-version-of-Plutus-playground" rel="nofollow noreferrer">IOHK's guide</a> is pretty straightforward, complete and up to date as far as I can tell.</p>
<p>Basically,</p>
<ol>
<li>The git checkout for the respective week needs to be done first inside the <code>/plutus-apps</code> directory (i.e. <code>git checkout 41149926c108c71831cfe8d244c83b0ee4bf5c8a</code> for week01)</li>
<li>Run <code>nix-shell</code></li>
<li>Inside the <code>nix-shell</code> navigate to the <code>plutus-pioneer-program/code/&lt;week no&gt;</code> and run <code>cabal update</code>,</li>
<li>Run <code>cabal build</code></li>
<li>Run <code>cabal repl</code></li>
</ol>
