27.04.2014 13:54, Paolo Bonzini wrote:
> Il 27/04/2014 10:10, Michael Tokarev ha scritto:
[]
>> Well.   vscclient explicitly uses them in the code, but only links with
>> libcacard, not with other qemu objects.  So adding proper qemu objects
>> here should be fine.  I can take care of that.
>>
>> On the other hand, some of those are mutexes, shouldn't the same objects
>> be used inside the library and inside the executable?  I don't know.
> 
> vscclient should link to libqemuutil.a.

It doesn't work either.  Adding libqemuutil.a to the link like produces this:

libqemuutil.a(osdep.o): In function `qemu_open':
/build/kvm/git/util/osdep.c:171: undefined reference to `monitor_fdset_get_fd'
/build/kvm/git/util/osdep.c:181: undefined reference to 
`monitor_fdset_dup_fd_add'
libqemuutil.a(osdep.o): In function `qemu_close':
/build/kvm/git/util/osdep.c:224: undefined reference to 
`monitor_fdset_dup_fd_find'
/build/kvm/git/util/osdep.c:230: undefined reference to 
`monitor_fdset_dup_fd_remove'
libqemuutil.a(oslib-posix.o): In function `qemu_anon_ram_alloc':
/build/kvm/git/util/oslib-posix.c:141: undefined reference to 
`trace_qemu_anon_ram_alloc'
libqemuutil.a(oslib-posix.o): In function `qemu_anon_ram_free':
/build/kvm/git/util/oslib-posix.c:153: undefined reference to 
`trace_qemu_anon_ram_free'
libqemuutil.a(qemu-error.o): In function `error_vprintf':
/build/kvm/git/util/qemu-error.c:23: undefined reference to `cur_mon'
/build/kvm/git/util/qemu-error.c:24: undefined reference to `cur_mon'
/build/kvm/git/util/qemu-error.c:24: undefined reference to `monitor_vprintf'
libqemuutil.a(qemu-error.o): In function `error_printf_unless_qmp':
/build/kvm/git/util/qemu-error.c:47: undefined reference to `monitor_cur_is_qmp'
libqemuutil.a(qemu-error.o): In function `error_print_loc':
/build/kvm/git/util/qemu-error.c:174: undefined reference to `cur_mon'
collect2: error: ld returned 1 exit status

On the other hand, all those symbols are used (and defined) in libcacard.so
(but not exported).

It looks like we need some more clean separation of the API...

/mjt

Reply via email to