After installing likwid when attempting to run `likwid-perfctr -a` as a normal user on an ~AMD64 system I get: freddie@localhost ~ $ likwid-perfctr -a /usr/bin/likwid-lua: cannot open /usr/bin/likwid-perfctr: Permission denied I am guessing that this is because likwid-lua is attempting to open likwid-perfctr which is chmod 0711. Changing to 0755 resolves the issue locally.
It seems setting file caps in the ebuild strips the perms down. Unsure why yet Removing "perfctr" from : cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter} Then gives us the correct perms on "/usr/bin/likwid-perfctr" I will look into what the filecaps function is doing and why the perms are stripped.
read the manual. "The caps mode (default 711) is used to set the permission on the file if capabilities were properly set on the file." https://devmanual.gentoo.org/eclass-reference/fcaps.eclass/index.html I'll get to work on a patch for the ebuild :)
Created attachment 433906 [details, diff] Patch to the ebuild This patch will fix the bug. However given it changes files on a users disk I am going to assume we need a rev version bump as well. Thus a new ebuild should be inserted into portage called "likwid-4.0.1-r2.ebuild"
Resolved in : https://github.com/gentoo/gentoo/commit/68e7d18fc6a90751f83a8862e8eff084ccc66087