libbitcoin/libbitcoin-explorer

Build fails with linker problem on libsodium

Closed this issue · 2 comments

Issue

When I try to compile the code with ./autogen.sh, ./configure and make the linker complains about expecting position independent code (PIC):

$ make -j16

  CXXLD    src/libbitcoin-explorer.la
/usr/bin/ld: /usr/local/lib/libsodium.a(libsodium_la-box_curve25519xsalsa20poly1305.o): relocation R_X86_64_PC32 against symbol `crypto_box_curve25519xsalsa20poly1305_beforenm' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:2211: src/libbitcoin-explorer.la] Error 1

System

  • Archlinux
  • 5.4.10-arch1-1 #1 SMP PREEMPT Thu, 09 Jan 2020 10:14:29 +0000 x86_64 GNU/Linux
  • g++ (GCC) 9.2.0 / gcc version 9.2.0 (GCC)

I think it is related to having an outdated /usr/local/lib/libsodium.a. fixed that and retrying now...

okay works now, can be close.