error: tipos conflitantes ao compilar cruzado openssh para armv5tel

2

Ao compilar cruzado o openssh-7.2p2 no wheezy para armv5tel, recebo os seguintes erros. Before this, I have successfully cross compiled and installed zlib-1.2.8 and openssl-1.0.2h. For openssl , usei como ./configure command: ./Configure linux-armv4 --prefix=/usr/local . Também tentei com linux-elf , mas recebi erros de assembler.

Quando compilar transversalmente o openssh sem o openssl, parece não haver problema

Qualquer sugestão ou ideia, o que eu faço de errado

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

O resumo de configuração do openssh é o seguinte:

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
    
por Steven 12.06.2016 / 15:00

1 resposta

0

A opção --with-ssl-dir para o configure não deve apontar diretamente para o diretório openssl , mas um nível acima (os includes estão dentro do diretório openssl ).

Configurar com --with-ssl-dir=/usr/local/ em vez de --with-ssl-dir=/usr/local/openssl faz a compilação cruzada funcionar bem.

    
por 12.06.2016 / 23:57