<br>hi, I am trying to compile strace under Ubuntu 12, and it succeeds initially. However if I define the USE_LIBINWIND macro in <a href="http://config.h.in">config.h.in</a>( I want to use the -k option for stack trace) the linking fails. I tried to manually link against the libunwind library, but that library doesn't have the functions strace is complaining about.<br><br>gcc -Wall -Wwrite-strings -Wsign-compare -g -O2 -o strace strace-access.o strace-affinity.o strace-aio.o strace-alpha.o strace-bjm.o strace-block.o strace-bpf.o strace-btrfs.o strace-cacheflush.o strace-capability.o strace-chdir.o strace-chmod.o
strace-clone.o strace-copy_file_range.o strace-count.o strace-desc.o strace-dirent.o strace-dirent64.o strace-epoll.o strace-evdev.o strace-eventfd.o strace-execve.o strace-exit.o strace-fadvise.o strace-fallocate.o strace-fanotify.o strace-fchownat.o strace-fcntl.o
strace-fetch_seccomp_fprog.o strace-fetch_struct_flock.o strace-fetch_struct_statfs.o strace-file.o strace-file_handle.o strace-file_ioctl.o strace-fs_x_ioctl.o strace-flock.o strace-futex.o strace-get_robust_list.o strace-getcpu.o strace-getcwd.o strace-getrandom.o
strace-hdio.o strace-hostname.o strace-inotify.o strace-io.o strace-ioctl.o strace-ioperm.o strace-iopl.o strace-ioprio.o strace-ipc_msg.o strace-ipc_msgctl.o strace-ipc_sem.o strace-ipc_shm.o strace-ipc_shmctl.o strace-kcmp.o strace-kexec.o strace-keyctl.o
strace-ldt.o strace-link.o strace-lookup_dcookie.o strace-loop.o strace-lseek.o strace-mem.o strace-membarrier.o strace-memfd_create.o strace-mknod.o strace-mount.o strace-mq.o strace-mtd.o strace-net.o strace-numa.o strace-open.o strace-or1k_atomic.o strace-pathtrace.o
strace-perf.o strace-personality.o strace-poll.o strace-prctl.o strace-print_mq_attr.o strace-print_msgbuf.o strace-print_sigevent.o strace-print_statfs.o strace-print_time.o strace-print_timex.o strace-printmode.o strace-printrusage.o strace-printsiginfo.o
strace-process.o strace-process_vm.o strace-ptp.o strace-quota.o strace-readahead.o strace-readlink.o strace-reboot.o strace-renameat.o strace-resource.o strace-rtc.o strace-sched.o strace-scsi.o strace-seccomp.o strace-sendfile.o strace-sigaltstack.o strace-signal.o
strace-signalfd.o strace-sigreturn.o strace-sock.o strace-socketutils.o strace-sram_alloc.o strace-statfs.o strace-strace.o strace-swapon.o strace-syscall.o strace-sysctl.o strace-sysinfo.o strace-syslog.o strace-sysmips.o strace-term.o strace-time.o strace-times.o
strace-truncate.o strace-ubi.o strace-uid.o strace-uid16.o strace-umask.o strace-umount.o strace-uname.o strace-userfaultfd.o strace-util.o strace-utime.o strace-utimes.o strace-v4l2.o strace-vsprintf.o strace-wait.o strace-xattr.o strace-xmalloc.o -L/var/tmp/libunwind/lib/
-lunwind libstrace.a<br><div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><u></u></p>
<p class="MsoNormal">strace-strace.o: In function `droptcb':<u></u><u></u></p>
<p class="MsoNormal">../Downloads/strace-4.12/strace.c:756: undefined reference to `unwind_tcb_fin'<u></u><u></u></p>
<p class="MsoNormal">strace-strace.o: In function `alloctcb':<u></u><u></u></p>
<p class="MsoNormal">../Downloads/strace-4.12/strace.c:735: undefined reference to `unwind_tcb_init'<u></u><u></u></p>
<p class="MsoNormal">strace-strace.o: In function `init':<u></u><u></u></p>
<p class="MsoNormal">../Downloads/strace-4.12/strace.c:1694: undefined reference to `unwind_init'<u></u><u></u></p>
<p class="MsoNormal">strace-syscall.o: In function `trace_syscall_exiting':<u></u><u></u></p>
<p class="MsoNormal">../Downloads/strace-4.12/syscall.c:903: undefined reference to `unwind_cache_invalidate'<u></u><u></u></p>
<p class="MsoNormal">../Downloads/strace-4.12/syscall.c:1124: undefined reference to `unwind_print_stacktrace'<u></u><u></u></p>
<p class="MsoNormal">strace-syscall.o: In function `trace_syscall_entering':<u></u><u></u></p>
<p class="MsoNormal">../Downloads/strace-4.12/syscall.c:864: undefined reference to `unwind_capture_stacktrace'<u></u><u></u></p>
<p class="MsoNormal">collect2: error: ld returned 1 exit status<u></u><u></u></p>
</div>
<font face="Century Gothic" size="1">Thanks</font></div><div lang="EN-US" link="#0563C1" vlink="#954F72"><font face="Century Gothic" size="1"> Dan</font></div>
<br>