我在Linux中交叉编译OpenSSL 1.0.0l,但我收到错误
eng_cryptodev.c:57:30: error: crypto/cryptodev.h: No such file or directory
sh-linux-gnu-gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -
DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 -DTERMIO -O3 -fomit-frame-
pointer -Wall -c -o eng_dyn.o eng_dyn.c
sh-linux-gnu-gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -
DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 -DTERMIO -O3 -fomit-frame
-pointer -Wall -c -o eng_cryptodev.o eng_cryptodev.c
eng_cryptodev.c:57:30: error: crypto/cryptodev.h: No such file or directory
eng_cryptodev.c:73: error: field \u2018d_sess\u2019 has incomplete type
eng_cryptodev.c:105: warning: \u2018struct crparam\u2019 declared inside parameter list
eng_cryptodev.c:105: warning: its scope is only this definition or declaration, which is
probably not what you want
eng_cryptodev.c:106: warning: \u2018struct crparam\u2019 declared inside parameter list
eng_cryptodev.c:107: warning: \u2018struct crypt_kop\u2019 declared inside parameter list
如果有人对此错误有任何疑问,请与我们联系
答案 0 :(得分:0)
sh-linux-gnu-gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -
DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN
-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 -DTERMIO -O3 -fomit-frame
-pointer -Wall -c -o eng_cryptodev.o eng_cryptodev.c
eng_cryptodev.c:57:30: error: crypto/cryptodev.h: No such file or directory
eng_cryptodev.c:73: error: field \u2018d_sess\u2019 has incomplete type
我很确定BSD用于/dev/crypto
。但它不存在于OpenSSL的1.0.0l中:
$ wget http://www.openssl.org/source/openssl-1.0.0l.tar.gz
Resolving www.openssl.org (www.openssl.org)... 185.9.166.106
...
$ tar xzf openssl-1.0.0l.tar.gz
$ cd openssl-1.0.0l/
$ find . -name cryptodev.h
$
您可以尝试使用HAVE_CRYPTODEV
取消-UHAVE_CRYPTODEV
。