Bug 265420 - Symbol _URC_NO_REASON isn't found on armv6, armv7 architectures
Summary: Symbol _URC_NO_REASON isn't found on armv6, armv7 architectures
Status: Closed Not Enough Information
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-24 17:52 UTC by Yuri Victorovich
Modified: 2022-07-29 10:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2022-07-24 17:52:48 UTC
Testcase: cad/nvc

src/debug.c there includes <unwind.h> and then uses _URC_NO_REASON but build on armv6 and armv7 fail with:
> use of undeclared identifier '_URC_NO_REASON'
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2022-07-24 18:06:05 UTC
Which version of FreeBSD? There's this in cad/nvc/Makefile:

.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1400052 # devel/libunwind installs include/unwind.h only before that version, after which it probably exists in the base
BUILD_DEPENDS+= ${LOCALBASE}/include/unwind.h:devel/libunwind
.endif

As far as I can see both main, stable/13 and stable/12's libunwind (under contrib/llvm-project) have _URC_NO_REASON, but I have no idea what the devel/libunwind port provides.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2022-07-24 18:15:07 UTC
(In reply to Dimitry Andric from comment #1)

Version 1400063

Log: http://ampere3.nyi.freebsd.org/build.html?mastername=130releng-armv7-default&build=a51002eeb3d0
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2022-07-24 18:20:46 UTC
The log says:

Jail OSVERSION: 1300139

so it's building ports for 13.x. Can you comment out the BUILD_DEPENDS that pulls in devel/libunwind?

It looks pretty clear that this is a conflict between devel/libunwind headers and base system unwind headers. I think devel/libunwind should only be used on 12.x, or maybe never, even.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2022-07-24 18:30:04 UTC
(In reply to Dimitry Andric from comment #3)

I'll remove dependency on devel/libunwind and will see what happens then.
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2022-07-29 10:38:21 UTC
The ARM implementation of unwind.h on FreeBSD 13.0 and older does not declare _URC_NO_REASON and _Unwind_GetIPInfo.  You could add a patch to cad/nvc that adds those declarations in debug.c.