GNOME Bugzilla – Bug 314776
Use of backtrace() breaks OS X support
Last modified: 2005-08-31 12:01:36 UTC
Please describe the problem: Another casualty of Darwin's incomplete libc...building Epiphany fails in ephy-debug.c, with backtrace being undefined. Would it be worth adding back in the old version of trap_handler as a fallback for those systems which don't have execinfo.h? Steps to reproduce: 1. ./configure 2. make 3. Actual results: Error - undefined symbol 'backtrace'. Build fails. Expected results: Build completes without error. Does this happen every time? Yes. Other information:
Thanks for the bug report. I'm not sure what you mean with 'the old version of trap_handler' ? Would a configure check AC_CHECK_HEADER([execinfo.h]) and then #ifdef HAVE_EXECINFO_H ... #endif'ing the code be sufficient?
That was what I'd thought, but I'm new enough at this that I wanted to hear what someone else would do. By the "old version" of trap_handler, I had meant the section that backtrace had replaced...this: #ifdef HAVE_DUMPSTACKTOFILE DumpStackToFile (stderr); #else g_on_error_stack_trace (g_get_prgname ()); #endif Sorry, that wasn't very clear, was it? :)
Created attachment 51519 [details] [review] Proposed patch Would this be the correct fix? (This is my first patch, so it probably isn't...)
Yes, that patch is exactly what I meant. I assume you've tested it and it produces the desired result? I'll commit it when producing 1.8.0 tarball next monday. Thanks for the patch! The 'old method' was a hack; I'd rather not go back to using it.
Checked in.
Created attachment 51589 [details] [review] Revised patch Sorry, wasn't able to get this to you yesterday - I found one silly mistake in the original patch. This compiles correctly on my system, but could you check that configure does indeed define HAVE_EXECINFO_H on a machine that does have it?
It's indeed defined. When I applied the patch I added #ifdef around the #include; any other changes in your new patch?
No, that was it - I had removed the #include while I was puttering around, and forgot about it until I tried to build from a clean copy. Thanks for your help on this!