Stake pool node help - “cannot find the ghc”

I am building a new node. all goes well until i run this command and get a ghc error.

cabal build cardano-cli cardano-node

[root@ADA-host cardano-node]# cabal build cardano-cli cardano-node
cabal: Cannot find the program ‘ghc’. User-specified path ‘ghc-8.10.2’ does
not refer to an executable and the program is not on the system path.

any ideas why it would not be able to find the program up to this point?

I am on Centos7 by the way

Did you download ghc and install/unpack it? Looks like you didn’t do install ghc/lib or the path is incorrect.
You can reference the coincash guide but swap out the commands to be centos vs ubuntu as each os is slightly different…

https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#1-install-cabal-and-ghc

here the official from haskell for ghc -
https://www.haskell.org/ghc/download_ghc_8_10_4.html

Thank you! looks like i ran the command from an old article and used cabal configure --with-compiler=ghc-8.10.2 instead of cabal configure --with-compiler=ghc-8.10.4

now i am getting
, these were the
goals I’ve had most trouble fulfilling: cardano-crypto-class

troubleshooting that now.

cabal build cardano-cli cardano-node
Warning: Requested index-state 2021-03-15T00:00:00Z is newer than
hackage.haskell.org’! Falling back to older state (2021-03-14T23:47:09Z).
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] next goal: cardano-crypto-class (user goal)
[__0] rejecting: cardano-crypto-class-2.0.0 (conflict: pkg-config package
libsodium-any, not found in the pkg-config database)
[__0] fail (backjumping, conflict set: cardano-crypto-class)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: cardano-crypto-class

a little progress and still failure

Failed to build Win32-network-0.1.0.0.
Build log (
/root/.cabal/logs/ghc-8.10.4/Win32-network-0.1.0.0-ea777a1112c9a903f5a922e05d3ca5b37daa02b493554559e7d31acd8a4ddd0d.log
):
Configuring library for Win32-network-0.1.0.0…
Preprocessing library for Win32-network-0.1.0.0…
Building library for Win32-network-0.1.0.0…
[1 of 1] Compiling System.IOManager ( src/System/IOManager.hs, dist/build/System/IOManager.o, dist/build/System/IOManager.dyn_o )
/bin/ld.gold: error: cannot find -lgmp
collect2: error: ld returned 1 exit status
gcc' failed in phase Linker’. (Exit code: 1)
cabal: Failed to build Diff-0.4.0 (which is required by
test:cardano-cli-golden from cardano-cli-1.27.0). See the build log above for
details.
Failed to build StateVar-1.2.1 (which is required by test:cardano-node-test
from cardano-node-1.27.0, exe:cardano-node from cardano-node-1.27.0 and
others). See the build log above for details.
Failed to build Win32-network-0.1.0.0 (which is required by
test:cardano-node-test from cardano-node-1.27.0, exe:cardano-node from
cardano-node-1.27.0 and others). See the build log above for details.

any ideas on this one?

got it! i needed to run the below installs in addition to what was listed in the HowTo articles

yum python3 zlib-devel tmux ncurses-compat-libs rsync systemd-devel gmp-devel.x86_64 gcc gcc-c++ tar ncurses-devel

the build is running perfectly now

1 Like

Hi!

you can “close” the topic by mark one of the answer as solution - also the title of the topic can be improved by adding the error message itself. like - stake pool server help - “cannot find the ghc”

1 Like

glad to hear. best of luck and wishes!

I am using ubuntu