media-libs/mesa[unwind] cannot be built on ARM with sys-libs/libunwind-1.2.1 (the most recent version in the Portage tree): In file included from /usr/include/libunwind.h:9:0, from /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.h:35, from /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c:37: /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c: In function ‘debug_backtrace_capture’: /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c:114:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asm’ unw_getcontext(&context); ^ /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c:114:4: error: lvalue required as left operand of assignment unw_getcontext(&context); ^ /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c:114:4: error: ‘unw_base’ undeclared (first use in this function) unw_getcontext(&context); ^ /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c:114:4: note: each undeclared identifier is reported only once for each function it appears in /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c: In function ‘symbol_name_cached’: /var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3/src/gallium/auxiliary/util/u_debug_stack.c:93:7: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] asprintf(&name, "%s%s", procname, ret == -UNW_ENOMEM ? "..." : ""); ^ Upstream has already patched this issue in git: http://git.savannah.nongnu.org/cgit/libunwind.git/commit/?id=ca6b6f3ad9190814ef7869e8c7e73dae0922f647 With sys-libs/libunwind patched with above change media-libs/mesa[unwind] builds successfully on ARM, so please include this patch in sys-libs/libunwind ebuild.
I can repro.
Patch looks ok to apply. Can you post emerge --info and full build.log for posterity?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=273644886b6c4a284d5e8e7788b9680f6ffec198 commit 273644886b6c4a284d5e8e7788b9680f6ffec198 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-07-25 19:33:41 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-07-25 19:35:57 +0000 sys-libs/libunwind: use __asm__ instead of asm (bug #635674) An upstream patch ca6b6f3ad9190 "libunwind-arm: fix build failure due to asm()" should improve support for building mesa on arm. Reported-by: Maciej S. Szmigiero Closes: https://bugs.gentoo.org/635674 Package-Manager: Portage-2.3.43, Repoman-2.3.10 .../files/libunwind-1.2.1-arm-__asm__.patch | 47 +++++++++ sys-libs/libunwind/libunwind-1.2.1-r2.ebuild | 105 +++++++++++++++++++++ 2 files changed, 152 insertions(+)