This is very interesting discussion as linux with shittemD is for sissies. I would also prefer running my node on BSD instead of ubuntu but things don’t good look over there, don’t look good at all.
I started off with NetBSD 9.0 since that used to have a prebuilt jormungander binary. However jormungander is rust based not haskell based it’s completely different technology. https://wiki.haskell.org/BSD#NetBSD.2C_DragonFly_BSD_.28and_others_using_pkgsrc.29
If you look it up ghc is not even in the ports collection for NetBSD, I have tried to build it from source but after fixing compilation errors for hours I just give up.
About FreeBSD12.1 situation is not much better, yes ghc is in the ports collection and yes it is the latest 8.6.5 but trying to build it… good luck with that again.
[155 of 291] Compiling Distribution.SPDX.LicenseId ( libraries/Cabal/Cabal/Distribution/SPDX/LicenseId.hs, bootstrapping/Distribution/SPDX/LicenseId.o )
ghc/ghc.mk:126: ghc/stage1/package-data.mk: No such file or directory
gmake[3]: *** [utils/ghc-cabal/ghc.mk:58: utils/ghc-cabal/dist/build/tmp/ghc-cabal] Killed
gmake[2]: *** [Makefile:124: all] Error 2
gmake[2]: Leaving directory '/usr/ports/lang/ghc/work/ghc-8.10.2'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
After finding 6 years old bugs which still not resolved like: https://gitlab.haskell.org/ghc/ghc/-/issues/8709
I gave up with even trying to build ghc from source and went with the binary package, same with cabal. This will land you:
cabal-install version 3.0.1.0
The Glorious Glasgow Haskell Compilation System, version 8.8.3
with a cabal library under the requirements which is 3.2.0.0.
cabal update <= will not do much good
Regardless I have tried to build cardano-node as is but don’t have to tell you it failed.
Warning: Requested index-state2020-07-15T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state ().
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] next goal: base (dependency of Win32-network)
[__1] rejecting: base-4.13.0.0/installed-4.1... (conflict: Win32-network =>
base>=4.5 && <4.13)
[__1] fail (backjumping, conflict set: Win32-network, base)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: Win32-network, base
This is the most of the time I willing to invest in this project. We need haskell to mature on BSD which might happens if some of the BSD devs get involved with Cardano. Anyway don’t expect much support on these forums for BSD. Maybe by the time the current cardano node matures enough that an average joe can put it together and it does not get stuck, crash and FreeBSD will be at 14.1 we might be able to build it.