[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3 of 5] blktap2: fix vhd compilation under uclibc



On Sun, 2011-12-18 at 12:48 +0000, Roger Pau Monne wrote:
> # HG changeset patch
> # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
> # Date 1324171782 -3600
> # Node ID c0d5aa328f1ab24aad5880e720852b6dc8ffd4fb
> # Parent  c54c326d6fdf26d311c872479b769b3a8cd560cf
> blktap2: fix vhd compilation under uclibc
> 
> blktap2 was not compiled succesfully under uclibc, with the following
> error:
> 
> gcc     -o vhd-util vhd-util.o -Llib -lvhd
> lib/libvhd.so: undefined reference to `libiconv_open'
> lib/libvhd.so: undefined reference to `libiconv_close'
> lib/libvhd.so: undefined reference to `libiconv'
> 
> This patchs add the flag -liconv when blktap2/vhd is compiled on
> uclibc.

Since it is libvhd which uses these symbols it should be libvhd and not
the utilities which links against it.

Can we not directly check for the need for libiconv instead of infering
it from the use of uclibc?

Does the standard say one way or the other if this library needs to be
explicitly linked?

If uclibc is using http://www.haible.de/bruno/packages-libiconv.html
then
http://stackoverflow.com/questions/4709178/how-do-i-link-glibcs-implementation-of-iconv
 suggests -DLIBICONV_PLUG which from looking at the source seems like it might 
work -- all seems a little bit backwards though.

Ian.

> 
> Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
> 
> diff -r c54c326d6fdf -r c0d5aa328f1a tools/blktap2/drivers/Makefile
> --- a/tools/blktap2/drivers/Makefile  Sun Dec 18 02:29:42 2011 +0100
> +++ b/tools/blktap2/drivers/Makefile  Sun Dec 18 02:29:42 2011 +0100
> @@ -24,6 +24,10 @@ endif
>  
>  VHDLIBS    := -L$(LIBVHDDIR) -lvhd
>  
> +ifeq ($(CONFIG_UCLIBC),y)
> +VHDLIBS    += -liconv
> +endif
> +
>  REMUS-OBJS  := block-remus.o
>  REMUS-OBJS  += hashtable.o
>  REMUS-OBJS  += hashtable_itr.o
> diff -r c54c326d6fdf -r c0d5aa328f1a tools/blktap2/vhd/Makefile
> --- a/tools/blktap2/vhd/Makefile      Sun Dec 18 02:29:42 2011 +0100
> +++ b/tools/blktap2/vhd/Makefile      Sun Dec 18 02:29:42 2011 +0100
> @@ -23,6 +23,10 @@ endif
>  
>  LIBS              := -Llib -lvhd
>  
> +ifeq ($(CONFIG_UCLIBC),y)
> +LIBS              += -liconv
> +endif
> +
>  all: subdirs-all build
>  
>  build: $(IBIN)
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.