[Libvir] Libvirt dependencies

I'm trying to write a Java wrapper around some libvirt functions using Java Native Interface (JNI). To try this out, I tried writing JNI code that invokes the getDomainInfo() function in the example program info1.c (given with the distribution). While trying to execute the Java wrapper that invokes this C function, I encounter this error: Inconsistency detected by ld.so: dl-deps.c: 559: _dl_map_object_deps: Assertion`map->l_searchlist.r_list[0] == map' failed! I suspect this is due to some missing library that libvirt depends on. As part of the JNI code compilation, I'm supposed to create a shared library that includes all the dependent libraries. Currently, I'm using this command line to do that: ld -shared -f /usr/local/lib/libvirt.so -lxenstore -lpthread -lz LibvirtWrapper.o -o libjava-libvirt.so Here, I assume that libvirt.so and libxenstore are the only dependencies. Can someone tell me if I'm missing some other library in the above command line?

Inconsistency detected by ld.so: dl-deps.c: 559: _dl_map_object_deps: Assertion`map->l_searchlist.r_list[0] == map' failed!
This seems like a glibc bug. No matter what do you do around it, it should not be enough to make internal assertions fail. I'd report it to the glibc list.
I suspect this is due to some missing library that libvirt depends on. As part of the JNI code compilation, I'm supposed to create a shared library that includes all the dependent libraries. Currently, I'm using this command line to do that:
I suspect it's a glibc bug ;-) -- Glauber de Oliveira Costa Red Hat Inc. "Free as in Freedom"

On Sat, Nov 11, 2006 at 01:43:33AM -0500, Karthik V wrote:
I'm trying to write a Java wrapper around some libvirt functions using Java Native Interface (JNI). To try this out, I tried writing JNI code that invokes the getDomainInfo() function in the example program info1.c (given with the distribution).
While trying to execute the Java wrapper that invokes this C function, I encounter this error:
Inconsistency detected by ld.so: dl-deps.c: 559: _dl_map_object_deps: Assertion`map->l_searchlist.r_list[0] == map' failed!
I suspect this is due to some missing library that libvirt depends on. As part of the JNI code compilation, I'm supposed to create a shared library that includes all the dependent libraries. Currently, I'm using this command line to do that:
ld -shared -f /usr/local/lib/libvirt.so -lxenstore -lpthread -lz LibvirtWrapper.o -o libjava-libvirt.so
Here, I assume that libvirt.so and libxenstore are the only dependencies. Can someone tell me if I'm missing some other library in the above command line?
Okay, as pointed out, there is a bug internal to the libc loader and that should be reported appropriately. I note however that your list seems to miss the libxml2 library dependancy try to add -lxml2 to the linking phase. Providing binding for Java makes sense, I don't know how hard it is nowadays, I didn't do C <-> Java bindings for nearly a decade :-) , maybe it's time I look at this again. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Daniel Veillard
-
Glauber de Oliveira Costa
-
Karthik V