gcode-mirror / strace-plus

Automatically exported from code.google.com/p/strace-plus
Other
0 stars 0 forks source link

Build does not link against libunwind-x86 on i386 #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
On an i386 machine:
1. git clone https://code.google.com/p/strace-plus/
2. autoreconf -i -f && ./configure && make

What is the expected output? What do you see instead?
Linking fails with the following output:
gcc -Wall -Wwrite-strings -g -O2   -o strace strace.o syscall.o count.o util.o 
desc.o file.o ipc.o io.o ioctl.o mem.o net.o process.o bjm.o quota.o resource.o 
signal.o sock.o system.o term.o time.o scsi.o stream.o block.o pathtrace.o 
mtd.o vsprintf.o loop.o  -lunwind-ptrace -lunwind 
strace.o: In function `init':
/home/amthrax/r/strace-plus/strace.c:1566: undefined reference to 
`_Ux86_create_addr_space'
syscall.o: In function `print_libunwind_backtrace':
/home/amthrax/r/strace-plus/syscall.c:1965: undefined reference to 
`_Ux86_init_remote'
/home/amthrax/r/strace-plus/syscall.c:1967: undefined reference to 
`_Ux86_get_reg'
/home/amthrax/r/strace-plus/syscall.c:1971: undefined reference to `_Ux86_step'
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../lib/libunwind-ptrace.a(_UPT_find_pro
c_info.o): In function `_UPTi_find_unwind_table':
(.text+0xc28): undefined reference to `_Ux86_local_addr_space'
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../lib/libunwind-ptrace.a(_UPT_find_pro
c_info.o): In function `_UPTi_find_unwind_table':
(.text+0xc80): undefined reference to `_Ux86_local_addr_space'
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../lib/libunwind-ptrace.a(_UPT_find_pro
c_info.o): In function `_UPTi_find_unwind_table':
(.text+0xcbd): undefined reference to `_Ux86_local_addr_space'
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../lib/libunwind-ptrace.a(_UPT_find_pro
c_info.o): In function `_UPT_find_proc_info':
(.text+0xf0a): undefined reference to `_Ux86_dwarf_search_unwind_table'
collect2: error: ld returned 1 exit status

What version of the product are you using? On what operating system?
Current master (acb9665) on Linux i386.

Please provide any additional information below.
On i386, it appears it's necessary to also link against libunwind-x86.  The 
following alternate link command succeeds:
gcc -Wall -Wwrite-strings -g -O2 -o strace strace.o syscall.o count.o util.o 
desc.o file.o ipc.o io.o ioctl.o mem.o net.o process.o bjm.o quota.o resource.o 
signal.o sock.o system.o term.o time.o scsi.o stream.o block.o pathtrace.o 
mtd.o vsprintf.o loop.o -lunwind-ptrace -lunwind -lunwind-x86

Original issue reported on code.google.com by amdragon@gmail.com on 23 Sep 2013 at 12:31

GoogleCodeExporter commented 9 years ago
gcc -Wall -Wwrite-strings -g -O2   -o strace strace.o syscall.o count.o util.o 
desc.o file.o ipc.o io.o ioctl.o mem.o net.o process.o bjm.o quota.o resource.o 
signal.o sock.o system.o term.o time.o scsi.o stream.o block.o pathtrace.o 
mtd.o vsprintf.o loop.o  -lunwind-ptrace -lunwind -lunwind-x86

see last element, everything compiles after you add -lunwind-x86

Original comment by itsmega...@gmail.com on 10 Nov 2013 at 11:55