[Buildroot] [PATCH 1/2] package/erlang-jiffy: fix build failure due to lack of -fPIC

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Oct 18 20:14:15 UTC 2021


Hello Giulio,

On Thu, 14 Oct 2021 23:54:53 +0200
Giulio Benetti <giulio.benetti at benettiengineering.com> wrote:

> Package erlang-jiffy needs to be linked with -fPIC otherwise it throws
> linker error:
> ```
> failed with return code 1 and the following output:
> /home/giuliobenetti/br_reproduce/60296a48210e7ffc6bc9fa50ee586441a8957e85/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/9.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /tmp/jiffy.so.FCaOXC.ltrans1.ltrans.o: relocation R_X86_64_PC32 against symbol `dec_destroy' can not be used when making a shared object;
> recompile with -fPIC
> ```
> 
> This is architecture indipendent, so let's add -fPIC flag to LDFLAGS in any
> case.
> 
> Fixes:
> http://autobuild.buildroot.net/results/602/60296a48210e7ffc6bc9fa50ee586441a8957e85/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>

Thanks! However, did you review the discussion at:

  https://lore.kernel.org/buildroot/20201224101440.3427472-1-fontaine.fabrice@gmail.com/

Especially the feedback from Arnout around the end of the thread?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com


More information about the buildroot mailing list