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

bin/libgmssl.so.3.0: undefined reference to `_rdseed64_step' #1446

Open
alittlehorse opened this issue Mar 14, 2023 · 3 comments
Open

bin/libgmssl.so.3.0: undefined reference to `_rdseed64_step' #1446

alittlehorse opened this issue Mar 14, 2023 · 3 comments

Comments

@alittlehorse
Copy link

make demo_zuc                                                                      [14:42:28]
[ 96%] Built target gmssl
[ 96%] Linking C executable bin/demo_zuc
bin/libgmssl.so.3.0: undefined reference to `_rdseed64_step'
collect2: error: ld returned 1 exit status
CMakeFiles/demo_zuc.dir/build.make:103: recipe for target 'bin/demo_zuc' failed
make[3]: *** [bin/demo_zuc] Error 1
CMakeFiles/Makefile2:218: recipe for target 'CMakeFiles/demo_zuc.dir/all' failed
make[2]: *** [CMakeFiles/demo_zuc.dir/all] Error 2
CMakeFiles/Makefile2:225: recipe for target 'CMakeFiles/demo_zuc.dir/rule' failed
make[1]: *** [CMakeFiles/demo_zuc.dir/rule] Error 2
Makefile:216: recipe for target 'demo_zuc' failed
make: *** [demo_zuc] Error 2

ubuntu version:

Description:    Ubuntu 16.04.7 LTS

glibc version:

(Ubuntu GLIBC 2.23-0ubuntu11.3

The fix, that worked for me:
in file src/rdrand.c

+#include <x86intrin.h>

I will post an PullRequest to fix it

@zhnagshuo124
Copy link

建议使用Cmake编译时加上cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/gzgmssllib ,我是在centos8.2编译时使用的该命令,完美解决该问题

@Gitxiaozhu-oss
Copy link

大佬们你们都是怎么解决的?
image

@flyballon
Copy link

make demo_zuc                                                                      [14:42:28]
[ 96%] Built target gmssl
[ 96%] Linking C executable bin/demo_zuc
bin/libgmssl.so.3.0: undefined reference to `_rdseed64_step'
collect2: error: ld returned 1 exit status
CMakeFiles/demo_zuc.dir/build.make:103: recipe for target 'bin/demo_zuc' failed
make[3]: *** [bin/demo_zuc] Error 1
CMakeFiles/Makefile2:218: recipe for target 'CMakeFiles/demo_zuc.dir/all' failed
make[2]: *** [CMakeFiles/demo_zuc.dir/all] Error 2
CMakeFiles/Makefile2:225: recipe for target 'CMakeFiles/demo_zuc.dir/rule' failed
make[1]: *** [CMakeFiles/demo_zuc.dir/rule] Error 2
Makefile:216: recipe for target 'demo_zuc' failed
make: *** [demo_zuc] Error 2

ubuntu version:

Description:    Ubuntu 16.04.7 LTS

glibc version:

(Ubuntu GLIBC 2.23-0ubuntu11.3

The fix, that worked for me: in file src/rdrand.c

+#include <x86intrin.h>

I will post an PullRequest to fix it

nice bro!

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

4 participants