Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux环境下,编译异常 #5

Closed
qiangbei opened this issue Oct 28, 2015 · 3 comments
Closed

linux环境下,编译异常 #5

qiangbei opened this issue Oct 28, 2015 · 3 comments

Comments

@qiangbei
Copy link

编译出现以下错误:
OOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -c -o ecp_nistz256-x86_64.o ecp_nistz256-x86_64.s
ecp_nistz256-x86_64.s: Assembler messages:
ecp_nistz256-x86_64.s:823: Error: no such instruction: mulxq %r9,%r8,%r9' ecp_nistz256-x86_64.s:824: Error: no such instruction:mulxq %r10,%rcx,%r10'
ecp_nistz256-x86_64.s:827: Error: no such instruction: mulxq %r11,%rbp,%r11' ecp_nistz256-x86_64.s:830: Error: no such instruction:mulxq %r12,%rcx,%r12'
ecp_nistz256-x86_64.s:833: Error: no such instruction: shlxq %r14,%r8,%rbp' ecp_nistz256-x86_64.s:835: Error: no such instruction:shrxq %r14,%r8,%rcx'
ecp_nistz256-x86_64.s:843: Error: no such instruction: mulxq %r15,%rcx,%rbp' ecp_nistz256-x86_64.s:852: Error: no such instruction:mulxq 0+128(%rsi),%rcx,%rbp'
ecp_nistz256-x86_64.s:853: Error: no such instruction: `adcxq %rcx,%r9'

ecp_nistz256-x86_64.s:854: Error: no such instruction: `adoxq %rbp,%r10'

ecp_nistz256-x86_64.s:1451: Error: suffix or operands invalid for vpand' ecp_nistz256-x86_64.s:1453: Error: suffix or operands invalid forvpxor'
ecp_nistz256-x86_64.s:1454: Error: suffix or operands invalid for vpxor' make[2]: *** [ecp_nistz256-x86_64.o] Error 1 make[2]: Leaving directory/IDE/share/GmSSL-master/crypto/ec'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/IDE/share/GmSSL-master/crypto'
make: *** [build_crypto] Error 1

环境:[root@ide_81 GmSSL-master]# cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (root@CGSLv4-64) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Wed Nov 6 23:48:01 EST 2013
[root@ide_81 GmSSL-master]#

网上下的openssl编译正常。然而编译GMSSL 通过不了。
不知道问题出现在哪里?请问你用的是什么环境?谢谢

@guanzhi
Copy link
Owner

guanzhi commented Oct 31, 2015

暂时还不清楚是什么原因,Linux环境下在config/Configure配置中选择no-asm可以暂时避免这个问题,请下载最新的GmSSL代码,通过./config no-asm配置。

@qiangbei
Copy link
Author

qiangbei commented Nov 2, 2015

您好,非常感谢您,如此快的回复。
现在下载新包重新编译后,又出现如下问题,之前也有碰到。
make[1]: Entering directory /IDE/share/GmSSL-master/ssl' gcc -I../crypto -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -c -o s2_meth.o s2_meth.c In file included from ../include/openssl/ssl.h:1704, from ssl_locl.h:165, from s2_meth.c:59: ../include/openssl/gmssl.h:1: error: expected identifier or 鈥鈥before 鈥鈥token make[1]: *** [s2_meth.o] Error 1 make[1]: Leaving directory/IDE/share/GmSSL-master/ssl'
make: *** [build_ssl] Error 1

@qiangbei
Copy link
Author

qiangbei commented Nov 2, 2015

该问题已解决:
GmSSL-master\include\openssl 中的gmssl.h 直接使用路径的方式 ../../ssl/gmssl.h 无法识别导致。将原始文件copy过来即可。

@guanzhi guanzhi closed this as completed Nov 6, 2015
guanzhi pushed a commit that referenced this issue May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants