2

I am trying to compile nettle 3.0 with gmp 6.0.0 and I kept getting missing symbols:

Making all in tools
gcc -g -O2 -ggdb3 -Wno-pointer-sign -Wall -W   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs -L..  pkcs1-conv.o misc.o ../getopt.o ../getopt1.o -lhogweed -lnettle -lgmp -o pkcs1-conv
ld: warning: relocation error: R_386_32: file ../getopt.o: symbol optarg: external symbolic relocation against non-allocatable section .debug_info; cannot be processed at runtime: relocation ignored
Undefined                        first referenced

 symbol                             in file

__gmpz_limbs_write                  ../libhogweed.so

__gmpz_limbs_finish                 ../libhogweed.so

__gmpz_limbs_modify                 ../libhogweed.so

__gmpn_zero                         ../libhogweed.so

__gmpz_roinit_n                     ../libhogweed.so

__gmpn_cnd_sub_n                    ../libhogweed.so

__gmpn_cnd_add_n                    ../libhogweed.so

__gmpz_limbs_read                   ../libhogweed.so

ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `pkcs1-conv'
Current working directory /root/nettle-3.0/tools

I installed gmp 6.0.0 to /usr/local, then - in the nettle directory -, I ran ./configure --prefix=/usr/local, then make and got the error above.

Karl Richter
  • 6,271
  • 17
  • 57
  • 120
user2719735
  • 101
  • 1
  • 9

1 Answers1

4

It looks nettle is finding an older version first. Have you tried?

./configure --prefix=/usr/local --with-include-path=/usr/local/include --with-lib-path=/usr/local/lib

I found the options by using ./configure --help.

casevh
  • 10,348
  • 1
  • 19
  • 30