오류: armv5tel에 대한 openssh 크로스 컴파일 시 유형 충돌

오류: armv5tel에 대한 openssh 크로스 컴파일 시 유형 충돌

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, 한 수준 위의 디렉터리( openssl콘텐츠가 포함된 디렉터리)를 가리켜야 합니다.

--with-ssl-dir=/usr/local/대신 --with-ssl-dir=/usr/local/openssl크로스 컴파일이 제대로 작동하도록 구성하십시오 .

관련 정보