ns3 build failed in Fedora !!

51 views
Skip to first unread message

Mohit Ranjan Basak

unread,
Nov 29, 2022, 3:28:19 AM11/29/22
to ns-3-users
Hi Tom ,

I am building ns-3.37 in RHEL fedora (8.6) , but it is failing with below error:
[  0%] Linking CXX executable ../../../../build/src/config-store/examples/ns3.37-config-store-save-optimized
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_mul'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpz_limbs_modify'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_invert'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_powm_itch'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpz_limbs_write'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpn_cnd_add_n'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_div_r'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpn_cnd_sub_n'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpz_limbs_finish'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_invert_itch'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_powm'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_mul_itch'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpz_roinit_n'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_div_r_itch'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_add_1_itch'
//usr/lib64/libhogweed.so.4: undefined reference to `__gmpn_sec_add_1'
//usr/lib64/libgnutls.so.30: undefined reference to `__gmpz_limbs_read'
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/config-store/examples/CMakeFiles/config-store-save.dir/build.make:114: ../build/src/config-store/examples/ns3.37-config-store-save-optimized] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:4888: src/config-store/examples/CMakeFiles/config-store-save.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Finished executing the following commands:
cd cmake-cache; cmake --build . -j 1 ; cd ..


the library and the reference is present in the system.
[mbasak@ilptldvctodev80 ns-3.37]$ ls //usr/lib64/libhogweed.so.4
//usr/lib64/libhogweed.so.4
[mbasak@ilptldvctodev80 ns-3.37]$ strings //usr/lib64/libhogweed.so.4 | grep __gmpn_sec_mul
__gmpn_sec_mul_itch
__gmpn_sec_mul
[mbasak@ilptldvctodev80 ns-3.37]$

Please help to resolve this issue.

Thanks & Regards,
Mohit.

Gabriel Ferreira

unread,
Nov 29, 2022, 12:25:13 PM11/29/22
to ns-3-users
The string you checked in libhogweed is probably an exported symbol that gets resolved at runtime.
To check if that is the case, you can use 'objdump -x library.so > outputfile.txt', then read if the symbol has an address or is marked as undefined (*UND*).

As far as I know, gmp stands for libgmp (GNU Multi Precision). 
You probably need to link to libgmp too (assuming this is needed for cryptographic algorithms due to large keys).
Reply all
Reply to author
Forward
0 new messages