cardano-community / guild-operators

Artifacts and scripts created by Guild operators
https://cardano-community.github.io/guild-operators
MIT License
354 stars 177 forks source link

cabal install not specified in docs #1663

Closed thaddeusdiamond closed 1 year ago

thaddeusdiamond commented 1 year ago

Describe the bug If you run the install docs without installing cabal/ghc on your machine it fails semi-silently (script exits with 0 exit code but error messages).

To Reproduce Steps to reproduce the behavior:

  1. Get a clean machine (e.g., AWS Amazon Linux 2)
  2. Run the following script:
export INSTALL_USER=ec2-user
export INSTALL_USER_HOME=/home/$INSTALL_USER
export INSTALL_DIR=$INSTALL_USER_HOME/cardano-mainnet

sudo -u $INSTALL_USER -i <<END_SCRIPT
mkdir -p $INSTALL_DIR
curl -sS -o $INSTALL_DIR/guild-deploy.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/guild-deploy.sh
bash $INSTALL_DIR/guild-deploy.sh -p $INSTALL_DIR

# Get cardano-node and build it
cd $INSTALL_DIR
git clone https://github.com/input-output-hk/cardano-node
cd $INSTALL_DIR/cardano-node
git fetch --tags --all
git pull
git checkout $(curl -s https://api.github.com/repos/input-output-hk/cardano-node/releases/latest | jq -r .tag_name)
$INSTALL_DIR/cnode/scripts/cabal-build-all.sh -l
END_SCRIPT

Expected behavior Documentation should be updated or build scripts.

Additional context Running this (would have) solved it... but Amazon Linux 2023 has the wrong version of GLIBC. Still, think it's worth the add


# Install GHC and cabal
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=latest BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_STACK=1 BOOTSTRAP_HASKELL_INSTALL_HLS=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=P sh
source $HOME/.bashrc
ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
ghcup install cabal 3.6.2.0
ghcup set cabal 3.6.2.0```
rdlrt commented 1 year ago

You're missing flags on guild-deploy execution

image