Bug#796800: haskell-cryptonite: FTBFS on most architectures

Edmund Grimley Evans edmund.grimley.evans at gmail.com
Mon Aug 24 16:22:21 UTC 2015


Source: haskell-cryptonite
Version: 0.5-1
Tags: patch

This package fails to build on non-Intel architectures:

https://buildd.debian.org/status/package.php?p=haskell-cryptonite&suite=sid

I found I could build it on arm64 with this patch:

--- haskell-cryptonite-0.5/cryptonite.cabal.orig
+++ haskell-cryptonite-0.5/cryptonite.cabal
@@ -196,7 +196,7 @@
   -- FIXME armel or mispel is also little endian.
   -- might be a good idea to also add a runtime autodetect mode.
   -- ARCH_ENDIAN_UNKNOWN
-  if (arch(i386) || arch(x86_64))
+  if (arch(i386) || arch(x86_64) || arch(aarch64))
     CPP-options: -DARCH_IS_LITTLE_ENDIAN

   if arch(i386)



However, I don't think "arch" is the right way to detect endianness.
Some architectures come in little-endian and big-endian variants.

What's the right way? Perhaps "#ifdef ARCH_IS_LITTLE_ENDIAN" shouldn't
appear in Haskell source files, seeing as there are things like
Data.Endian and System.ByteOrder.

Of course, something like the above could be a viable temporary
work-around for most Debian architectures.



More information about the Pkg-haskell-maintainers mailing list