Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 阴谋集团不';不包括c头文件_Haskell_Cabal - Fatal编程技术网

Haskell 阴谋集团不';不包括c头文件

Haskell 阴谋集团不';不包括c头文件,haskell,cabal,Haskell,Cabal,我刚刚在MacOSX10.6.7上安装了Haskell平台的最新版本 我似乎阴谋集团没有正确地包含c头文件 例如,当尝试安装加密哈希时,我得到以下错误: Resolving dependencies... Configuring cryptohash-0.7.0... Preprocessing library cryptohash-0.7.0... Preprocessing executables for cryptohash-0.7.0... Building cryptohash-0.7

我刚刚在MacOSX10.6.7上安装了Haskell平台的最新版本

我似乎阴谋集团没有正确地包含c头文件

例如,当尝试安装加密哈希时,我得到以下错误:

Resolving dependencies...
Configuring cryptohash-0.7.0...
Preprocessing library cryptohash-0.7.0...
Preprocessing executables for cryptohash-0.7.0...
Building cryptohash-0.7.0...
[ 1 of 13] Compiling Crypto.Hash.Tiger ( Crypto/Hash/Tiger.hs, dist/build/Crypto/Hash/Tiger.o )
[ 2 of 13] Compiling Crypto.Hash.Skein512 ( Crypto/Hash/Skein512.hs, dist/build/Crypto/Hash/Skein512.o )
[ 3 of 13] Compiling Crypto.Hash.Skein256 ( Crypto/Hash/Skein256.hs, dist/build/Crypto/Hash/Skein256.o )
[ 4 of 13] Compiling Crypto.Hash.RIPEMD160 ( Crypto/Hash/RIPEMD160.hs, dist/build/Crypto/Hash/RIPEMD160.o )
[ 5 of 13] Compiling Crypto.Hash.MD5  ( Crypto/Hash/MD5.hs, dist/build/Crypto/Hash/MD5.o )
[ 6 of 13] Compiling Crypto.Hash.MD4  ( Crypto/Hash/MD4.hs, dist/build/Crypto/Hash/MD4.o )
[ 7 of 13] Compiling Crypto.Hash.MD2  ( Crypto/Hash/MD2.hs, dist/build/Crypto/Hash/MD2.o )
[ 8 of 13] Compiling Crypto.Hash.SHA512 ( Crypto/Hash/SHA512.hs, dist/build/Crypto/Hash/SHA512.o )
[ 9 of 13] Compiling Crypto.Hash.SHA512t ( Crypto/Hash/SHA512t.hs, dist/build/Crypto/Hash/SHA512t.o )
[10 of 13] Compiling Crypto.Hash.SHA384 ( Crypto/Hash/SHA384.hs, dist/build/Crypto/Hash/SHA384.o )
[11 of 13] Compiling Crypto.Hash.SHA256 ( Crypto/Hash/SHA256.hs, dist/build/Crypto/Hash/SHA256.o )
[12 of 13] Compiling Crypto.Hash.SHA224 ( Crypto/Hash/SHA224.hs, dist/build/Crypto/Hash/SHA224.o )
[13 of 13] Compiling Crypto.Hash.SHA1 ( Crypto/Hash/SHA1.hs, dist/build/Crypto/Hash/SHA1.o )
[ 1 of 13] Compiling Crypto.Hash.Tiger ( Crypto/Hash/Tiger.hs, dist/build/Crypto/Hash/Tiger.p_o )
[ 2 of 13] Compiling Crypto.Hash.Skein512 ( Crypto/Hash/Skein512.hs, dist/build/Crypto/Hash/Skein512.p_o )
[ 3 of 13] Compiling Crypto.Hash.Skein256 ( Crypto/Hash/Skein256.hs, dist/build/Crypto/Hash/Skein256.p_o )
[ 4 of 13] Compiling Crypto.Hash.RIPEMD160 ( Crypto/Hash/RIPEMD160.hs, dist/build/Crypto/Hash/RIPEMD160.p_o )
[ 5 of 13] Compiling Crypto.Hash.MD5  ( Crypto/Hash/MD5.hs, dist/build/Crypto/Hash/MD5.p_o )
[ 6 of 13] Compiling Crypto.Hash.MD4  ( Crypto/Hash/MD4.hs, dist/build/Crypto/Hash/MD4.p_o )
[ 7 of 13] Compiling Crypto.Hash.MD2  ( Crypto/Hash/MD2.hs, dist/build/Crypto/Hash/MD2.p_o )
[ 8 of 13] Compiling Crypto.Hash.SHA512 ( Crypto/Hash/SHA512.hs, dist/build/Crypto/Hash/SHA512.p_o )
[ 9 of 13] Compiling Crypto.Hash.SHA512t ( Crypto/Hash/SHA512t.hs, dist/build/Crypto/Hash/SHA512t.p_o )
[10 of 13] Compiling Crypto.Hash.SHA384 ( Crypto/Hash/SHA384.hs, dist/build/Crypto/Hash/SHA384.p_o )
[11 of 13] Compiling Crypto.Hash.SHA256 ( Crypto/Hash/SHA256.hs, dist/build/Crypto/Hash/SHA256.p_o )
[12 of 13] Compiling Crypto.Hash.SHA224 ( Crypto/Hash/SHA224.hs, dist/build/Crypto/Hash/SHA224.p_o )
[13 of 13] Compiling Crypto.Hash.SHA1 ( Crypto/Hash/SHA1.hs, dist/build/Crypto/Hash/SHA1.p_o )

cbits/sha1.c:25:20:  error: string.h: No such file or directory

In file included from cbits/sha1.c:26:0: 

cbits/sha1.h:27:20:  error: stdint.h: No such file or directory

In file included from cbits/sha1.c:26:0: 

cbits/sha1.h:31:0:
     error: expected specifier-qualifier-list before ‘uint64_t’

cbits/sha1.h:40:0:
     error: expected declaration specifiers or ‘...’ before ‘uint8_t’

cbits/sha1.h:40:0:
     error: expected declaration specifiers or ‘...’ before ‘uint32_t’

cbits/sha1.h:41:0:
     error: expected declaration specifiers or ‘...’ before ‘uint8_t’

In file included from cbits/sha1.c:27:0: 

cbits/bitfn.h:33:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bitfn_swap32’

cbits/bitfn.h:72:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rol32’

cbits/bitfn.h:79:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ror32’

cbits/bitfn.h:86:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rol64’

cbits/bitfn.h:93:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ror64’

cbits/bitfn.h:107:0:  error: expected ‘)’ before ‘*’ token

cbits/bitfn.h:115:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bitfn_swap64’

cbits/bitfn.h:123:0:  error: expected ‘)’ before ‘*’ token

cbits/bitfn.h:131:0:
     error: expected declaration specifiers or ‘...’ before ‘uint32_t’
cbits/bitfn.h: In function ‘memory_zero’:

cbits/bitfn.h:133:0:
     error: ‘uint32_t’ undeclared (first use in this function)

cbits/bitfn.h:133:0:
     error: (Each undeclared identifier is reported only once

cbits/bitfn.h:133:0:  error: for each function it appears in.)

cbits/bitfn.h:133:0:
     error: ‘ptr32’ undeclared (first use in this function)

cbits/bitfn.h:134:0:
     error: ‘uint8_t’ undeclared (first use in this function)

cbits/bitfn.h:134:0:
     error: ‘ptr8’ undeclared (first use in this function)

cbits/bitfn.h:137:0:
     error: ‘len’ undeclared (first use in this function)

cbits/bitfn.h:140:0:  error: expected expression before ‘)’ token
cbits/bitfn.h: At top level:

cbits/bitfn.h:148:0:  error: expected ‘)’ before ‘*’ token

cbits/bitfn.h:155:0:  error: expected ‘)’ before ‘*’ token

In file included from cbits/sha1.c:27:0: 

cbits/bitfn.h:169:31:
     error: machine/endian.h: No such file or directory
cbits/sha1.c: In function ‘sha1_init’:

cbits/sha1.c:31:0:
     warning: implicit declaration of function ‘memset’

cbits/sha1.c:31:0:
     warning: incompatible implicit declaration of built-in function ‘memset’

cbits/sha1.c:33:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:34:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:35:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:36:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:37:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’
cbits/sha1.c: At top level:

cbits/sha1.c:56:0:
     error: expected declaration specifiers or ‘...’ before ‘uint32_t’
cbits/sha1.c: In function ‘sha1_do_chunk’:

cbits/sha1.c:58:0:
     error: ‘uint32_t’ undeclared (first use in this function)

cbits/sha1.c:58:0:  error: expected ‘;’ before ‘a’

cbits/sha1.c:59:0:  error: expected ‘;’ before ‘w’

cbits/sha1.c:61:0:
     error: ‘w’ undeclared (first use in this function)

cbits/sha1.c:61:0:
     warning: implicit declaration of function ‘bitfn_swap32’

cbits/sha1.c:61:0:
     error: ‘buf’ undeclared (first use in this function)

cbits/sha1.c:65:0:
     error: ‘a’ undeclared (first use in this function)

cbits/sha1.c:65:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:65:0:
     error: ‘b’ undeclared (first use in this function)

cbits/sha1.c:65:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:65:0:
     error: ‘c’ undeclared (first use in this function)

cbits/sha1.c:65:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:65:0:
     error: ‘d’ undeclared (first use in this function)

cbits/sha1.c:65:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:65:0:
     error: ‘e’ undeclared (first use in this function)

cbits/sha1.c:65:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:67:0:
     warning: implicit declaration of function ‘rol32’

cbits/sha1.c:151:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:152:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:153:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:154:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:155:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’
cbits/sha1.c: At top level:

cbits/sha1.c:158:0:
     error: expected declaration specifiers or ‘...’ before ‘uint8_t’

cbits/sha1.c:158:0:
     error: expected declaration specifiers or ‘...’ before ‘uint32_t’
cbits/sha1.c: In function ‘sha1_update’:

cbits/sha1.c:160:0:
     error: ‘uint32_t’ undeclared (first use in this function)

cbits/sha1.c:160:0:  error: expected ‘;’ before ‘index’

cbits/sha1.c:162:0:
     error: ‘index’ undeclared (first use in this function)

cbits/sha1.c:162:0:
     error: ‘struct sha1_ctx’ has no member named ‘sz’

cbits/sha1.c:163:0:
     error: ‘to_fill’ undeclared (first use in this function)

cbits/sha1.c:165:0:
     error: ‘struct sha1_ctx’ has no member named ‘sz’

cbits/sha1.c:165:0:
     error: ‘len’ undeclared (first use in this function)

cbits/sha1.c:169:0:
     warning: implicit declaration of function ‘memcpy’

cbits/sha1.c:169:0:
     warning: incompatible implicit declaration of built-in function ‘memcpy’

cbits/sha1.c:169:0:
     error: ‘struct sha1_ctx’ has no member named ‘buf’

cbits/sha1.c:169:0:
     error: ‘data’ undeclared (first use in this function)

cbits/sha1.c:170:0:  error: expected expression before ‘)’ token

cbits/sha1.c:170:0:
     error: too many arguments to function ‘sha1_do_chunk’

cbits/sha1.c:178:0:  error: expected expression before ‘)’ token

cbits/sha1.c:178:0:
     error: too many arguments to function ‘sha1_do_chunk’

cbits/sha1.c:182:0:
     warning: incompatible implicit declaration of built-in function ‘memcpy’

cbits/sha1.c:182:0:
     error: ‘struct sha1_ctx’ has no member named ‘buf’
cbits/sha1.c: At top level:

cbits/sha1.c:185:0:
     error: expected declaration specifiers or ‘...’ before ‘uint8_t’
cbits/sha1.c: In function ‘sha1_finalize’:

cbits/sha1.c:187:0:
     error: nested functions are disabled, use -fnested-functions to re-enable

cbits/sha1.c:187:0:
     error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘padding’

cbits/sha1.c:187:0:
     error: ‘padding’ undeclared (first use in this function)

cbits/sha1.c:187:0:  error: expected expression before ‘{’ token

cbits/sha1.c:188:0:
     error: ‘uint64_t’ undeclared (first use in this function)

cbits/sha1.c:188:0:  error: expected ‘;’ before ‘bits’

cbits/sha1.c:189:0:
     error: ‘uint32_t’ undeclared (first use in this function)

cbits/sha1.c:189:0:  error: expected ‘;’ before ‘index’

cbits/sha1.c:190:0:
     error: ‘p’ undeclared (first use in this function)

cbits/sha1.c:190:0:  error: expected expression before ‘)’ token

cbits/sha1.c:193:0:
     error: ‘bits’ undeclared (first use in this function)

cbits/sha1.c:193:0:
     warning: implicit declaration of function ‘bitfn_swap64’

cbits/sha1.c:193:0:
     error: ‘struct sha1_ctx’ has no member named ‘sz’

cbits/sha1.c:196:0:
     error: ‘index’ undeclared (first use in this function)

cbits/sha1.c:196:0:
     error: ‘struct sha1_ctx’ has no member named ‘sz’

cbits/sha1.c:197:0:
     error: ‘padlen’ undeclared (first use in this function)

cbits/sha1.c:198:0:
     error: too many arguments to function ‘sha1_update’

cbits/sha1.c:201:0:
     error: ‘uint8_t’ undeclared (first use in this function)

cbits/sha1.c:201:0:  error: expected expression before ‘)’ token

cbits/sha1.c:201:0:
     error: too many arguments to function ‘sha1_update’

cbits/sha1.c:204:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:205:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:206:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:207:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’

cbits/sha1.c:208:0:
     error: ‘struct sha1_ctx’ has no member named ‘h’
cabal: Error: some packages failed to install:
cryptohash-0.7.0 failed during the building phase. The exception was:
ExitFailure 1

如何修复此问题?

只是想锁定答案:这是与XCode 4相关的Haskell平台版本中的一个bug

请锁定答案:这是与XCode 4相关的Haskell平台版本中的一个bug

您是否安装了BSD开发头文件
pkgutil--pkg info com.apple.pkg.DevSDKLeo
真奇怪。在Fedora 14和ghc 7上,我能够使用“cabal dev install cryptohash”,并且所有内容都符合我的要求。我无法在Mac OS X 10.6.6和ghc 7.02上复制这一点。这里很好。您使用的是哪个版本的ghc?这与操作系统或ghc版本无关。正如geekosaur所说,您似乎没有安装
libc6 dev
文件(这是这些文件的Debian包名)。我认为在Mac上,HP安装程序同样希望您安装了最新的gcc。您使用的是哪个版本的XCode?Haskell站台票163相关吗?您是否安装了BSD开发头文件
pkgutil--pkg info com.apple.pkg.DevSDKLeo
真奇怪。在Fedora 14和ghc 7上,我能够使用“cabal dev install cryptohash”,并且所有内容都符合我的要求。我无法在Mac OS X 10.6.6和ghc 7.02上复制这一点。这里很好。您使用的是哪个版本的ghc?这与操作系统或ghc版本无关。正如geekosaur所说,您似乎没有安装
libc6 dev
文件(这是这些文件的Debian包名)。我认为在Mac上,HP安装程序同样希望您安装了最新的gcc。您使用的是哪个版本的XCode?Haskell站台票163相关吗?