FS#50262 - [gcc] GCC ships without libbacktrace

Attached to Project: Arch Linux
Opened by Michał Janiszewski (janisozaur) - Thursday, 04 August 2016, 22:10 GMT
Last edited by Allan McRae (Allan) - Friday, 09 September 2016, 02:13 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

GCC gained libbacktrace back in 4.8, according to numerous reports online.

libbacktrace is a tool to generate stack traces with aid of the compiler itself, which is a useful debugging technique.

ArchLinux's GCC is missing support for this.

Additional info:
* backtrace.h in compiler tree: https://github.com/gcc-mirror/gcc/blob/master/libbacktrace/backtrace.h
* Other ditros' GCC ships with libbacktrace baked in: http://packages.ubuntu.com/search?searchon=contents&keywords=backtrace.h&mode=exactfilename&suite=xenial&arch=any


Steps to reproduce:
1. Write simple C program, test.c, with following contents:

#include <backtrace.h>
int main() { return 0;}

2. Compile it with `gcc test.c`
3. Expect it to work, but see it fail with:

test.c:1:23: fatal error: backtrace.h: No such file or directory



This bug report also extends to gcc-multilib.
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 09 September 2016, 02:13 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Library not shipped by upstream
Comment by Allan McRae (Allan) - Thursday, 04 August 2016, 23:31 GMT
libbacktrace is a internal library used by gcc and is not installed with "make install"
Comment by Michał Janiszewski (janisozaur) - Friday, 05 August 2016, 06:52 GMT
mingw also ships without libbacktrace, but I'm not aware whether it is supported platform or not.
Comment by Bartłomiej Piotrowski (Barthalion) - Friday, 05 August 2016, 07:54 GMT
I always thought one should include execinfo.h to use backtrace functions.
Comment by Michał Janiszewski (janisozaur) - Friday, 05 August 2016, 07:55 GMT

Loading...