Jeffrey Walton <[email protected]> writes:

> I'm seeing a fair amount of "ld: warning: relocation error:
> R_AMD64_64" when linking from nettle-3.6 release tarball:

On what platform, and what version of gcc and linker?

> gcc -g2 -O2 -m64 -march=native -fPIC -pthread -ggdb3 -Wall -W
> -Wno-sign-compare   -Wmissing-prototypes -Wmissing-declarations
> -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast
> -Wnested-externs -L.. -L/opt/ssh/lib -m64 -Wl,-R,'RIGIN/../lib'
> -Wl,-R,/opt/ssh/lib -Wl,-z,now rsa-sign.o io.o read_rsa_key.o \
> -lhogweed -lnettle -lgmp -ldl -lpthread -o rsa-sign
> ld: warning: relocation error: R_AMD64_64: file ../getopt.o: symbol

Is this command line correct? ../getopt.o doesn't appear on it, only in
the error message.

> optarg: external symbolic relocation against non-allocatable section

optarg is a plain global variable (part of the traditional getopt
interface).

> .debug_info; cannot be processed at runtime: relocation ignored
>
> It looks like getopt was not built correctly.

This all looks strange to me. For AMD64, Nettle is a plain C library, no
linker or assembly magic. And command line options above look reasonable
to me. Do your custom configure arguments matter, i.e., does it work
better with a plain ./configure && make or ./configure CC='gcc -m64' &&
make?

In general, if you have problems with bulding nettle, gmp, or any other
package, please try configure with plain and documented options before
bug reporting. If that still fails, it will be easier for developers to
understand and reproduce the problem. And if works, it means it's
something in your specific configure setting that triggers the breakage.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to