wheezyでarmv5tel用openssh-7.2p2をクロスコンパイルすると、次のエラーが発生します。Before this, I have successfully cross compiled and installed zlib-1.2.8 and openssl-1.0.2h. For openssl
、私は./configure
コマンドとして使用します: ./Configure linux-armv4 --prefix=/usr/local
。試しましたが、linux-elf
組み立てエラーが発生しました。
opensslなしでopensshをクロスコンパイルすると問題はないようです。
私が何を間違っているかについての提案やアイデア
In file included from /usr/local/include/openssl/x509.h:107,
from /usr/local/include/openssl/pem.h:70,
from sshkey.c:37:
/usr/local/include/openssl/sha.h:139: error: conflicting types for 'SHA256_CTX'
openbsd-compat/sha2.h:72: error: previous declaration of 'SHA256_CTX' was here
/usr/local/include/openssl/sha.h:150: error: conflicting types for 'SHA256_Init'
openbsd-compat/sha2.h:81: error: previous declaration of 'SHA256_Init' was here
/usr/local/include/openssl/sha.h:151: error: conflicting types for 'SHA256_Update'
openbsd-compat/sha2.h:84: error: previous declaration of 'SHA256_Update' was here
/usr/local/include/openssl/sha.h:152: error: conflicting types for 'SHA256_Final'
openbsd-compat/sha2.h:87: error: previous declaration of 'SHA256_Final' was here
/usr/local/include/openssl/sha.h:154: error: conflicting types for 'SHA256_Transform'
openbsd-compat/sha2.h:82: error: previous declaration of 'SHA256_Transform' was here
/usr/local/include/openssl/sha.h:191: error: conflicting types for 'SHA512_CTX'
openbsd-compat/sha2.h:77: error: previous declaration of 'SHA512_CTX' was here
/usr/local/include/openssl/sha.h:199: error: conflicting types for 'SHA384_Init'
openbsd-compat/sha2.h:98: error: previous declaration of 'SHA384_Init' was here
/usr/local/include/openssl/sha.h:200: error: conflicting types for 'SHA384_Update'
openbsd-compat/sha2.h:101: error: previous declaration of 'SHA384_Update' was here
/usr/local/include/openssl/sha.h:201: error: conflicting types for 'SHA384_Final'
openbsd-compat/sha2.h:104: error: previous declaration of 'SHA384_Final' was here
/usr/local/include/openssl/sha.h:203: error: conflicting types for 'SHA512_Init'
openbsd-compat/sha2.h:115: error: previous declaration of 'SHA512_Init' was here
/usr/local/include/openssl/sha.h:204: error: conflicting types for 'SHA512_Update'
openbsd-compat/sha2.h:118: error: previous declaration of 'SHA512_Update' was here
/usr/local/include/openssl/sha.h:205: error: conflicting types for 'SHA512_Final'
openbsd-compat/sha2.h:121: error: previous declaration of 'SHA512_Final' was here
/usr/local/include/openssl/sha.h:207: error: conflicting types for 'SHA512_Transform'
openbsd-compat/sha2.h:116: error: previous declaration of 'SHA512_Transform' was here
make: *** [sshkey.o] Error 1
openssh の構成は次のように要約されます。
OpenSSH has been configured with the following options:
User binaries: /usr/local/bin
System binaries: /usr/local/sbin
Configuration files: /usr/local/etc/ssh
Askpass program: /usr/local/libexec/ssh-askpass
Manual pages: /usr/local/share/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Manpage format: doc
PAM support: no
OSF SIA support: no
KerberosV support: no
SELinux support: no
Smartcard support:
S/KEY support: no
MD5 password support: no
libedit support: no
Solaris process contract support: no
Solaris project support: no
Solaris privilege support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: yes
BSD Auth support: no
Random number source:
Privsep sandbox style: none
Host: arm-none-linux-gnu
Compiler: arm-none-linux-gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-all -std=gnu99 -fPIE
Preprocessor flags: -I/usr/local/include
Linker flags: -L/usr/local/include -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-all -pie
Libraries: -lrt -lutil -lz -lcrypt -lresolv
答え1
構成オプションはディレクトリ--with-ssl-dir
を直接指してはならずopenssl
、1レベル以上のディレクトリ(openssl
コンテンツを含むディレクトリ)を指す必要があります。
--with-ssl-dir=/usr/local/
代わりに、--with-ssl-dir=/usr/local/openssl
クロスコンパイルが正しく機能するように設定してください。