Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 635674 - sys-libs/libunwind needs a patch from upstream so media-libs/mesa[unwind] builds on ARM
Summary: sys-libs/libunwind needs a patch from upstream so media-libs/mesa[unwind] bui...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-28 11:17 UTC by Maciej S. Szmigiero
Modified: 2018-07-25 19:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2017-10-28 11:17:34 UTC
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.
Comment 1 sstt011 2018-07-25 06:52:04 UTC
I can repro.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2018-07-25 19:10:26 UTC
Patch looks ok to apply. Can you post emerge --info and full build.log for posterity?
Comment 3 Larry the Git Cow gentoo-dev 2018-07-25 19:36:04 UTC
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(+)