Bug 244258 - usr.bin/addr2line: build fail without capsicum
Summary: usr.bin/addr2line: build fail without capsicum
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL: https://reviews.freebsd.org/D21104
Depends on:
Reported: 2020-02-21 01:58 UTC by rozhuk.im
Modified: 2020-02-23 19:01 UTC (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description rozhuk.im 2020-02-21 01:58:51 UTC
Mine /etc/src.conf contains:

On world build I got:

In file included from /usr/src/contrib/elftoolchain/addr2line/addr2line.c:30:
/usr/include/capsicum_helpers.h:42:10: fatal error: 'libcasper.h' file not found
#include <libcasper.h>
1 error generated.
--- addr2line.o ---
*** [addr2line.o] Error code 1

make[3]: stopped in /usr/src/usr.bin/addr2line
1 error

make[3]: stopped in /usr/src/usr.bin/addr2line
--- cross-tools ---
*** [cross-tools] Error code 2

make[2]: stopped in /usr/src
1 error

make[2]: stopped in /usr/src
Comment 1 commit-hook freebsd_committer 2020-02-21 14:40:50 UTC
A commit references this bug:

Author: markj
Date: Fri Feb 21 14:40:08 UTC 2020
New revision: 358221
URL: https://svnweb.freebsd.org/changeset/base/358221

  Revert r350515 for now.

  It seems to cause build failures when Capsicum support is disabled in

  PR:		244258
  Reported by:	rozhuk.im@gmail.com, Giacomo Olgeni <olgeni@olgeni.com>

_U  stable/12/
Comment 2 Mark Johnston freebsd_committer 2020-02-21 14:42:45 UTC
I reverted the change for now.  I'm not sure exactly what is causing it, but I suspect it is related to PR 242971.  In particular, even if you have set WITHOUT_CASPER, we should be installing libcasper.h to /usr/include.  If you run make delete-old, libcasper.h may have been removed due to this bug.
Comment 3 rozhuk.im 2020-02-22 23:23:55 UTC
Thanks, fixed.
There is other system tools that casper capable, they have #ifdef for this, as I remember.
Comment 4 Mark Johnston freebsd_committer 2020-02-23 19:01:18 UTC
(In reply to rozhuk.im from comment #3)
addr2line doesn't use casper, just capsicum, and we had no such problem in HEAD.
We do not use ifdefs for include capsicum_helpers.h.  Again, I suspect the failure is caused by the fact that you do not have capsicum_helpers.h installed, due to a bug that is now fixed on stable/12.