首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:交叉编译armv5tel操作系统时的冲突类型

错误:交叉编译armv5tel操作系统时的冲突类型
EN

Unix & Linux用户
提问于 2016-06-12 13:00:08
回答 1查看 1.2K关注 0票数 2

当为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时,似乎没有问题。

任何建议或想法,我做错了什么

代码语言:javascript
运行
复制
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的配置摘要如下:

代码语言:javascript
运行
复制
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
EN

回答 1

Unix & Linux用户

发布于 2016-06-12 21:57:55

配置的--with-ssl-dir选项不应该直接指向openssl目录,而应该指向上面的一个级别(包含在openssl目录中)。

使用--with-ssl-dir=/usr/local/而不是--with-ssl-dir=/usr/local/openssl进行配置可以使交叉编译工作正常进行。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/289284

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档