We like to use libunwind to get backtraces on an ARM machine. But we hit a 
problem.

Because the applications we like to link with libunwind need to run at armv5te 
*and* x86 machines, we use GNU autotools.

Our first try for configure.ac was

 ...
 AC_CHECK_LIB([unwind], [_Unwind_Backtrace], [], [ AC_MSG_ERROR([*** Could not 
find libunwind ***]) ])
 AC_CHECK_LIB([dbus-1], [dbus_connection_open], [], [ AC_MSG_ERROR([*** Could 
not find libdbus-1 ***]) ])
 ...

At the arm machine already the configure step fails with this (at x86 it is 
OK). :(

 checking for _Unwind_Backtrace in -lunwind... yes
 checking for dbus_connection_open in -ldbus-1... no
 configure: error: *** Could not find libdbus-1 ***

The details in config.log are these:

------------------->snip<-------------------
configure:3500: checking for _Unwind_Backtrace in -lunwind
configure:3535: gcc -o conftest -g -O2   conftest.c -lunwind   >&5
configure:3542: $? = 0
configure:3563: result: yes
configure:3580: checking for dbus_connection_open in -ldbus-1
configure:3615: gcc -o conftest -g -O2   conftest.c -ldbus-1  -lunwind  >&5
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../libunwind.so: undefined 
reference to `__aeabi_unwind_cpp_pr0'
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../libunwind.so: undefined 
reference to `__aeabi_unwind_cpp_pr1'
collect2: ld returned 1 exit status
configure:3622: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "drctrl"
| #define PACKAGE_TARNAME "drctrl"
| #define PACKAGE_VERSION "0.1"
| #define PACKAGE_STRING "drctrl 0.1"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE "drctrl"
| #define VERSION "0.1"
| #define HAVE_LIBUNWIND 1
| /* end confdefs.h.  */
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char dbus_connection_open ();
| int
| main ()
| {
| return dbus_connection_open ();
|   ;
|   return 0;
| }
configure:3643: result: no
------------------->snip<-------------------

Any hints how to do it right?

Regards,
Steffen


_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to