Cabal: Cryptonite failed to install - haskell
I tried to install Yesod with Cabal. Yesod depends on Cryptonite to work, however it failed to install. Here is the error message:
the-inquiry#the-inquiry-pc:~/workspace$ cabal install cryptonite
Resolving dependencies...
Configuring cryptonite-0.11...
Building cryptonite-0.11...
Failed to install cryptonite-0.11
Build log ( /home/the-inquiry/.cabal/logs/cryptonite-0.11.log ):
Configuring cryptonite-0.11...
Building cryptonite-0.11...
Preprocessing library cryptonite-0.11...
[ 1 of 101] Compiling Crypto.Internal.CompatPrim ( Crypto/Internal/CompatPrim.hs, dist/build/Crypto/Internal/CompatPrim.o )
[ 2 of 101] Compiling Crypto.Random.Entropy.Source ( Crypto/Random/Entropy/Source.hs, dist/build/Crypto/Random/Entropy/Source.o )
[ 3 of 101] Compiling Crypto.Random.Entropy.Unix ( Crypto/Random/Entropy/Unix.hs, dist/build/Crypto/Random/Entropy/Unix.o )
[ 4 of 101] Compiling Crypto.Internal.Words ( Crypto/Internal/Words.hs, dist/build/Crypto/Internal/Words.o )
[ 5 of 101] Compiling Crypto.Random.Entropy.Backend ( Crypto/Random/Entropy/Backend.hs, dist/build/Crypto/Random/Entropy/Backend.o )
[ 6 of 101] Compiling Crypto.Random.Entropy.Unsafe ( Crypto/Random/Entropy/Unsafe.hs, dist/build/Crypto/Random/Entropy/Unsafe.o )
[ 7 of 101] Compiling Crypto.PubKey.Internal ( Crypto/PubKey/Internal.hs, dist/build/Crypto/PubKey/Internal.o )
[ 8 of 101] Compiling Crypto.Number.Compat ( Crypto/Number/Compat.hs, dist/build/Crypto/Number/Compat.o )
[ 9 of 101] Compiling Crypto.Number.Basic ( Crypto/Number/Basic.hs, dist/build/Crypto/Number/Basic.o )
[ 10 of 101] Compiling Crypto.Number.ModArithmetic ( Crypto/Number/ModArithmetic.hs, dist/build/Crypto/Number/ModArithmetic.o )
[ 11 of 101] Compiling Crypto.Number.Serialize.Internal ( Crypto/Number/Serialize/Internal.hs, dist/build/Crypto/Number/Serialize/Internal.o )
[ 12 of 101] Compiling Crypto.Internal.DeepSeq ( Crypto/Internal/DeepSeq.hs, dist/build/Crypto/Internal/DeepSeq.o )
[ 13 of 101] Compiling Crypto.Data.Padding ( Crypto/Data/Padding.hs, dist/build/Crypto/Data/Padding.o )
[ 14 of 101] Compiling Crypto.Cipher.DES.Primitive ( Crypto/Cipher/DES/Primitive.hs, dist/build/Crypto/Cipher/DES/Primitive.o )
[ 15 of 101] Compiling Crypto.Internal.Compat ( Crypto/Internal/Compat.hs, dist/build/Crypto/Internal/Compat.o )
[ 16 of 101] Compiling Crypto.Internal.WordArray ( Crypto/Internal/WordArray.hs, dist/build/Crypto/Internal/WordArray.o )
[ 17 of 101] Compiling Crypto.Cipher.Blowfish.Box ( Crypto/Cipher/Blowfish/Box.hs, dist/build/Crypto/Cipher/Blowfish/Box.o )
[ 18 of 101] Compiling Crypto.Internal.ByteArray ( Crypto/Internal/ByteArray.hs, dist/build/Crypto/Internal/ByteArray.o )
[ 19 of 101] Compiling Crypto.Number.Serialize ( Crypto/Number/Serialize.hs, dist/build/Crypto/Number/Serialize.o )
[ 20 of 101] Compiling Crypto.Random.Entropy ( Crypto/Random/Entropy.hs, dist/build/Crypto/Random/Entropy.o )
[ 21 of 101] Compiling Crypto.Random.EntropyPool ( Crypto/Random/EntropyPool.hs, dist/build/Crypto/Random/EntropyPool.o )
[ 22 of 101] Compiling Crypto.Cipher.Types.Utils ( Crypto/Cipher/Types/Utils.hs, dist/build/Crypto/Cipher/Types/Utils.o )
[ 23 of 101] Compiling Crypto.Internal.Imports ( Crypto/Internal/Imports.hs, dist/build/Crypto/Internal/Imports.o )
[ 24 of 101] Compiling Crypto.Cipher.ChaCha ( Crypto/Cipher/ChaCha.hs, dist/build/Crypto/Cipher/ChaCha.o )
[ 25 of 101] Compiling Crypto.Cipher.RC4 ( Crypto/Cipher/RC4.hs, dist/build/Crypto/Cipher/RC4.o )
[ 26 of 101] Compiling Crypto.Cipher.Salsa ( Crypto/Cipher/Salsa.hs, dist/build/Crypto/Cipher/Salsa.o )
[ 27 of 101] Compiling Crypto.Random.Types ( Crypto/Random/Types.hs, dist/build/Crypto/Random/Types.o )
[ 28 of 101] Compiling Crypto.Error.Types ( Crypto/Error/Types.hs, dist/build/Crypto/Error/Types.o )
[ 29 of 101] Compiling Crypto.Number.F2m ( Crypto/Number/F2m.hs, dist/build/Crypto/Number/F2m.o )
[ 30 of 101] Compiling Crypto.Number.Generate ( Crypto/Number/Generate.hs, dist/build/Crypto/Number/Generate.o )
[ 31 of 101] Compiling Crypto.Hash.Types ( Crypto/Hash/Types.hs, dist/build/Crypto/Hash/Types.o )
[ 32 of 101] Compiling Crypto.Hash.IO ( Crypto/Hash/IO.hs, dist/build/Crypto/Hash/IO.o )
[ 33 of 101] Compiling Crypto.Hash.Blake2s ( Crypto/Hash/Blake2s.hs, dist/build/Crypto/Hash/Blake2s.o )
[ 34 of 101] Compiling Crypto.Hash.Blake2sp ( Crypto/Hash/Blake2sp.hs, dist/build/Crypto/Hash/Blake2sp.o )
[ 35 of 101] Compiling Crypto.Hash.Blake2b ( Crypto/Hash/Blake2b.hs, dist/build/Crypto/Hash/Blake2b.o )
[ 36 of 101] Compiling Crypto.Hash.Blake2bp ( Crypto/Hash/Blake2bp.hs, dist/build/Crypto/Hash/Blake2bp.o )
[ 37 of 101] Compiling Crypto.Hash.MD2 ( Crypto/Hash/MD2.hs, dist/build/Crypto/Hash/MD2.o )
[ 38 of 101] Compiling Crypto.Hash.MD4 ( Crypto/Hash/MD4.hs, dist/build/Crypto/Hash/MD4.o )
[ 39 of 101] Compiling Crypto.Hash.MD5 ( Crypto/Hash/MD5.hs, dist/build/Crypto/Hash/MD5.o )
[ 40 of 101] Compiling Crypto.Hash.SHA1 ( Crypto/Hash/SHA1.hs, dist/build/Crypto/Hash/SHA1.o )
[ 41 of 101] Compiling Crypto.Hash.SHA224 ( Crypto/Hash/SHA224.hs, dist/build/Crypto/Hash/SHA224.o )
[ 42 of 101] Compiling Crypto.Hash.SHA256 ( Crypto/Hash/SHA256.hs, dist/build/Crypto/Hash/SHA256.o )
[ 43 of 101] Compiling Crypto.Hash.SHA384 ( Crypto/Hash/SHA384.hs, dist/build/Crypto/Hash/SHA384.o )
[ 44 of 101] Compiling Crypto.Hash.SHA512 ( Crypto/Hash/SHA512.hs, dist/build/Crypto/Hash/SHA512.o )
[ 45 of 101] Compiling Crypto.Hash.SHA512t ( Crypto/Hash/SHA512t.hs, dist/build/Crypto/Hash/SHA512t.o )
[ 46 of 101] Compiling Crypto.Hash.SHA3 ( Crypto/Hash/SHA3.hs, dist/build/Crypto/Hash/SHA3.o )
[ 47 of 101] Compiling Crypto.Hash.Keccak ( Crypto/Hash/Keccak.hs, dist/build/Crypto/Hash/Keccak.o )
[ 48 of 101] Compiling Crypto.Hash.RIPEMD160 ( Crypto/Hash/RIPEMD160.hs, dist/build/Crypto/Hash/RIPEMD160.o )
[ 49 of 101] Compiling Crypto.Hash.Tiger ( Crypto/Hash/Tiger.hs, dist/build/Crypto/Hash/Tiger.o )
[ 50 of 101] Compiling Crypto.Hash.Skein256 ( Crypto/Hash/Skein256.hs, dist/build/Crypto/Hash/Skein256.o )
[ 51 of 101] Compiling Crypto.Hash.Skein512 ( Crypto/Hash/Skein512.hs, dist/build/Crypto/Hash/Skein512.o )
[ 52 of 101] Compiling Crypto.Hash.Whirlpool ( Crypto/Hash/Whirlpool.hs, dist/build/Crypto/Hash/Whirlpool.o )
[ 53 of 101] Compiling Crypto.Hash.Algorithms ( Crypto/Hash/Algorithms.hs, dist/build/Crypto/Hash/Algorithms.o )
[ 54 of 101] Compiling Crypto.Hash ( Crypto/Hash.hs, dist/build/Crypto/Hash.o )
[ 55 of 101] Compiling Crypto.Data.AFIS ( Crypto/Data/AFIS.hs, dist/build/Crypto/Data/AFIS.o )
[ 56 of 101] Compiling Crypto.MAC.HMAC ( Crypto/MAC/HMAC.hs, dist/build/Crypto/MAC/HMAC.o )
[ 57 of 101] Compiling Crypto.KDF.PBKDF2 ( Crypto/KDF/PBKDF2.hs, dist/build/Crypto/KDF/PBKDF2.o )
[ 58 of 101] Compiling Crypto.KDF.Scrypt ( Crypto/KDF/Scrypt.hs, dist/build/Crypto/KDF/Scrypt.o )
[ 59 of 101] Compiling Crypto.KDF.HKDF ( Crypto/KDF/HKDF.hs, dist/build/Crypto/KDF/HKDF.o )
[ 60 of 101] Compiling Crypto.PubKey.MaskGenFunction ( Crypto/PubKey/MaskGenFunction.hs, dist/build/Crypto/PubKey/MaskGenFunction.o )
[ 61 of 101] Compiling Crypto.PubKey.DSA ( Crypto/PubKey/DSA.hs, dist/build/Crypto/PubKey/DSA.o )
[ 62 of 101] Compiling Crypto.PubKey.ECC.Types ( Crypto/PubKey/ECC/Types.hs, dist/build/Crypto/PubKey/ECC/Types.o )
[ 63 of 101] Compiling Crypto.PubKey.RSA.Types ( Crypto/PubKey/RSA/Types.hs, dist/build/Crypto/PubKey/RSA/Types.o )
[ 64 of 101] Compiling Crypto.PubKey.RSA.Prim ( Crypto/PubKey/RSA/Prim.hs, dist/build/Crypto/PubKey/RSA/Prim.o )
[ 65 of 101] Compiling Crypto.Random.ChaChaDRG ( Crypto/Random/ChaChaDRG.hs, dist/build/Crypto/Random/ChaChaDRG.o )
[ 66 of 101] Compiling Crypto.Random.SystemDRG ( Crypto/Random/SystemDRG.hs, dist/build/Crypto/Random/SystemDRG.o )
[ 67 of 101] Compiling Crypto.Random ( Crypto/Random.hs, dist/build/Crypto/Random.o )
[ 68 of 101] Compiling Crypto.Random.Probabilistic ( Crypto/Random/Probabilistic.hs, dist/build/Crypto/Random/Probabilistic.o )
[ 69 of 101] Compiling Crypto.Number.Prime ( Crypto/Number/Prime.hs, dist/build/Crypto/Number/Prime.o )
[ 70 of 101] Compiling Crypto.PubKey.DH ( Crypto/PubKey/DH.hs, dist/build/Crypto/PubKey/DH.o )
[ 71 of 101] Compiling Crypto.PubKey.RSA ( Crypto/PubKey/RSA.hs, dist/build/Crypto/PubKey/RSA.o )
[ 72 of 101] Compiling Crypto.PubKey.RSA.PKCS15 ( Crypto/PubKey/RSA/PKCS15.hs, dist/build/Crypto/PubKey/RSA/PKCS15.o )
[ 73 of 101] Compiling Crypto.PubKey.RSA.PSS ( Crypto/PubKey/RSA/PSS.hs, dist/build/Crypto/PubKey/RSA/PSS.o )
[ 74 of 101] Compiling Crypto.PubKey.RSA.OAEP ( Crypto/PubKey/RSA/OAEP.hs, dist/build/Crypto/PubKey/RSA/OAEP.o )
[ 75 of 101] Compiling Crypto.PubKey.ECC.Prim ( Crypto/PubKey/ECC/Prim.hs, dist/build/Crypto/PubKey/ECC/Prim.o )
[ 76 of 101] Compiling Crypto.PubKey.ECC.ECDSA ( Crypto/PubKey/ECC/ECDSA.hs, dist/build/Crypto/PubKey/ECC/ECDSA.o )
[ 77 of 101] Compiling Crypto.PubKey.ECC.Generate ( Crypto/PubKey/ECC/Generate.hs, dist/build/Crypto/PubKey/ECC/Generate.o )
[ 78 of 101] Compiling Crypto.PubKey.ECC.DH ( Crypto/PubKey/ECC/DH.hs, dist/build/Crypto/PubKey/ECC/DH.o )
[ 79 of 101] Compiling Crypto.Cipher.Types.GF ( Crypto/Cipher/Types/GF.hs, dist/build/Crypto/Cipher/Types/GF.o )
[ 80 of 101] Compiling Crypto.PubKey.ElGamal ( Crypto/PubKey/ElGamal.hs, dist/build/Crypto/PubKey/ElGamal.o )
[ 81 of 101] Compiling Crypto.Error ( Crypto/Error.hs, dist/build/Crypto/Error.o )
[ 82 of 101] Compiling Crypto.Cipher.Blowfish.Primitive ( Crypto/Cipher/Blowfish/Primitive.hs, dist/build/Crypto/Cipher/Blowfish/Primitive.o )
[ 83 of 101] Compiling Crypto.KDF.BCrypt ( Crypto/KDF/BCrypt.hs, dist/build/Crypto/KDF/BCrypt.o )
[ 84 of 101] Compiling Crypto.Cipher.Camellia.Primitive ( Crypto/Cipher/Camellia/Primitive.hs, dist/build/Crypto/Cipher/Camellia/Primitive.o )
[ 85 of 101] Compiling Crypto.MAC.Poly1305 ( Crypto/MAC/Poly1305.hs, dist/build/Crypto/MAC/Poly1305.o )
[ 86 of 101] Compiling Crypto.Cipher.ChaChaPoly1305 ( Crypto/Cipher/ChaChaPoly1305.hs, dist/build/Crypto/Cipher/ChaChaPoly1305.o )
[ 87 of 101] Compiling Crypto.Cipher.Types.Base ( Crypto/Cipher/Types/Base.hs, dist/build/Crypto/Cipher/Types/Base.o )
[ 88 of 101] Compiling Crypto.Cipher.Types.AEAD ( Crypto/Cipher/Types/AEAD.hs, dist/build/Crypto/Cipher/Types/AEAD.o )
[ 89 of 101] Compiling Crypto.Cipher.Types.Block ( Crypto/Cipher/Types/Block.hs, dist/build/Crypto/Cipher/Types/Block.o )
[ 90 of 101] Compiling Crypto.Cipher.Types.Stream ( Crypto/Cipher/Types/Stream.hs, dist/build/Crypto/Cipher/Types/Stream.o )
[ 91 of 101] Compiling Crypto.Cipher.Types ( Crypto/Cipher/Types.hs, dist/build/Crypto/Cipher/Types.o )
[ 92 of 101] Compiling Crypto.Cipher.AES.Primitive ( Crypto/Cipher/AES/Primitive.hs, dist/build/Crypto/Cipher/AES/Primitive.o )
[ 93 of 101] Compiling Crypto.Cipher.Blowfish ( Crypto/Cipher/Blowfish.hs, dist/build/Crypto/Cipher/Blowfish.o )
[ 94 of 101] Compiling Crypto.Cipher.Camellia ( Crypto/Cipher/Camellia.hs, dist/build/Crypto/Cipher/Camellia.o )
[ 95 of 101] Compiling Crypto.Cipher.DES ( Crypto/Cipher/DES.hs, dist/build/Crypto/Cipher/DES.o )
[ 96 of 101] Compiling Crypto.Cipher.TripleDES ( Crypto/Cipher/TripleDES.hs, dist/build/Crypto/Cipher/TripleDES.o )
[ 97 of 101] Compiling Crypto.PubKey.Curve25519 ( Crypto/PubKey/Curve25519.hs, dist/build/Crypto/PubKey/Curve25519.o )
[ 98 of 101] Compiling Crypto.PubKey.ECC.P256 ( Crypto/PubKey/ECC/P256.hs, dist/build/Crypto/PubKey/ECC/P256.o )
[ 99 of 101] Compiling Crypto.PubKey.Ed25519 ( Crypto/PubKey/Ed25519.hs, dist/build/Crypto/PubKey/Ed25519.o )
[100 of 101] Compiling Crypto.PubKey.Ed448 ( Crypto/PubKey/Ed448.hs, dist/build/Crypto/PubKey/Ed448.o )
[101 of 101] Compiling Crypto.Cipher.AES ( Crypto/Cipher/AES.hs, dist/build/Crypto/Cipher/AES.o )
cbits/ed448/x448.c:21:9:
error: unknown type name ‘__uint128_t’
typedef __uint128_t decaf_dword_t;
^
cbits/ed448/x448.c:22:9:
error: unknown type name ‘__int128_t’
typedef __int128_t decaf_sdword_t;
^
cbits/ed448/x448.c: In function ‘gf_mul’:
cbits/ed448/x448.c:83:48:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[X448_LIMBS-1] += accum[X448_LIMBS-2] >> LBITS;
^
cbits/ed448/x448.c:85:48:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[X448_LIMBS/2] += accum[X448_LIMBS-1] >> LBITS;
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:8:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:16:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:24:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:32:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:40:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:48:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:56:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c:87:45:
warning: right shift count >= width of type [-Wshift-count-overflow]
accum[j] += accum[(j-1)%X448_LIMBS] >> LBITS;
^
cbits/ed448/x448.c:50:64:
note: in definition of macro ‘FOR_LIMB_U’
op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; op;i++; \
^
cbits/ed448/x448.c: In function ‘gf_canon’:
cbits/ed448/x448.c:186:15:
warning: right shift count >= width of type [-Wshift-count-overflow]
carry >>= LBITS;
^
cbits/ed448/x448.c:64:76:
note: in definition of macro ‘FOR_LIMB’
#define FOR_LIMB(i,op) { unsigned int i=0; for (i=0; i<X448_LIMBS; i++) { op; }}
^
cbits/ed448/x448.c:196:15:
warning: right shift count >= width of type [-Wshift-count-overflow]
carry >>= LBITS;
^
cbits/ed448/x448.c:64:76:
note: in definition of macro ‘FOR_LIMB’
#define FOR_LIMB(i,op) { unsigned int i=0; for (i=0; i<X448_LIMBS; i++) { op; }}
^
cbits/ed448/x448.c: In function ‘gf_deser’:
cbits/ed448/x448.c:207:91:
warning: right shift count >= width of type [-Wshift-count-overflow]
for (bits += 8; (bits>=LBITS || i==X448_BYTES-1) && k<X448_LIMBS; bits-=LBITS, buf>>=LBITS) {
^
cbits/ed448/x448.c:213:59:
warning: right shift count >= width of type [-Wshift-count-overflow]
FOR_LIMB(i, accum = (accum + s->limb[i] - P->limb[i]) >> WBITS );
^
cbits/ed448/x448.c:64:76:
note: in definition of macro ‘FOR_LIMB’
#define FOR_LIMB(i,op) { unsigned int i=0; for (i=0; i<X448_LIMBS; i++) { op; }}
^
cabal: Error: some packages failed to install:
cryptonite-0.11 failed during the building phase. The exception was:
ExitFailure 1
I've already tried the following solution but it gave the same error message:
cabal dependency resolution fail for 'lens'
My OS is Ubuntu 15.10
Thank you
The relevant part seems to be the next:
cbits/ed448/x448.c:21:9:
error: unknown type name ‘__uint128_t’
typedef __uint128_t decaf_dword_t;
^
AFAIK __uint128_t is a gcc extension, so it is probably not available with your compiler. Try to contact package maintainer.
ADD: Are you using i686 architecture? Looks like the issue is already reported.
Related
Threepenny GUI build fail
So I've been trying to install Threepenny GUI for a Haskell college assignment the last few hours without any avail. When stack attemps to build the 'snap-core' dependency, I get the following error: snap-core > configure snap-core > Configuring snap-core-1.0.5.0... snap-core > build snap-core > Preprocessing library for snap-core-1.0.5.0.. snap-core > Building library for snap-core-1.0.5.0.. snap-core > [ 1 of 18] Compiling Snap.Internal.Debug snap-core > [ 2 of 18] Compiling Snap.Types.Headers snap-core > [ 3 of 18] Compiling Snap.Internal.Http.Types snap-core > snap-core > src\Snap\Internal\Http\Types.hs:1285:11: error: snap-core > * Variable not in scope: snap-core > parseTime :: TimeLocale -> t0 -> String -> Maybe UTCTime snap-core > * Perhaps you meant `parseTimeM' (imported from Data.Time.Format) snap-core > | snap-core > 1285 | prs = parseTime defaultTimeLocale "%a, %d %b %Y %H:%M:%S GMT" snap-core > | ^^^^^^^^^ Progress 1/4 -- While building package snap-core-1.0.5.0 (scroll up to its section to see the error) using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.6.3.0_ghc-9.2.5.exe --verbose=1 --builddir=.stack-work\dist\8a54c84f build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1 I have tried building the dependencies of snap-core with 'stack build --dependencies-only snap-core' with no avail. I've also tried to build the 'time' package on it's own with no avail either. My stack version is up to date also. Any ideas..?
nftables config commands failing with Operation not supported
Request for your kind help related to nftables. while using configuration commands. getting below error . Error: Could not process rule: Operation not supported Debian - 10. root#localhost:~# uname -a Linux localhost 4.19.81-OpenNetworkLinux-thanos #1 SMP Tue Apr 28 08:24:05 UTC 2020 x86_64 GNU/Linux root#localhost:~# nft -v nftables v0.9.0 (Fearless Fosdick) Confirmed nft and dependent packages are installed. root#localhost:~# sudo dpkg-query -l ... ii libnftables0:amd64 0.9.0-2 amd64 Netfilter nftables high level userspace API library ii libnftnl11:amd64 1.1.2-2 amd64 Netfilter nftables userspace API library ii nftables 0.9.0-2 amd64 Program to control packet filtering rules by Netfilter project ii libmnl0:amd64 1.0.4-2 amd64 minimalistic Netlink communication library ... Tried below commands in order: 1.root#localhost:~# nft --debug all flush ruleset 2.root#localhost:~# nft --debug all add table ip filter Below is the debug output for the above 2) add command similar "operation unsupported" error was for 1) as well. # nft --debug all add table ip filter Entering state 0 Reducing stack by rule 1 (line 747): -> $$ = nterm input (: ) Stack now 0 Entering state 1 Reading a token: --accepting rule at line 275 ("add") Next token is token "add" (: ) Shifting token "add" (: ) Entering state 19 Reading a token: --accepting rule at line 631 (" ") --accepting rule at line 245 ("table") Next token is token "table" (: ) Shifting token "table" (: ) Entering state 10 Reading a token: --accepting rule at line 631 (" ") --accepting rule at line 388 ("ip") Next token is token "ip" (: ) Shifting token "ip" (: ) Entering state 35 Reducing stack by rule 246 (line 1845): $1 = token "ip" (: ) -> $$ = nterm family_spec_explicit (: ) Stack now 0 1 19 10 Entering state 47 Reducing stack by rule 245 (line 1842): $1 = nterm family_spec_explicit (: ) -> $$ = nterm family_spec (: ) Reducing stack by rule 245 (line 1842): $1 = nterm family_spec_explicit (: ) -> $$ = nterm family_spec (: ) Stack now 0 1 19 10 Entering state 46 Reading a token: --accepting rule at line 631 (" ") --accepting rule at line 602 ("filter") Next token is token "string" (: ) Shifting token "string" (: ) Entering state 53 Reducing stack by rule 239 (line 1818): $1 = token "string" (: ) -> $$ = nterm identifier (: ) Stack now 0 1 19 10 46 Entering state 250 Reducing stack by rule 252 (line 1853): $1 = nterm family_spec (: ) $2 = nterm identifier (: ) -> $$ = nterm table_spec (: ) Stack now 0 1 19 10 Entering state 57 Reading a token: --accepting rule at line 611 (" ") Next token is token "newline" (: ) Reducing stack by rule 31 (line 874): $1 = token "table" (: ) $2 = nterm table_spec (: ) -> $$ = nterm add_cmd (: ) Stack now 0 1 19 Entering state 66 Reducing stack by rule 17 (line 858): $1 = token "add" (: ) $2 = nterm add_cmd (: ) -> $$ = nterm base_cmd (: ) Stack now 0 1 Entering state 44 Next token is token "newline" (: ) Shifting token "newline" (: ) Entering state 4 Reducing stack by rule 3 (line 766): $1 = token "newline" (: ) -> $$ = nterm stmt_separator (: ) Stack now 0 1 44 Entering state 249 Reducing stack by rule 14 (line 824): $1 = nterm base_cmd (: ) $2 = nterm stmt_separator (: ) -> $$ = nterm line (: ) Stack now 0 1 Entering state 43 Reducing stack by rule 2 (line 748): $1 = nterm input (: ) $2 = nterm line (: ) Evaluate add add table ip filter ^^^^^^^^^^^^^^^^^^^^ -> $$ = nterm input (: ) Stack now 0 Entering state 1 Reading a token: --(end of buffer or a NUL) --EOF (start condition 0) Now at end of input. Shifting token "end of file" (: ) Entering state 2 Stack now 0 1 2 Cleanup: popping token "end of file" (: ) Cleanup: popping nterm input (: ) ---------------- ------------------ | 0000000020 | | message length | | 00016 | R--- | | type | flags | | 0000000000 | | sequence number| | 0000000000 | | port ID | ---------------- ------------------ | 00 00 0a 00 | | extra header |" ..... Error: Could not process rule: Operation not supported add table ip filter ^^^^^^^^^^^^^^ root#localhost:~# nft --interactive nft> create table inet mytable Error: Could not process rule: Operation not supported create table inet mytable Appreciate your help. Thanks all, Santosh
It is possible that the kernel was compiled without the nftables module. You can check if the module is loaded by: lsmod | grep nf_tables
Olimex Micro A20 Certain GPIO wont function on 18.0.06 but they worked on 17.0.1
I am using a Allwinner A20 SoC based Olimex Micro A20 as a development board with openwrt 18.0.6. I face a strange issue that some of GPIO works perfectly others will accept the commands to set as out put and set value High or Low but physically the output will not change. I have a previous built image based on LEDE17.0.1 and in that all these GPIOs work fine. when I issue cat /sys/kernel/debug/gpio This is the result gpiochip0: GPIOs 0-287, parent: platform/1c20800.pinctrl, 1c20800.pinctrl: gpio-35 ( |sysfs ) in lo gpio-36 ( |sysfs ) in lo gpio-40 ( |ahci-5v ) out lo gpio-41 ( |usb0-vbus ) out hi gpio-80 ( |sysfs ) out lo gpio-81 ( |sysfs ) out lo gpio-82 ( |sysfs ) out lo gpio-87 ( |sysfs ) out lo gpio-96 ( |sysfs ) in hi gpio-97 ( |sysfs ) in hi gpio-98 ( |sysfs ) in hi gpio-99 ( |sysfs ) in hi gpio-100 ( |sysfs ) in hi gpio-101 ( |sysfs ) in hi gpio-102 ( |sysfs ) in hi gpio-103 ( |sysfs ) in hi gpio-104 ( |sysfs ) in hi gpio-105 ( |sysfs ) in hi gpio-106 ( |sysfs ) in hi gpio-107 ( |sysfs ) in hi gpio-108 ( |sysfs ) in hi gpio-109 ( |sysfs ) in hi gpio-110 ( |sysfs ) in hi gpio-111 ( |sysfs ) in hi gpio-113 ( |sysfs ) out hi gpio-114 ( |sysfs ) out lo gpio-115 ( |sysfs ) out hi gpio-117 ( |sysfs ) out lo gpio-128 ( |sysfs ) out lo gpio-129 ( |sysfs ) out hi gpio-130 ( |sysfs ) out lo gpio-132 ( |sysfs ) out lo gpio-133 ( |sysfs ) out lo gpio-134 ( |sysfs ) out lo gpio-135 ( |sysfs ) out lo gpio-136 ( |sysfs ) out lo gpio-137 ( |sysfs ) out lo gpio-138 ( |sysfs ) out lo gpio-139 ( |sysfs ) out lo gpio-202 ( |sysfs ) in hi gpio-203 ( |sysfs ) in hi gpio-225 ( |cd ) in lo IRQ gpio-226 ( |a20-olinuxino-micro:) out lo gpio-227 ( |usb2-vbus ) out hi gpio-230 ( |usb1-vbus ) out hi gpio-231 ( |sysfs ) out lo gpio-235 ( |cd ) in hi IRQ gpio-256 ( |sysfs ) out hi gpio-257 ( |sysfs ) out lo gpio-258 ( |sysfs ) out hi gpio-259 ( |sysfs ) out hi gpio-266 ( |sysfs ) out lo gpio-267 ( |sysfs ) out lo gpio-270 ( |sysfs ) out hi gpio-271 ( |sysfs ) out hi gpio-273 ( |sysfs ) out hi gpio-275 ( |sysfs ) out hi In this case gpio257 for example would work properly while gpio138 will accept all the commands but physically the output will be same ls /sys/class/gpio/ export gpio109/ gpio128/ gpio139/ gpio270/ gpio96/ gpio100/ gpio110/ gpio129/ gpio202/ gpio271/ gpio97/ gpio101/ gpio111/ gpio130/ gpio203/ gpio273/ gpio98/ gpio102/ gpio113/ gpio132/ gpio231/ gpio275/ gpio99/ gpio103/ gpio114/ gpio133/ gpio256/ gpio35/ gpiochip0/ gpio104/ gpio115/ gpio134/ gpio257/ gpio36/ gpiochip413/ gpio105/ gpio116/ gpio135/ gpio258/ gpio80/ unexport gpio106/ gpio117/ gpio136/ gpio259/ gpio81/ gpio107/ gpio118/ gpio137/ gpio266/ gpio82/ gpio108/ gpio119/ gpio138/ gpio267/ gpio87/ How can I solve this issue . There are several such GPIO at least 8 -9 that I have encountered I see that all the pins that have 130 -139 numbers wont work . Those with 250+ will work The following are the pins I am interested in and all the pins in 200 series work as expected. The ones in 130-139 range wont work in the new image but they were working in previous image /bin/echo 0 > /sys/class/gpio/gpio257/value /bin/echo 0 > /sys/class/gpio/gpio258/value /bin/echo 0 > /sys/class/gpio/gpio259/value /bin/echo 0 > /sys/class/gpio/gpio271/value /bin/echo 0 > /sys/class/gpio/gpio270/value /bin/echo 0 > /sys/class/gpio/gpio256/value /bin/echo 0 > /sys/class/gpio/gpio138/value /bin/echo 0 > /sys/class/gpio/gpio139/value /bin/echo 0 > /sys/class/gpio/gpio135/value /bin/echo 0 > /sys/class/gpio/gpio137/value /bin/echo 0 > /sys/class/gpio/gpio134/value /bin/echo 0 > /sys/class/gpio/gpio136/value /bin/echo 0 > /sys/class/gpio/gpio133/value /bin/echo 0 > /sys/class/gpio/gpio266/value /bin/echo 0 > /sys/class/gpio/gpio267/value /bin/echo 0 > /sys/class/gpio/gpio132/value
Haskell tool stack upgrade not working
I'm trying to upgrade stack on my MacBook from v1.2.0 to the latest v1.4.0. When I try stack upgrade it ends with the following error. How can I get this to work? stack-1.4.0: build Preprocessing library stack-1.4.0... [ 1 of 124] Compiling Text.PrettyPrint.Leijen.Extended ( src/Text/PrettyPrint/Leijen/Extended.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Text/PrettyPrint/Leijen/Extended.o ) [ 2 of 124] Compiling Hackage.Security.Client.Repository.HttpLib.HttpClient ( src/Hackage/Security/Client/Repository/HttpLib/HttpClient.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Hackage/Security/Client/Repository/HttpLib/HttpClient.o ) [ 3 of 124] Compiling Stack.Options.ScriptParser ( src/Stack/Options/ScriptParser.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/Options/ScriptParser.o ) [ 4 of 124] Compiling Stack.Ghci.Script ( src/Stack/Ghci/Script.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/Ghci/Script.o ) [ 5 of 124] Compiling Stack.FileWatch ( src/Stack/FileWatch.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Stack/FileWatch.o ) [ 6 of 124] Compiling System.Process.PagerEditor ( src/System/Process/PagerEditor.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/PagerEditor.o ) [ 7 of 124] Compiling System.Process.Log ( src/System/Process/Log.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/Log.o ) [ 8 of 124] Compiling Paths_stack ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_stack.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Paths_stack.o ) [ 9 of 124] Compiling Path.Find ( src/Path/Find.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Path/Find.o ) [ 10 of 124] Compiling Path.Extra ( src/Path/Extra.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Path/Extra.o ) [ 11 of 124] Compiling System.Process.Read ( src/System/Process/Read.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Process/Read.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.10.3 for x86_64-apple-darwin): Loading temp shared object failed: dlopen(/var/folders/x3/y7dgvx7j0lx1clp5vsrlt3p40000gn/T/ghc61111_0/libghc_68.dylib, 5): no suitable image found. Did find: /var/folders/x3/y7dgvx7j0lx1clp5vsrlt3p40000gn/T/ghc61111_0/libghc_68.dylib: malformed mach-o: load commands size (49368) > 32768 Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Completed 26 action(s). -- While building package stack-1.4.0 using: /private/var/folders/x3/y7dgvx7j0lx1clp5vsrlt3p40000gn/T/stack-upgrade57904/stack-1.4.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build lib:stack exe:stack --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 Update: #Sibi suggested I try stack upgrade --binary-only: $ stack upgrade --binary-only Invalid option `--binary-only' Usage: stack upgrade [--git] [--git-repo ARG] [--help] Upgrade to the latest stack (experimental)
Segmentation fault when running hs_init(0, 0) for ffi
I am trying to call Haskell functions from python. I have the following make file: GHC=ghc GHC_RUNTIME_LINKER_FLAG=-lHSrts-ghc7.4.1 libffi-example.so: Example.o wrapper.o $(GHC) -o $# -shared -dynamic -fPIC $^ $(GHC_RUNTIME_LINKER_FLAG) Example_stub.h Example.o: Example.hs $(GHC) -c -dynamic -fPIC Example.hs wrapper.o: wrapper.c Example_stub.h $(GHC) -c -dynamic -fPIC wrapper.c clean: rm -f *.hi *.o *_stub.[ch] clean-all: rm -f *.hi *.o *_stub.[ch] *.so # Runs the example Python program example: libffi-example.so python program.py The only thing wrapper.c does it creating wrappers for hs_init by calling hs_init(0,0);. The wrapper is called example_init I get a segmentation fault when running make example, in example_init (ie when calling hs_init(0,0)). Can someone tell me why this is and/or how to fix it? Thanks!
It ought to work: "Moreover, hs_init() may be called with NULL for both argc and argv, signalling the absence of command line arguments." It seems to be a bug in ghc-7.2.1 to ghc-7.4.1: RFib.hs: {-# LANGUAGE ForeignFunctionInterface #-} module RFib where fib :: Int -> Int fib n | n >= 0 = go 0 1 n | even n = -go 0 1 (-n) | otherwise = go 0 1 (-n) where go a _ 0 = a go a b k = go b (a+b) (k-1) foreign export ccall "rfib" fib :: Int -> Int rfib.c: #include <stdio.h> #include <HsFFI.h> int rfib(int); int main(void) { hs_init(0,0); printf("%d\n", rfib(35)); hs_exit(); return 0; } Compile and run: $ rm rfib.o RFib.hi RFib.o a.out $ ghc-7.0.2 -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... 9227465 $ rm rfib.o RFib.hi RFib.o a.out $ ghc-7.0.4 -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... 9227465 $ rm rfib.o RFib.hi RFib.o a.out $ ghc-7.2.1 -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... Speicherzugriffsfehler $ rm rfib.o RFib.hi RFib.o a.out $ ghc-7.2.2 -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... Speicherzugriffsfehler $ rm rfib.o RFib.hi RFib.o a.out $ ghc-7.4.1 -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... Speicherzugriffsfehler $ rm rfib.o RFib.hi RFib.o a.out $ ghc-7.4.2 -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... 9227465 $ rm rfib.o RFib.hi RFib.o a.out $ ghc -O2 -Wall -no-hs-main RFib.hs rfib.c && ./a.out [1 of 1] Compiling RFib ( RFib.hs, RFib.o ) Linking a.out ... 9227465 Changing two lines in rfib.c: int main(int argc, char *argv[]) { hs_init(&argc,&argv); it works with all versions (>= 7.0 that I have installed). So to fix it pass &argc and &argv upgrade GHC are the two most obvious ways.