3 # Test to see if backtrace requires a library in /usr/lib
4 # Returns true if the backtrace command works and requires a library in /usr/lib
5 # This is a nasty workaround for Debian bug #708307, which is really a glibc bug
8 cat > /tmp/backtrace$$.c << EOF
12 int main(int argc, char **argv)
17 frames = backtrace(stack_syms, 32);
18 backtrace_symbols_fd(stack_syms, frames, 0);
22 if ! cc -o /tmp/backtrace$$ /tmp/backtrace$$.c; then
26 if ! ldd /tmp/backtrace$$ > /tmp/backtrace$$.ldd 2>&1 ; then
30 grep -q /usr/lib /tmp/backtrace$$.ldd
33 /bin/rm -f /tmp/backtrace$$*