IntersectMBO / cardano-ledger

The ledger implementation and specifications of the Cardano blockchain.
Apache License 2.0
262 stars 155 forks source link

Cannot build individual LaTeX documents #3076

Closed pgrange closed 2 years ago

pgrange commented 2 years ago

When trying to build individual LaTeX documents I get the following errors:

#> nix-shell --pure --run make
trace: Not using IOHK default nixpkgs (use 'niv drop nixpkgs' to use default for better sharing)
trace: haskell-nix.haskellLib.cleanGit: /nix/store/3357wa1ysx8h8m3m4kfcy4a9pwv7msiw-ormolu-src does not seem to be a git repository,
assuming it is a clean checkout.
trace: No index state specified for haskell-project, using the latest index state that we know about (2022-02-15T00:00:00Z)!
trace: No index state specified for cabal-install, using the latest index state that we know about (2022-09-07T00:00:00Z)!
trace: No index state specified for ghcid, using the latest index state that we know about (2022-09-07T00:00:00Z)!
trace: No index state specified for haskell-language-server, using the latest index state that we know about (2022-09-07T00:00:00Z)!
/nix/store/kcf8p80lyri0w8k0viwcik3wz238q57s-stdenv-darwin/setup: line 102: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
make: *** No targets specified and no makefile found.  Stop.

Related to Originally posted by @JaredCorduan in https://github.com/input-output-hk/cardano-ledger/issues/3074#issuecomment-1276059386

pgrange commented 2 years ago

System configuration

I'm running macOS 12.6 on Intel

Steps to reproduce

Install nix

I installed nix according to MacOS instructions:

#> sh <(curl -L https://nixos.org/nix/install)

Setup nix configuration

In a new nix ready terminal, I've setup nix configuration according to cardano-ledger build instructions:

cat <<EOF | sudo tee -a /etc/nix/nix.conf 
experimental-features = nix-command flakes
substituters        = https://cache.iog.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
EOF

Build

Then, from cardano-ledger directory:

#> nix-shell --pure --run make
JaredCorduan commented 2 years ago

@pgrange what directory are you in?

pgrange commented 2 years ago

Thanks for your quick feedback @JaredCorduan.

My bad, I was in the root directory of the project. I did not pay attention to the directories that were mentioned in the text.

I think something like that would be more absent-minded-proof for people like me ;)

cd eras/shelley/formal-spec
nix-shell --pure --run make
JaredCorduan commented 2 years ago

maybe

cd myLaTexDir
nix-shell --pure --run make

would make it clearer that this is instructions for more that just the shelley spec?

pgrange commented 2 years ago

That's probably better 👍 even maybe:

cd <myLaTexDir>
nix-shell --pure --run make