Provide statically-linked prebuild binaries
Currently, the binaries published to GitHub releases are dynamically linked. This is helpful, but not as helpful as a statically linked binary would be! For various CI setups, it would be really nice to be able to pull kcov from GitHub releases and just run it, without installing any extra dependencies.
This might become a bit more important now, as, as far as I can tell, Ubuntu 24 stopped packaging kcov, so it can't be just apt-get installed anymore sadly.
Some previous attempts at static builds are here: https://github.com/SimonKagstrom/kcov/issues/289#issuecomment-485752541
I don't remember quite what the problem was, but one of the libraries kcov links to unfortunately prevents a completely static build. I'm mostly on Mac these days, so don't regularly try the Linux build.
As for Ubuntu, @williamdes has done some very good work at modernizing the Debian kcov packaging, https://tracker.debian.org/pkg/kcov, so kcov should re-appear in Ubuntu with an up-to-date version for (I guess) the next LTS.
... sorry, saw in the link you added that the dependency issues were investigated.
Indeed you still can find it for Ubuntu Focal/Jammy and the current version in development https://launchpad.net/ubuntu/+source/kcov
kcov is now available as a more up to date version in bookworm-backports!
Not sure if this is relevant but I had to fix some lib paths to run the https://github.com/SimonKagstrom/kcov/releases/download/v42/kcov-amd64.tar.gz on Ubuntu 24.04
sudo ln -s /usr/lib/x86_64-linux-gnu/libbfd-2.42-system.so /usr/lib/x86_64-linux-gnu/libbfd-2.38-system.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libopcodes-2.42-system.so /usr/lib/x86_64-linux-gnu/libopcodes-2.38-system.so
Not sure if this is relevant but I had to fix some lib paths to run the https://github.com/SimonKagstrom/kcov/releases/download/v42/kcov-amd64.tar.gz on Ubuntu 24.04
Because you did not use apt install kcov, right ?
Edit: most probably because it is not possible on Noble: https://launchpad.net/ubuntu/noble/+source/kcov But you can download kcov from: http://ftp.debian.org/debian/pool/main/k/kcov/kcov_43+dfsg-1+b4_amd64.deb See: https://packages.debian.org/trixie/amd64/kcov/download
Because you did not use apt install kcov, right ?
True. It's not available for this distro.
Still, please excuse my ignorance, but I don't understand if it's dynamically linked, why doesn't it pickup the newer library version?
Because you did not use apt install kcov, right ?
True. It's not available for this distro.
Still, please excuse my ignorance, but I don't understand if it's dynamically linked, why doesn't it pickup the newer library version?
Well, not an expert here but because it is linked to a specific version.
Check by running ldd /usr/bin/kcov
Something about sonames https://en.wikipedia.org/wiki/Soname