I need to install elfutils-libelf-devel-static because it provides a file I need for compiling a bpf program. The file is libelf.a. I see that this file is provided by elfutils-libelf-devel-static but running the following command:
[VM] sudo dnf install elfutils-libelf-devel-static
Last metadata expiration check: 0:30:35 ago on Thu 11 Feb 2021 02:20:34 PM UTC.
No match for argument: elfutils-libelf-devel-static
Error: Unable to find a match: elfutils-libelf-devel-static
I’ve also tried:
[VM] sudo dnf install https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/e/elfutils-libelf-devel-static-0.179-1.fc32.x86_64.rpm 1 ↵
Last metadata expiration check: 0:31:13 ago on Thu 11 Feb 2021 02:20:34 PM UTC.
elfutils-libelf-devel-static-0.179-1.fc32.x86_64.rpm 81 kB/s | 80 kB 00:00
Error:
Problem: conflicting requests
- nothing provides elfutils-libelf-devel(x86-64) = 0.179-1.fc32 needed by elfutils-libelf-devel-static-0.179-1.fc32.x86_64
(try to add '--skip-broken' to skip uninstallable packages)
I do have elfutils-libelf-devel-0.182-1.fc33.x86_6 installed.
According to the spec file for Fedora 33, elfutils-libelf-devel does not provide libelf.a. Looks like static libraries are removed with this commit altogether:
Thanks for the reply! I upgraded my system to rawhide and pulled in that package but no libelf.a file was provided. So strange that it was removed, i’m going to have to build with an ubuntu container now.
libelf.a would be an intermediate file created during compile.
Why does it have to be a static file?
/usr/lib64/libelf.so is provided by elfutils-libelf-devel
You are also running the very base level of kernel in F33
You could add elfutils-libelf-devel(x86-64) = 0.179-1.fc32 to that last dnf install command where you tried to install the static library, and do both at the same time.
Need the static file for statically compiling a Go program with CGO enabled.
I ended up not being able to install libelf.a from any package (tried rawhide, and backtracking to f32), and instead just build elfutils/libelf from source which worked just fine.