DPP: Static build not working (libm linking error)

Git commit reference Commit b39692bba42ce5577103ebb3736244d51a722eee

Describe the bug When compiling the library statically (-DBUILD_SHARED_LIBS=OFF) linking fails. (see exact error message below)

To Reproduce Steps to reproduce the behavior:

  1. Clone the repository
  2. Execute cmake -B build -DBUILD_SHARED_LIBS=OFF
  3. Execute make -C build

System Details:

  • OS: Debian Trixie

Additional context

I think the issue arises when using the library in a project. Since when adding -DDPP_BUILD_TEST=OFF it works.

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.37.a(e_logf.o): warning: relocation against _dl_x86_cpu_features’ in read-only section .text' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.37.a(s_ceil.o): in function __ceil_ifunc’: (.text+0x2): undefined reference to _dl_x86_cpu_features' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.37.a(s_sin.o): in function __sin_ifunc’: (.text+0x1222): undefined reference to _dl_x86_cpu_features' /usr/bin/ld: (.text+0x122d): undefined reference to _dl_x86_cpu_features’ /usr/bin/ld: (.text+0x1236): undefined reference to _dl_x86_cpu_features' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.37.a(s_sin.o): in function __cos_ifunc’: (.text+0x1282): undefined reference to _dl_x86_cpu_features' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.37.a(s_sin.o):(.text+0x128d): more undefined references to _dl_x86_cpu_features’ follow /usr/bin/ld: warning: creating DT_TEXTREL in a PIE`

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

I can check this next week