weldr icon indicating copy to clipboard operation
weldr copied to clipboard

[BUG] Library compatibility error with fake_pthread

Open alex-heinricher opened this issue 5 years ago • 0 comments

Describe the bug fake_pthread/fake_setjmp.S does not link correctly when compiling libwrap_pthread.so on Ubuntu 18.04. ld reports the following relocation error:

/usr/bin/ld: bin/fake_setjmp.pic.oS: relocation R_X86_64_PC32 against symbol `sigprocmask@@GLIBC_2.2.5'
 can not be used when making a shared object; recompile with -fPIC

To Reproduce With Weldr installed in an Ubuntu 18.04 environment, perform the folllowing steps:

  • cd <repository root>/fake_pthread
  • make clean all

Expected behavior libwrap_pthread.so should build and link correctly.

Additional context I'm not sure if this is specific to Ubuntu 18.04.

The file fake_setjmp.S doesn't use sigprocmask, nor does its header, fake_setjmp.h. The header includes the global header setjmp.h, because it needs the jmpbuf type. It may be coming from there, indicating a library version mismatch. Why this is interfering with PIC relocation, I don't know.

Example Project N/A; this is project-independent.

alex-heinricher avatar Jun 23 '20 20:06 alex-heinricher