peadar / pstack

Print stack traces from running processes, or core files. Supports aarch64, x86_64, and i386
BSD 2-Clause "Simplified" License
142 stars 37 forks source link

setcap error during installation #7

Closed ebadi closed 3 years ago

ebadi commented 3 years ago

On ubuntu 20.04 I get:

sudo make install
[sudo] password for wave: 
[ 18%] Built target dwelf
[ 34%] Built target procman
[ 43%] Built target pstack
[ 52%] Built target canal
[ 56%] Built target testhelper
[ 61%] Built target basic
[ 68%] Built target noreturn
[ 72%] Built target segv
[ 77%] Built target args
[ 81%] Built target segvrt
[ 86%] Built target inline
[ 90%] Built target cpp
[ 95%] Built target thread
[100%] Built target badfp
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/bin/pstack
-- Up-to-date: /usr/local/bin/canal
-- Up-to-date: /usr/local/lib/libdwelf.so.1.0.0
-- Up-to-date: /usr/local/lib/libdwelf.so.1
-- Up-to-date: /usr/local/lib/libdwelf.so
-- Up-to-date: /usr/local/lib/libprocman.so.1.0.0
-- Up-to-date: /usr/local/lib/libprocman.so.1
-- Up-to-date: /usr/local/lib/libprocman.so
-- Up-to-date: /usr/local/share/man/man1/pstack.1
-- Up-to-date: /usr/local/include/libpstack
-- Up-to-date: /usr/local/include/libpstack/dwarf.h.rej
-- Up-to-date: /usr/local/include/libpstack/proc.h
-- Up-to-date: /usr/local/include/libpstack/elf.h
-- Up-to-date: /usr/local/include/libpstack/python.h
-- Up-to-date: /usr/local/include/libpstack/dwarf.h.orig
-- Up-to-date: /usr/local/include/libpstack/elf
-- Up-to-date: /usr/local/include/libpstack/elf/aux.h
-- Up-to-date: /usr/local/include/libpstack/elf/dyntag.h
-- Up-to-date: /usr/local/include/libpstack/elf/sectype.h
-- Up-to-date: /usr/local/include/libpstack/inflatereader.h
-- Up-to-date: /usr/local/include/libpstack/lzmareader.h
-- Up-to-date: /usr/local/include/libpstack/util.h
-- Up-to-date: /usr/local/include/libpstack/json.h
-- Up-to-date: /usr/local/include/libpstack/procdump.h
-- Up-to-date: /usr/local/include/libpstack/dwarf
-- Up-to-date: /usr/local/include/libpstack/dwarf/order.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/forms.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/visibility.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/cfainsns.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/inline.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/access.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/attr.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/line_s.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/encodings.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/tags.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/ops.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/unittype.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/virtuality.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/case.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/calling.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/languages.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/archreg.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/line_e.h
-- Up-to-date: /usr/local/include/libpstack/dwarf/discriminant.h
-- Up-to-date: /usr/local/include/libpstack/dwarf.h
-- Up-to-date: /usr/local/include/libpstack/ps_callback.h
fatal error: Invalid argument
usage: setcap [-q] [-v] [-n <rootid>] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.
peadar commented 3 years ago

I've committed a fix, sorry for the breakage. Without the fix, pstack should still be installed, but it won't have the privileges to open live processes unless you use sudo.

ebadi commented 3 years ago

Thank you for fixing this.