0

I am trying to build Julia from source, but running make returns this error:

/usr/bin/ld: /usr/local/lib/libcrypto.a(poly1305-x86_64.o): relocation R_X86_64_PC32 against symbol `poly1305_blocks' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

I got a similar error with libssl, so I added -fPIC to openssl Makefile. But after getting the same error with libcrypto, I added -fPIC to the crypto Makefile, and built openssl from source again. But I cannot get past this error.

How do I get libcrypto rebuilt with -fPIC?

1 Answer 1

2

Don't feel bad, it's a bug in OpenSSL! I found it when trying to use OpenSSL as a shared library, hope this fix helps :)

https://github.com/openssl/openssl/issues/744

dot-asm commented on 26 Feb

Somewhere in the beginning of crypto/poly1305/asm/poly1305-x86_64.pl you can find

.globl  poly1305_init
.globl  poly1305_blocks
.globl  poly1305_emit

Adding following lines should help

.hidden poly1305_blocks
.hidden poly1305_emit

Test and report back.

1
  • Yes, it works. I did the same thing, just forgot to update my question.
    – goelakash
    May 1, 2016 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .