"Failed to Build..." on Pop!_OS 22.04 LTS

Hi! I was trying to migrate from windows to Linux and i'm having trouble installing TIdal, already installed everything else (i think), and when i try the cabal install tidal (without the --lib because it said command not found), this appears:

cabal install tidal
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):

  • base-orphans-0.8.7 (lib) (requires build)
  • blaze-builder-0.4.2.2 (lib) (requires build)
  • clock-0.8.3 (lib) (requires build)
  • colour-2.3.6 (lib) (requires build)
  • data-binary-ieee754-0.4.4 (lib:data-binary-ieee754) (requires build)
  • hsc2hs-0.68.8 (exe:hsc2hs) (requires build)
  • indexed-traversable-0.1.2 (lib) (requires build)
  • primitive-0.7.4.0 (lib) (requires build)
  • splitmix-0.1.0.4 (lib) (requires build)
  • tagged-0.8.6.1 (lib) (requires build)
  • th-abstraction-0.4.5.0 (lib) (requires download & build)
  • transformers-compat-0.7.2 (lib) (requires build)
  • network-3.1.2.7 (lib:network) (requires build)
  • random-1.2.1.1 (lib) (requires build)
  • distributive-0.6.2.1 (lib) (requires build)
  • hosc-0.19.1 (lib) (requires build)
  • comonad-5.0.8 (lib) (requires build)
  • bifunctors-5.5.13 (lib) (requires download & build)
  • tidal-1.8.1 (lib) (requires download & build)
    Downloading th-abstraction-0.4.5.0
    Starting base-orphans-0.8.7 (lib)
    Starting colour-2.3.6 (lib)
    Starting clock-0.8.3 (lib)
    Starting blaze-builder-0.4.2.2 (lib)
    Downloaded th-abstraction-0.4.5.0
    Downloading bifunctors-5.5.13
    Building blaze-builder-0.4.2.2 (lib)
    Building clock-0.8.3 (lib)
    Building base-orphans-0.8.7 (lib)
    Building colour-2.3.6 (lib)
    Downloaded bifunctors-5.5.13
    Downloading tidal-1.8.1
    Starting data-binary-ieee754-0.4.4 (all, legacy fallback)
    Downloaded tidal-1.8.1
    Building data-binary-ieee754-0.4.4 (all, legacy fallback)

Failed to build base-orphans-0.8.7.
Build log (
/home/matiasocarez/.cabal/logs/ghc-8.10.7/base-orphans-0.8.7-2e63b02a231c60dc1867d037a0c16f56822014b1e427c4c1d49489c1790efb89.log
):
Configuring library for base-orphans-0.8.7..
Preprocessing library for base-orphans-0.8.7..
Building library for base-orphans-0.8.7..
[1 of 2] Compiling Data.Orphans.Prelude ( src/Data/Orphans/Prelude.hs, dist/build/Data/Orphans/Prelude.o, dist/build/Data/Orphans/Prelude.dyn_o )
[2 of 2] Compiling Data.Orphans ( src/Data/Orphans.hs, dist/build/Data/Orphans.o, dist/build/Data/Orphans.dyn_o )
/usr/bin/ld.gold: error: cannot find -lgmp
collect2: error: ld returned 1 exit status
gcc' failed in phase Linker'. (Exit code: 1)

Failed to build blaze-builder-0.4.2.2.
Build log (
/home/matiasocarez/.cabal/logs/ghc-8.10.7/blaze-builder-0.4.2.2-8313bd663b18b244f8e8472b4b81a6fbcea8058be29fc688dad3ae0552e4da6a.log
):
Configuring library for blaze-builder-0.4.2.2..
Preprocessing library for blaze-builder-0.4.2.2..
Building library for blaze-builder-0.4.2.2..
[ 1 of 11] Compiling Blaze.ByteString.Builder.Internal.Write ( Blaze/ByteString/Builder/Internal/Write.hs, dist/build/Blaze/ByteString/Builder/Internal/Write.o, dist/build/Blaze/ByteString/Builder/Internal/Write.dyn_o )
[ 2 of 11] Compiling Blaze.ByteString.Builder.Compat.Write ( Blaze/ByteString/Builder/Compat/Write.hs, dist/build/Blaze/ByteString/Builder/Compat/Write.o, dist/build/Blaze/ByteString/Builder/Compat/Write.dyn_o )
[ 3 of 11] Compiling Blaze.ByteString.Builder.Int ( Blaze/ByteString/Builder/Int.hs, dist/build/Blaze/ByteString/Builder/Int.o, dist/build/Blaze/ByteString/Builder/Int.dyn_o )
[ 4 of 11] Compiling Blaze.ByteString.Builder.Html.Word ( Blaze/ByteString/Builder/Html/Word.hs, dist/build/Blaze/ByteString/Builder/Html/Word.o, dist/build/Blaze/ByteString/Builder/Html/Word.dyn_o )
[ 5 of 11] Compiling Blaze.ByteString.Builder.Char8 ( Blaze/ByteString/Builder/Char8.hs, dist/build/Blaze/ByteString/Builder/Char8.o, dist/build/Blaze/ByteString/Builder/Char8.dyn_o )
[ 6 of 11] Compiling Blaze.ByteString.Builder.Char.Utf8 ( Blaze/ByteString/Builder/Char/Utf8.hs, dist/build/Blaze/ByteString/Builder/Char/Utf8.o, dist/build/Blaze/ByteString/Builder/Char/Utf8.dyn_o )
[ 7 of 11] Compiling Blaze.ByteString.Builder.Html.Utf8 ( Blaze/ByteString/Builder/Html/Utf8.hs, dist/build/Blaze/ByteString/Builder/Html/Utf8.o, dist/build/Blaze/ByteString/Builder/Html/Utf8.dyn_o )
[ 8 of 11] Compiling Blaze.ByteString.Builder.ByteString ( Blaze/ByteString/Builder/ByteString.hs, dist/build/Blaze/ByteString/Builder/ByteString.o, dist/build/Blaze/ByteString/Builder/ByteString.dyn_o )
[ 9 of 11] Compiling Blaze.ByteString.Builder.HTTP ( Blaze/ByteString/Builder/HTTP.hs, dist/build/Blaze/ByteString/Builder/HTTP.o, dist/build/Blaze/ByteString/Builder/HTTP.dyn_o )
[10 of 11] Compiling Blaze.ByteString.Builder.Word ( Blaze/ByteString/Builder/Word.hs, dist/build/Blaze/ByteString/Builder/Word.o, dist/build/Blaze/ByteString/Builder/Word.dyn_o )
[11 of 11] Compiling Blaze.ByteString.Builder ( Blaze/ByteString/Builder.hs, dist/build/Blaze/ByteString/Builder.o, dist/build/Blaze/ByteString/Builder.dyn_o )
/usr/bin/ld.gold: error: cannot find -lgmp
collect2: error: ld returned 1 exit status
gcc' failed in phase Linker'. (Exit code: 1)

Failed to build clock-0.8.3.
Build log (
/home/matiasocarez/.cabal/logs/ghc-8.10.7/clock-0.8.3-8edc1978ba02d226f705fef2fcf476ca3b4387311e7c503360833185a136fe79.log
):
Configuring library for clock-0.8.3..
Preprocessing library for clock-0.8.3..
linking dist/build/System/Clock_hsc_make.o failed (exit code 1)
rsp file was: "dist/build/System/hsc2hscall4876-2.rsp"
command was: /usr/bin/gcc dist/build/System/Clock_hsc_make.o dist/build/System/Clock_hsc_utils.o -o dist/build/System/Clock_hsc_make -fuse-ld=gold -fuse-ld=gold -L/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/base-4.14.3.0 -Wl,-R,/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/base-4.14.3.0 -L/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/integer-gmp-1.0.3.0 -Wl,-R,/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/integer-gmp-1.0.3.0 -lgmp -L/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1 -Wl,-R,/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1 -lc -lm -L/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/rts -Wl,-R,/home/matiasocarez/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/rts -lm -lrt -ldl -lpthread
error: /usr/bin/ld.gold: error: cannot find -lgmp
collect2: error: ld returned 1 exit status

Failed to build colour-2.3.6.
Build log (
/home/matiasocarez/.cabal/logs/ghc-8.10.7/colour-2.3.6-005b1108275085df34d8b16d95e24ace05b61a584a4d34362ec4222572b7933f.log
):
Configuring library for colour-2.3.6..
Preprocessing library for colour-2.3.6..
Building library for colour-2.3.6..
[ 1 of 14] Compiling Data.Colour.CIE.Chromaticity ( Data/Colour/CIE/Chromaticity.hs, dist/build/Data/Colour/CIE/Chromaticity.o, dist/build/Data/Colour/CIE/Chromaticity.dyn_o )
[ 2 of 14] Compiling Data.Colour.CIE.Illuminant ( Data/Colour/CIE/Illuminant.hs, dist/build/Data/Colour/CIE/Illuminant.o, dist/build/Data/Colour/CIE/Illuminant.dyn_o )
[ 3 of 14] Compiling Data.Colour.Chan ( Data/Colour/Chan.hs, dist/build/Data/Colour/Chan.o, dist/build/Data/Colour/Chan.dyn_o )
[ 4 of 14] Compiling Data.Colour.Internal ( Data/Colour/Internal.hs, dist/build/Data/Colour/Internal.o, dist/build/Data/Colour/Internal.dyn_o )
[ 5 of 14] Compiling Data.Colour.Matrix ( Data/Colour/Matrix.hs, dist/build/Data/Colour/Matrix.o, dist/build/Data/Colour/Matrix.dyn_o )
[ 6 of 14] Compiling Data.Colour.RGB ( Data/Colour/RGB.hs, dist/build/Data/Colour/RGB.o, dist/build/Data/Colour/RGB.dyn_o )
[ 7 of 14] Compiling Data.Colour.RGBSpace.HSL ( Data/Colour/RGBSpace/HSL.hs, dist/build/Data/Colour/RGBSpace/HSL.o, dist/build/Data/Colour/RGBSpace/HSL.dyn_o )
[ 8 of 14] Compiling Data.Colour.RGBSpace.HSV ( Data/Colour/RGBSpace/HSV.hs, dist/build/Data/Colour/RGBSpace/HSV.o, dist/build/Data/Colour/RGBSpace/HSV.dyn_o )
[ 9 of 14] Compiling Data.Colour.SRGB.Linear ( Data/Colour/SRGB/Linear.hs, dist/build/Data/Colour/SRGB/Linear.o, dist/build/Data/Colour/SRGB/Linear.dyn_o )
[10 of 14] Compiling Data.Colour.RGBSpace ( Data/Colour/RGBSpace.hs, dist/build/Data/Colour/RGBSpace.o, dist/build/Data/Colour/RGBSpace.dyn_o )
[11 of 14] Compiling Data.Colour.SRGB ( Data/Colour/SRGB.hs, dist/build/Data/Colour/SRGB.o, dist/build/Data/Colour/SRGB.dyn_o )
[12 of 14] Compiling Data.Colour ( Data/Colour.hs, dist/build/Data/Colour.o, dist/build/Data/Colour.dyn_o )
[13 of 14] Compiling Data.Colour.Names ( Data/Colour/Names.hs, dist/build/Data/Colour/Names.o, dist/build/Data/Colour/Names.dyn_o )
[14 of 14] Compiling Data.Colour.CIE ( Data/Colour/CIE.hs, dist/build/Data/Colour/CIE.o, dist/build/Data/Colour/CIE.dyn_o )
/usr/bin/ld.gold: error: cannot find -lgmp
collect2: error: ld returned 1 exit status
gcc' failed in phase Linker'. (Exit code: 1)

Failed to build data-binary-ieee754-0.4.4.
Build log (
/home/matiasocarez/.cabal/logs/ghc-8.10.7/data-binary-ieee754-0.4.4-191657459b78235e6d74cf1082187da1da7a5324c92868c137a5f8a98cab895e.log
):
Warning: data-binary-ieee754.cabal:36:21: version operators used. To use
version operators the package needs to specify at least 'cabal-version: >=
1.8'.
Configuring data-binary-ieee754-0.4.4...
Preprocessing library for data-binary-ieee754-0.4.4..
Building library for data-binary-ieee754-0.4.4..
[1 of 1] Compiling Data.Binary.IEEE754 ( lib/Data/Binary/IEEE754.hs, dist/build/Data/Binary/IEEE754.o, dist/build/Data/Binary/IEEE754.dyn_o )

lib/Data/Binary/IEEE754.hs:12:1: warning: [-Wtabs]
Tab character found here, and in 70 further locations.
Please use spaces instead.
|
12 | -- * Parsing
| ^^^^^^^^
/usr/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 base-orphans-0.8.7 (which is required by tidal-1.8.1).
See the build log above for details.
Failed to build blaze-builder-0.4.2.2 (which is required by tidal-1.8.1). See
the build log above for details.
Failed to build clock-0.8.3 (which is required by tidal-1.8.1). See the build
log above for details.
Failed to build colour-2.3.6 (which is required by tidal-1.8.1). See the build
log above for details.
Failed to build data-binary-ieee754-0.4.4 (which is required by tidal-1.8.1).
See the build log above for details.

I'm completely lost on what's going on :s

Hi @Matias_Ocarez,
This seems to be the key error:

 error: /usr/bin/ld.gold: error: cannot find -lgmp

Could you try installing the gmp library like this:

sudo apt install libgmp-dev

and then try again?

1 Like

It worked, yay! thank you! :heart:

Unfortunately now I'm having problems with Supercollider and JACK, but i guess it's a matter of being a noob with qjackctl :sweat_smile: