nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Link Error when compile cFS with bplib #181

Closed glan6388 closed 1 year ago

glan6388 commented 1 year ago

[ 86%] Linking C shared module bplib.so /usr/bin/ld: os/CMakeFiles/bplib_os.dir/src/cfe.c.o: relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: os/CMakeFiles/bplib_os.dir/src/osal.c.o: relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: os/CMakeFiles/bplib_os.dir/src/heap.c.o: relocation R_X86_64_PC32 against symbol `calloc@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC

jphickey commented 1 year ago

Acknowledged - this occurs because "bplib_os" submodule was inadvertently omitted from the list of modules that the PIC property is propagated to.

Oddly, I did not get the failure on my toolchain (gcc 11.3), not sure why.