Re: [Libguestfs] [PATCH 01/11] java: link libguestfs_jni against libutils

Richard W.M. Jones
Fri, 03 Mar 2017 15:05:34 -0000

On Fri, Mar 03, 2017 at 03:32:55PM +0100, Pino Toscano
wrote:
> The JNI library uses CLEANUP_FREE macros, whose functions are built in
> the internal libutils.  Currently, trying to use functions that use
> CLEANUP_FREE variables will cause the java execution to stop with a
> symbol lookup error (for guestfs_int_cleanup_free).

[comment only]
I wonder why our tests didn't pick this up?

Rich.

>  java/Makefile.am | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/java/Makefile.am b/java/Makefile.am
> index 06d0fc7..ea64f55 100644
> --- a/java/Makefile.am
> +++ b/java/Makefile.am
> @@ -115,7 +115,9 @@ libguestfs_jni_la_CFLAGS = \
>  	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
>  	$(JNI_CFLAGS)
>
> -libguestfs_jni_la_LIBADD = $(top_builddir)/lib/libguestfs.la
> +libguestfs_jni_la_LIBADD = \
> +	$(top_builddir)/common/utils/libutils.la \
> +	$(top_builddir)/lib/libguestfs.la
>
>  libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared
>
> --
> 2.9.3
>
> _______________________________________________
> Libguestfs mailing list
> Libguestfs@redhat.com
> https://www.redhat.com/mailman/listinfo/libguestfs

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.