Skip to content

Project name cannot be "uprobe" for uprobe programs #1027

@gemesa

Description

@gemesa

It seems that the chosen project name cannot be "uprobe" (at least when selecting uprobe as the program type) because the following error occurs. It is not a serious issue but I think it is worth mentioning.

$ cargo generate https://github.com/aya-rs/aya-template
⚠️   Favorite `https://github.com/aya-rs/aya-template` not found in config, using it as a git repository: https://github.com/aya-rs/aya-template
🤷   Project Name: uprobe
🔧   Destination: /home/gemesa/tmp/uprobe ...
🔧   project-name: uprobe ...
🔧   Generating template ...
✔ 🤷   Which type of eBPF program? · uprobe
🤷   Target to attach the (u|uret)probe? (e.g libc): libc
🤷   Function name to attach the (u|uret)probe? (e.g getaddrinfo): uname
🔧   Moving generated files into: `/home/gemesa/tmp/uprobe`...
🔧   Initializing a fresh Git repository
✨   Done! New project created /home/gemesa/tmp/uprobe
$ cd uprobe
$ cargo xtask build-ebpf
...
Compiling uprobe-common v0.1.0 (/home/gemesa/tmp/uprobe/uprobe-common)
   Compiling aya-log-ebpf v0.1.0
   Compiling uprobe-ebpf v0.1.0 (/home/gemesa/tmp/uprobe/uprobe-ebpf)
error: linking with `bpf-linker` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/gemesa/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/gemesa/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/gemesa/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/gemesa/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/gemesa/.local/bin" VSLANG="1033" "bpf-linker" "--export-symbols" "/tmp/rustcDLgpCO/symbols" "/tmp/rustcDLgpCO/symbols.o" "/home/gemesa/tmp/uprobe/uprobe-ebpf/../target/bpfel-unknown-none/debug/deps/uprobe-ef76186f7697bee3.uprobe.b1b08c5f5056932e-cgu.0.rcgu.o" "--cpu" "generic" "-o" "/home/gemesa/tmp/uprobe/uprobe-ebpf/../target/bpfel-unknown-none/debug/deps/uprobe-ef76186f7697bee3" "-O3" "--debug"
  = note: unable to open LLVM shared lib /home/gemesa/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-19-rust-1.83.0-nightly.so: /home/gemesa/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-19-rust-1.83.0-nightly.so: file too short
          ERROR llvm: <unknown>:0: uprobe changed binding to STB_GLOBAL
          
          ERROR llvm: <unknown>:0: symbol 'uprobe' is already defined
          
          Error: LLVM issued diagnostic with error severity
          

error: could not compile `uprobe-ebpf` (bin "uprobe") due to 1 previous error
thread 'main' panicked at xtask/src/build_ebpf.rs:65:5:
assertion failed: status.success()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions