Failed to build HsOpenSSL-0.11.7.3 when building Cardano node

Hi all,

I’m having trouble building a Cardano node on my Ubuntu machine following this guide

After following all the steps from the guide i’m stuck at buildig the Cardano node with:
cabal build cardano-node cardano-cli

Here is the Full terminal code

Below a part of the terminal code where the problem occurs:

Failed to build HsOpenSSL-0.11.7.3.
Build log (
/home/cardano1234/.cabal/logs/ghc-8.10.7/HsOpenSSL-0.11.7.3-2fbf460de846e6520ee3ac1449f168f6540c4acba96ca535dbe38914e6432166.log
):
[1 of 1] Compiling Main             ( /home/cardano1234/git/cardano-node/dist-newstyle/tmp/src-24485/HsOpenSSL-0.11.7.3/dist/setup/setup.hs, /home/cardano1234/git/cardano-node/dist-newstyle/tmp/src-24485/HsOpenSSL-0.11.7.3/dist/setup/Main.o )
Linking /home/cardano1234/git/cardano-node/dist-newstyle/tmp/src-24485/HsOpenSSL-0.11.7.3/dist/setup/setup ...
Configuring HsOpenSSL-0.11.7.3...
Preprocessing library for HsOpenSSL-0.11.7.3..
Building library for HsOpenSSL-0.11.7.3..
[ 1 of 33] Compiling OpenSSL          ( OpenSSL.hs, dist/build/OpenSSL.o, dist/build/OpenSSL.dyn_o )
[ 2 of 33] Compiling OpenSSL.DH.Internal ( OpenSSL/DH/Internal.hs, dist/build/OpenSSL/DH/Internal.o, dist/build/OpenSSL/DH/Internal.dyn_o )
[ 3 of 33] Compiling OpenSSL.ERR      ( OpenSSL/ERR.hs, dist/build/OpenSSL/ERR.o, dist/build/OpenSSL/ERR.dyn_o )
[ 4 of 33] Compiling OpenSSL.EVP.Base64 ( OpenSSL/EVP/Base64.hs, dist/build/OpenSSL/EVP/Base64.o, dist/build/OpenSSL/EVP/Base64.dyn_o )
[ 5 of 33] Compiling OpenSSL.Objects  ( dist/build/OpenSSL/Objects.hs, dist/build/OpenSSL/Objects.o, dist/build/OpenSSL/Objects.dyn_o )
[ 6 of 33] Compiling OpenSSL.SSL.Option ( dist/build/OpenSSL/SSL/Option.hs, dist/build/OpenSSL/SSL/Option.o, dist/build/OpenSSL/SSL/Option.dyn_o )
[ 7 of 33] Compiling OpenSSL.Stack    ( dist/build/OpenSSL/Stack.hs, dist/build/OpenSSL/Stack.o, dist/build/OpenSSL/Stack.dyn_o )  

.......SKIPPED A FEW LINES HERE....... 

`gcc' failed in phase `C Compiler'. (Exit code: 1)
cabal: Failed to build HsOpenSSL-0.11.7.3 (which is required by
test:cardano-node-test from cardano-node-1.35.4, exe:cardano-node from
cardano-node-1.35.4 and others). See the build log above for details.

I’m using

  • Ubuntu Linux 20.04.5
  • Cardano node 1.35.4
  • GHC 8.10.7
  • Cabal 3.6.2.0

I tried to install a lower version for Haskell HsOpenSSL (version 0.11.7.2 instead of 0.11.7.3) after reading this post from pullanswer => PullAnswer post

but with no luck.
Any ideas?

Have you done a fresh cabal update before trying to build again after installing the lower HsOpenSSL.

I also read somewhere that you can/should manually update the cabal.project before you build to be HsOpenSSL == 0.11.7.2

Hi @jeremyisme,

I tried to change the HsOpenSSL version but ran into the following:

cardano1234@cardano1234-VirtualBox:~/git$ cabal install Cabal HsOpenSSL-0.11.7.2
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - Cabal-syntax-3.8.1.0 (lib) (requires download & build)
 - process-1.6.16.0 (lib:process) (requires download & build)
 - hsc2hs-0.68.8 (exe:hsc2hs) (requires build)
 - Cabal-3.8.1.0 (lib) (requires download & build)
 - Cabal-3.6.3.0 (lib) (requires download & build)
 - network-3.1.2.7 (lib:network) (requires build)
 - HsOpenSSL-0.11.7.2 (lib:HsOpenSSL) (requires build)
Downloading  process-1.6.16.0
Downloaded   process-1.6.16.0
Downloading  Cabal-syntax-3.8.1.0
Starting     process-1.6.16.0 (all, legacy fallback)
Downloaded   Cabal-syntax-3.8.1.0
Downloading  Cabal-3.8.1.0
Starting     Cabal-syntax-3.8.1.0 (lib)
Downloaded   Cabal-3.8.1.0
Downloading  Cabal-3.6.3.0
Building     Cabal-syntax-3.8.1.0 (lib)
Downloaded   Cabal-3.6.3.0
Building     process-1.6.16.0 (all, legacy fallback)
Installing   process-1.6.16.0 (all, legacy fallback)
Completed    process-1.6.16.0 (all, legacy fallback)
Starting     hsc2hs-0.68.8 (exe:hsc2hs)
Starting     Cabal-3.6.3.0 (lib)
Building     hsc2hs-0.68.8 (exe:hsc2hs)
Building     Cabal-3.6.3.0 (lib)
Installing   hsc2hs-0.68.8 (exe:hsc2hs)
Completed    hsc2hs-0.68.8 (exe:hsc2hs)
Starting     network-3.1.2.7 (all, legacy fallback)
Building     network-3.1.2.7 (all, legacy fallback)
Installing   network-3.1.2.7 (all, legacy fallback)
Completed    network-3.1.2.7 (all, legacy fallback)
Installing   Cabal-syntax-3.8.1.0 (lib)
Completed    Cabal-syntax-3.8.1.0 (lib)
Starting     Cabal-3.8.1.0 (lib)
Building     Cabal-3.8.1.0 (lib)
Installing   Cabal-3.6.3.0 (lib)
Installing   Cabal-3.8.1.0 (lib)
Completed    Cabal-3.6.3.0 (lib)
Starting     HsOpenSSL-0.11.7.2 (all, legacy fallback)
Completed    Cabal-3.8.1.0 (lib)
Building     HsOpenSSL-0.11.7.2 (all, legacy fallback)
Installing   HsOpenSSL-0.11.7.2 (all, legacy fallback)
Completed    HsOpenSSL-0.11.7.2 (all, legacy fallback)
Warning:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: Installation might not be completed as desired! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The command "cabal install [TARGETS]" doesn't expose libraries.
* You might have wanted to add them as dependencies to your package. In this
case add "Cabal, Cabal, HsOpenSSL" to the build-depends field(s) of your
package's .cabal file.
* You might have wanted to add them to a GHC environment. In this case use
"cabal install --lib Cabal Cabal HsOpenSSL". The "--lib" flag is provisional:
see https://github.com/haskell/cabal/issues/6481 for more information.

Not sure how to force the version upon Cabal.

Regards,
Bert

I’ve often found it is good to start again with builds sometimes, as you can often end up with orphaned, or incorrect build projects.

Work through the steps here https://forum.cardano.org/t/upgrade-to-1-35-4-for-coincashew-users/

Making sure you’ve got a clean/new folder for cardano-node2 (or whatever you want to call it). The cabal update command later on will update cabal for your build.

I would make sure you check the cabal.project file before you move to the actually build command.

U can try my guide but before make a fresh installation on server

2 Likes

I’ve done hours of troubleshooting on this, together with someone from IOG. Change
, HSOpenSSL >= 0.11.7.2
to
, HsOpenSSL == 0.11.7.2
in the cabal.project file if you have this problem.
pay attention to the capital S in the original line and non-capital s in the changed line.
It will work after that.

2 Likes

Thanks all for the help.

The solution from @georgem1976 solved my problem.
Nice tutorial @Alexd1985.

1 Like