Failed to build ListLike-4.7.2

Hi

I setuped a vm in virtualbox and followed this instruction:
https://cardano-foundation.gitbook.io/stake-pool-course/stake-pool-guide/getting-started/install-node

in “Build and install the node” section, when I want to execute “cabal build all”,
I encounter with this message:

Failed to build ListLike-4.7.2.
Build log (
/home/card/.cabal/logs/ghc-8.10.4/ListLike-4.7.2-53daf0df1b5b94176d5e89f3c14934cbf9c4b8aa53b2b4fffb666b4dd8530c5b.log
):
Configuring library for ListLike-4.7.2…
Preprocessing library for ListLike-4.7.2…
Building library for ListLike-4.7.2…
[ 1 of 21] Compiling Data.ListLike.FoldableLL ( src/Data/ListLike/FoldableLL.hs, dist/build/Data/ListLike/FoldableLL.o, dist/build/Data/ListLike/FoldableLL.dyn_o )

src/Data/ListLike/FoldableLL.hs:36:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
36 | import Data.Monoid
| ^^^^^^^^^^^^^^^^^^
[ 2 of 21] Compiling Data.ListLike.Base ( src/Data/ListLike/Base.hs, dist/build/Data/ListLike/Base.o, dist/build/Data/ListLike/Base.dyn_o )
[ 3 of 21] Compiling Data.ListLike.IO ( src/Data/ListLike/IO.hs, dist/build/Data/ListLike/IO.o, dist/build/Data/ListLike/IO.dyn_o )
[ 4 of 21] Compiling Data.ListLike.String ( src/Data/ListLike/String.hs, dist/build/Data/ListLike/String.o, dist/build/Data/ListLike/String.dyn_o )
[ 5 of 21] Compiling Data.ListLike.FMList ( src/Data/ListLike/FMList.hs, dist/build/Data/ListLike/FMList.o, dist/build/Data/ListLike/FMList.dyn_o )

src/Data/ListLike/FMList.hs:21:1: warning: [-Wunused-imports]
The import of ‘Data.Char’ is redundant
except perhaps to import instances from ‘Data.Char’
To import instances alone, use: import Data.Char()
|
21 | import Data.Char (Char)
| ^^^^^^^^^^^^^^^^^^^^^^^
[ 6 of 21] Compiling Data.ListLike.DList ( src/Data/ListLike/DList.hs, dist/build/Data/ListLike/DList.o, dist/build/Data/ListLike/DList.dyn_o )

src/Data/ListLike/DList.hs:21:1: warning: [-Wunused-imports]
The import of ‘GHC.Exts’ is redundant
except perhaps to import instances from ‘GHC.Exts’
To import instances alone, use: import GHC.Exts()
|
21 | import GHC.Exts (IsList(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 7 of 21] Compiling Data.ListLike.CharString ( src/Data/ListLike/CharString.hs, dist/build/Data/ListLike/CharString.o, dist/build/Data/ListLike/CharString.dyn_o )

src/Data/ListLike/CharString.hs:52:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
52 | import Data.Monoid
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/CharString.hs:53:1: warning: [-Wunused-imports]
The import of ‘Data.Semigroup’ is redundant
except perhaps to import instances from ‘Data.Semigroup’
To import instances alone, use: import Data.Semigroup()
|
53 | import Data.Semigroup (Semigroup(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 8 of 21] Compiling Data.ListLike.Text.Text ( src/Data/ListLike/Text/Text.hs, dist/build/Data/ListLike/Text/Text.o, dist/build/Data/ListLike/Text/Text.dyn_o )
[ 9 of 21] Compiling Data.ListLike.Text.TextLazy ( src/Data/ListLike/Text/TextLazy.hs, dist/build/Data/ListLike/Text/TextLazy.o, dist/build/Data/ListLike/Text/TextLazy.dyn_o )
[10 of 21] Compiling Data.ListLike.Text.Builder ( src/Data/ListLike/Text/Builder.hs, dist/build/Data/ListLike/Text/Builder.o, dist/build/Data/ListLike/Text/Builder.dyn_o )
[11 of 21] Compiling Data.ListLike.Text ( src/Data/ListLike/Text.hs, dist/build/Data/ListLike/Text.o, dist/build/Data/ListLike/Text.dyn_o )
[12 of 21] Compiling Data.ListLike.Chars ( src/Data/ListLike/Chars.hs, dist/build/Data/ListLike/Chars.o, dist/build/Data/ListLike/Chars.dyn_o )

src/Data/ListLike/Chars.hs:17:1: warning: [-Wunused-imports]
The import of ‘fromString’ from module ‘Data.String’ is redundant
|
17 | import Data.String as String (IsString(fromString))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Chars.hs:18:1: warning: [-Wunused-imports]
The import of ‘Data.Semigroup’ is redundant
except perhaps to import instances from ‘Data.Semigroup’
To import instances alone, use: import Data.Semigroup()
|
18 | import Data.Semigroup (Semigroup(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[13 of 21] Compiling Data.ListLike.UTF8 ( src/Data/ListLike/UTF8.hs, dist/build/Data/ListLike/UTF8.o, dist/build/Data/ListLike/UTF8.dyn_o )

src/Data/ListLike/UTF8.hs:32:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
32 | import Data.Monoid (Monoid(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/UTF8.hs:33:1: warning: [-Wunused-imports]
The import of ‘Data.Semigroup’ is redundant
except perhaps to import instances from ‘Data.Semigroup’
To import instances alone, use: import Data.Semigroup()
|
33 | import Data.Semigroup (Semigroup(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[14 of 21] Compiling Data.ListLike.Utils ( src/Data/ListLike/Utils.hs, dist/build/Data/ListLike/Utils.o, dist/build/Data/ListLike/Utils.dyn_o )

src/Data/ListLike/Utils.hs:43:1: warning: [-Wunused-imports]
The import of ‘Data.Maybe’ is redundant
except perhaps to import instances from ‘Data.Maybe’
To import instances alone, use: import Data.Maybe()
|
43 | import Data.Maybe (maybe)
| ^^^^^^^^^^^^^^^^^^^^^^^^^
[15 of 21] Compiling Data.ListLike.Vector.Generic ( src/Data/ListLike/Vector/Generic.hs, dist/build/Data/ListLike/Vector/Generic.o, dist/build/Data/ListLike/Vector/Generic.dyn_o )

src/Data/ListLike/Vector/Generic.hs:26:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
26 | import Data.Monoid
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Generic.hs:27:1: warning: [-Wunused-imports]
The import of ‘fromString’ from module ‘Data.String’ is redundant
|
27 | import Data.String (IsString(fromString))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[16 of 21] Compiling Data.ListLike.Vector.Storable ( src/Data/ListLike/Vector/Storable.hs, dist/build/Data/ListLike/Vector/Storable.o, dist/build/Data/ListLike/Vector/Storable.dyn_o )

src/Data/ListLike/Vector/Storable.hs:17:1: warning: [-Wunused-imports]
The import of ‘fromString’ from module ‘Data.String’ is redundant
|
17 | import Data.String (IsString(fromString))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Storable.hs:19:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
19 | import Data.Monoid
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Storable.hs:21:1: warning: [-Wunused-imports]
The import of ‘GHC.Exts’ is redundant
except perhaps to import instances from ‘GHC.Exts’
To import instances alone, use: import GHC.Exts()
|
21 | import GHC.Exts (IsList(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[17 of 21] Compiling Data.ListLike.Vector.Unboxed ( src/Data/ListLike/Vector/Unboxed.hs, dist/build/Data/ListLike/Vector/Unboxed.o, dist/build/Data/ListLike/Vector/Unboxed.dyn_o )

src/Data/ListLike/Vector/Unboxed.hs:17:1: warning: [-Wunused-imports]
The import of ‘fromString’ from module ‘Data.String’ is redundant
|
17 | import Data.String (IsString(fromString))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Unboxed.hs:19:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
19 | import Data.Monoid
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Unboxed.hs:20:1: warning: [-Wunused-imports]
The import of ‘GHC.Exts’ is redundant
except perhaps to import instances from ‘GHC.Exts’
To import instances alone, use: import GHC.Exts()
|
20 | import GHC.Exts (IsList(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[18 of 21] Compiling Data.ListLike.Vector.Vector ( src/Data/ListLike/Vector/Vector.hs, dist/build/Data/ListLike/Vector/Vector.o, dist/build/Data/ListLike/Vector/Vector.dyn_o )

src/Data/ListLike/Vector/Vector.hs:17:1: warning: [-Wunused-imports]
The import of ‘fromString’ from module ‘Data.String’ is redundant
|
17 | import Data.String (IsString(fromString))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Vector.hs:19:1: warning: [-Wunused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
19 | import Data.Monoid
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Vector/Vector.hs:20:1: warning: [-Wunused-imports]
The import of ‘GHC.Exts’ is redundant
except perhaps to import instances from ‘GHC.Exts’
To import instances alone, use: import GHC.Exts()
|
20 | import GHC.Exts (IsList(…))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[19 of 21] Compiling Data.ListLike.Vector ( src/Data/ListLike/Vector.hs, dist/build/Data/ListLike/Vector.o, dist/build/Data/ListLike/Vector.dyn_o )
[20 of 21] Compiling Data.ListLike.Instances ( src/Data/ListLike/Instances.hs, dist/build/Data/ListLike/Instances.o, dist/build/Data/ListLike/Instances.dyn_o )

src/Data/ListLike/Instances.hs:135:10: error:
Duplicate instance declarations:
instance IsList BSC.ByteString
– Defined at src/Data/ListLike/Instances.hs:135:10
instance IsList BSC.ByteString
– Defined in ‘Data.ByteString.Internal’
|
135 | instance IsList BS.ByteString where
| ^^^^^^^^^^^^^^^^^^^^

src/Data/ListLike/Instances.hs:258:10: error:
Duplicate instance declarations:
instance IsList BSLC.ByteString
– Defined at src/Data/ListLike/Instances.hs:258:10
instance IsList BSLC.ByteString
– Defined in ‘Data.ByteString.Lazy.Internal’
|
258 | instance IsList BSL.ByteString where
| ^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build ListLike-4.7.2 (which is required by
test:cardano-node-test from cardano-node-1.24.2, test:cardano-cli-test from
cardano-cli-1.24.2 and others). See the build log above for details.

solved.

I used ghc 8.10.4 instead of ghc 8.10.2, so that problem happen.
I switched to ghc 8.10.2 via:

curl --proto ‘=https’ --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ghcup upgrade
ghcup install
ghcup set

and that error gone and everything is ok