Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static build not working (libm linking error) #1146

Open
jonas-resch opened this issue May 3, 2024 · 1 comment
Open

Static build not working (libm linking error) #1146

jonas-resch opened this issue May 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jonas-resch
Copy link

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`

@jonas-resch jonas-resch added the bug Something isn't working label May 3, 2024
@Mishura4
Copy link
Member

I can check this next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants