Il 23/05/2014 11:59, Michael Tokarev ha scritto:
23.05.2014 07:02, Fam Zheng wrote:
We get:
$ qemu-img
Failed to open module: /home/fam/build/master/block-iscsi.so: undefined
symbol: bitmap_set
qemu-img: Not enough arguments
Try 'qemu-img --help' for more information
Because since commit b03c38 (block/iscsi: speed up read for unallocated
sectors), block/iscsi.c calls utils/bitmap.c:bitmap_* functions, which is not
linked to qemu-img nor shared objects.
Heh. This is a very fun situation.
For the first time I've had it with postfix in about 2002,
when I tried to make postfix modular, and it didn't work,
because modules sometimes used symbols which are not present
in all executables who used the modules.
The solution is not link modules with missing symbols. The
solution is to make libpostfix.so with all ths support functions,
and link all programs to it instead of using all support funcs
statically.
Another solution is to turn libqemuutil.a into a libtool convenience
library, which is a portable way to wrap it with
--whole-archive/--no-whole-archive. This will make libtool mandatory
for compilation of QEMU.
Paolo