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

elfutils: Error linking libraries against elfutils with undefined symbol: eu_search_tree_init #373516

Open
3 tasks done
javierhonduco opened this issue Jan 13, 2025 · 2 comments
Open
3 tasks done
Labels
0.kind: bug Something is broken

Comments

@javierhonduco
Copy link

javierhonduco commented Jan 13, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

Statically linking an application against elfutils fails with error: undefined symbol: eu_search_tree_init.

Steps to reproduce

This can be easily reproduced in my application. Apologies that it's not, erm, minimal:

  • git clone https://github.com/javierhonduco/lightswitch
  • cd lightswitch && nix flake update
  • nix build

This seems to be this bug reported upstream https://sourceware.org/bugzilla/show_bug.cgi?id=32293. I don't think a new version that has this bugfix as been released.

Expected behaviour

Linking should succeed

Screenshots

No response

Relevant log output

>   = note: rust-lld: error: undefined symbol: eu_search_tree_fini
       >           >>> referenced by elf_end.o:(elf_end) in archive /build/nzfk4l14s8c77zjgxyywy81giryzs6mh-source/target/release/deps/liblibbpf_sys-f6e8a042e99e77a3.rlib
       >           
       >           rust-lld: error: undefined symbol: eu_search_tree_init
       >           >>> referenced by elf_begin.o:(file_read_elf) in archive /build/nzfk4l14s8c77zjgxyywy81giryzs6mh-source/target/release/deps/liblibbpf_sys-f6e8a042e99e77a3.rlib
       >           >>> referenced by elf_begin.o:(file_read_elf) in archive /build/nzfk4l14s8c77zjgxyywy81giryzs6mh-source/target/release/deps/liblibbpf_sys-f6e8a042e99e77a3.rlib
       >           collect2: error: ld returned 1 exit status
       >           

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.11.7-200.fc40.x86_64, Fedora Linux, 40 (Workstation Edition), nobuild
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.9
  • nixpkgs: /nix/store/qpjsygnxp61armwi0rhk3yw7wygc27ch-source

Notify maintainers

@r-burns

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@javierhonduco javierhonduco added the 0.kind: bug Something is broken label Jan 13, 2025
@SigmaSquadron

This comment was marked as off-topic.

EHfive added a commit to EHfive/einat-ebpf that referenced this issue Jan 23, 2025
Upstream issue: NixOS/nixpkgs#373516

The aya loading backend appears to be stable and I am not bother to update
the hack for cross build anymore.

Also use bpftool for stripping as it produces smaller binary.
@javierhonduco
Copy link
Author

I've just checked and seems like this is still an issue (nixpkgs @ 5633bcff0c6162b9e4b5f1264264611e950c8ec7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants