input-output-hk / cardano-node-wiki

9 stars 6 forks source link

Cabal build all fail installing node 9.1.0 on raspbian Os #50

Open jmgvale opened 3 months ago

jmgvale commented 3 months ago

Hi, i'm trying to compile node 9.1.0 on raspbian OS but on the "cabal build all" fail on dependencies I followed the doc: https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md

OS release:

admin@tuga-node00:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
admin@tuga-node00:~ $
admin@tuga-node00:~ $ uname -r
6.6.31+rpt-rpi-v8
admin@tuga-node00:~ $
admin@tuga-node00:~/src/cardano-node $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
admin@tuga-node00:~/src/cardano-node $ cabal --version
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library
admin@tuga-node00:~/src/cardano-node $

Error:

admin@tuga-node00:~/src/cardano-node $ cabal update
cabal build all
Downloading the latest package lists from:
- hackage.haskell.org
- cardano-haskell-packages
Package list of cardano-haskell-packages is up to date.
The index-state is set to 2024-07-25T13:19:14Z.
Package list of hackage.haskell.org has been updated.
The index-state is set to 2024-07-28T21:48:40Z.
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2024-07-28T20:33:33Z'
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: cardano-node-9.1.0 (user goal)
[__1] next goal: text (dependency of cardano-node)
[__1] rejecting: text-1.2.4.1/installed-1.2.4.1 (conflict: cardano-node =>
text>=2.0)
[__1] trying: text-2.1.1
[__2] trying: ouroboros-consensus-cardano-0.18.0.0 (dependency of
cardano-node)
[__3] trying: cardano-ledger-mary-1.6.1.0 (dependency of
ouroboros-consensus-cardano)
[__4] next goal: base (dependency of cardano-node)
[__4] rejecting: base-4.14.3.0/installed-4.14.3.0 (conflict: text => base<0 &&
>=4.10 && <5)
[__4] skipping: base-4.20.0.1, base-4.20.0.0, base-4.19.1.0, base-4.19.0.0,
base-4.18.2.1, base-4.18.2.0, base-4.18.1.0, base-4.18.0.0, base-4.17.2.1,
base-4.17.2.0, base-4.17.1.0, base-4.17.0.0, base-4.16.4.0, base-4.16.3.0,
base-4.16.2.0, base-4.16.1.0, base-4.16.0.0, base-4.15.1.0, base-4.15.0.0,
base-4.14.3.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0, base-4.13.0.0,
base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0, base-4.10.0.0,
base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0, base-4.8.0.0,
base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1, base-4.6.0.0,
base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0, base-4.3.1.0,
base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0, base-4.1.0.0,
base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (has the same characteristics that
caused the previous version to fail: excluded by constraint '<0 && >=4.10 &&
<5' from 'text')
[__4] fail (backjumping, conflict set: base, cardano-node, text)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-node, aeson, text,
ouroboros-consensus-cardano, cardano-ledger-mary, base, integer-conversion
Try running with --minimize-conflict-set to improve the error message.

admin@tuga-node00:~/src/cardano-node $

Any thoughts? Thanks in advance

Júlio

carbolymer commented 3 months ago

Seems that text is not buildable on arm on 8.10. https://github.com/haskell/text/blob/master/text.cabal#L148

Can you attach an output of cabal build -v2 cardano-node?

jmgvale commented 3 months ago

Seems that text is not buildable on arm on 8.10. https://github.com/haskell/text/blob/master/text.cabal#L148

Can you attach an output of cabal build -v2 cardano-node?

Sorry for the delay,

admin@tuga-node00:~/src/cardano-node $ git checkout tags/9.1.0
HEAD is now at 176f99e51 Merge pull request #5910 from IntersectMBO/jordan/revert-non-failure-if-conway-genesis-missing
admin@tuga-node00:~/src/cardano-node $
admin@tuga-node00:~/src/cardano-node $ cat cabal.project.local
with-compiler: ghc-8.10.7
package trace-dispatcher
  ghc-options: -Wwarn

package HsOpenSSL
  flags: -homebrew-openssl

admin@tuga-node00:~/src/cardano-node $
admin@tuga-node00:~/src/cardano-node $ cabal build -v2 cardano-node this build was affected by the following (project) config files:
- /home/admin/src/cardano-node/cabal.project
- /home/admin/src/cardano-node/cabal.project.local
/home/admin/.ghcup/bin/ghc-8.10.7 --print-global-package-db
Reading available packages of hackage.haskell.org...
Using historical state as of 2024-06-23T23:01:13Z as explicitly requested (via command line / project configuration) index-state(hackage.haskell.org) = 2024-06-23T23:01:13Z (HEAD = 2024-07-28T21:48:40Z)
Reading available packages of cardano-haskell-packages...
Using historical state as of 2024-07-24T14:16:32Z as explicitly requested (via command line / project configuration) index-state(cardano-haskell-packages) = 2024-07-24T14:16:32Z (HEAD = 2024-07-25T13:19:14Z)
/usr/bin/pkg-config --version
/usr/bin/pkg-config --variable pc_path pkg-config
/usr/bin/pkg-config --version
/usr/bin/pkg-config --list-all
/usr/bin/pkg-config --modversion libsecp256k1 libsodium libblst libsecp256k1 libsodium libblst libcrypt libtirpc ncurses menu lmdb gmp 'ncurses++' tic gmpxx ncursesw libnsl form panelw libsodium zlib menuw libxcrypt tinfo libssl 'ncurses++w' libsystemd panel libcrypto libffi numa openssl formw shared-mime-info iso-codes systemd udev bash-completion xkeyboard-config
Resolving dependencies...
CallStack (from HasCallStack):
  withMetadata, called at src/Distribution/Simple/Utils.hs:370:14 in Cabal-3.8.1.0-inplace:Distribution.Simple.Utils
Error: cabal: Could not resolve dependencies:
[__0] trying: cardano-node-9.1.0 (user goal)
[__1] next goal: text (dependency of cardano-node)
[__1] rejecting: text-1.2.4.1/installed-1.2.4.1 (conflict: cardano-node => text>=2.0)
[__1] trying: text-2.1.1
[__2] trying: ouroboros-consensus-cardano-0.18.0.0 (dependency of cardano-node)
[__3] trying: cardano-ledger-mary-1.6.1.0 (dependency of ouroboros-consensus-cardano)
[__4] next goal: base (dependency of cardano-node)
[__4] rejecting: base-4.14.3.0/installed-4.14.3.0 (conflict: text => base<0 && >=4.10 && <5)
[__4] skipping: base-4.20.0.1, base-4.20.0.0, base-4.19.1.0, base-4.19.0.0, base-4.18.2.1, base-4.18.2.0, base-4.18.1.0, base-4.18.0.0, base-4.17.2.1, base-4.17.2.0, base-4.17.1.0, base-4.17.0.0, base-4.16.4.0, base-4.16.3.0, base-4.16.2.0, base-4.16.1.0, base-4.16.0.0, base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (has the same characteristics that caused the previous version to fail: excluded by constraint '<0 && >=4.10 && <5' from 'text')
[__4] fail (backjumping, conflict set: base, cardano-node, text)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: cardano-node (2140), aeson (1623), text (1517), ouroboros-consensus-cardano (1082), cardano-ledger-mary (985), base (745), integer-conversion (692)
Try running with --minimize-conflict-set to improve the error message.

admin@tuga-node00:~/src/cardano-node $

Thanks

jmgvale commented 3 months ago

Seems that text is not buildable on arm on 8.10. https://github.com/haskell/text/blob/master/text.cabal#L148

Can you attach an output of cabal build -v2 cardano-node?

Another thing, i'm using cabal 3.8.1.0, t his paper (https://github.com/haskell/text/blob/master/text.cabal#L148) refers cabal 2.2. And, i've got 3 working relay's on raspian (Arm) whith cardado node version 8.1.2

admin@tuga-node00:~/src/cardano-node $ cabal -V
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library
admin@tuga-node00:~/src/cardano-node $

Thanks

angerman commented 3 months ago

@jmgvale I'd suggest building with a more recent e.g. GHC 9.6.4, here is a cross nix expression, which can successfully build aarch64-linux 9.1.0 cardano-node.

I will see if I can get you a receipt to build node natively with 8.10.7, although I'm partial on the quality of that build. I believe the conditional in the text.cabal file to be overly restrictive.

jmgvale commented 2 months ago

@jmgvale I'd suggest building with a more recent e.g. GHC 9.6.4, here is a cross nix expression, which can successfully build aarch64-linux 9.1.0 cardano-node.

I will see if I can get you a receipt to build node natively with 8.10.7, although I'm partial on the quality of that build. I believe the conditional in the text.cabal file to be overly restrictive.

@angerman it worked with GHC 9.6.4!

admin@tuga-node02:~ $ cardano-cli --version
cardano-cli 9.2.1.0 - linux-aarch64 - ghc-9.6
git rev 176f99e51155cb3eaa0711db1c3c969d67438958
admin@tuga-node02:~ $
admin@tuga-node02:~ $ cardano-node --version
cardano-node 9.1.0 - linux-aarch64 - ghc-9.6
git rev 176f99e51155cb3eaa0711db1c3c969d67438958
admin@tuga-node02:~ $
jmgvale commented 2 months ago

Many thanks to @angerman and @carbolymer for helping resolving this issue 👍