All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: "Roger Pau Monné" <roger.pau@entel.upc.edu>
Cc: William Pitcock <nenolod@dereferenced.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 3 of 5] blktap2: fix vhd compilation under uclibc
Date: Wed, 21 Dec 2011 10:01:17 +0000	[thread overview]
Message-ID: <1324461678.23729.84.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <CAPLaKK4TSzGoD2CGW1ubnqLcSfDCu5CFe6OAVFud446JyOcXtw@mail.gmail.com>

On Tue, 2011-12-20 at 17:55 +0000, Roger Pau Monné wrote:
> Hello,
> 
> I've added -liconv to blktap2/vhd/lib, and succesfully compiled and
> linked the library. The output from ldd libvhd.so shows:
> 
> checking sub-depends for '/lib/libuuid.so.1'
> checking sub-depends for '/usr/lib/libiconv.so.2'
> checking sub-depends for '/lib/libc.so.0.9.32'
> checking sub-depends for '/lib/ld64-uClibc.so.0.9.32'
> 	libuuid.so.1 => /lib/libuuid.so.1 (0x00000000)
> 	libiconv.so.2 => /usr/lib/libiconv.so.2 (0x00000000)
> 	libc.so.0.9.32 => /lib/libc.so.0.9.32 (0x00000000)
> 	ld64-uClibc.so.0.9.32 => /lib/ld64-uClibc.so.0.9.32 (0x00000000)
> 	not a dynamic executable
> 
> Then I've compiled and linked vhd tools (vhd-util and vhd-update)
> without -liconv, since vhd tools doesn't use any iconv functions. They
> compile fine, but when I try to execute them I get the following
> error:
> 
> vhd-util: symbol 'libiconv_open': can't resolve symbol
> 
> If I do a ldd of vhd-util:
> 
> 	libvhd.so.1.0 => /usr/lib/libvhd.so.1.0 (0x7699efaf4000)
> 	libc.so.0.9.32 => /lib/libc.so.0.9.32 (0x7699ef88c000)
> 	libuuid.so.1 => /lib/libuuid.so.1 (0x7699ef689000)
> 	ld64-uClibc.so.0.9.32 => /lib/ld64-uClibc.so.0.9.32 (0x7699efd10000)
> 
> How come libiconv is not linked to the application if libvhd is?

Can you post the complete link line for each stage?

Are you sure that /usr/lib/libvhd.so.1.0 is the same one you just built
and linked against? Is there a chance you have linked against something
in the build directory which did not get properly installed?

Running
	objdump -p <object> | egrep NEEDED\|SONAME
for the library (both build dir and installed copies) and binary would
be interesting.

It seems like either this is a bug in uClibc's dynamic linker or my
expectation of how these sorts of transitive library dependencies work
has been set too high by glibc...

>  And
> what's most strange, why is the link to libuuid keep, but not the one
> to libiconv?

Yes, that is strange.

Ian.


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

  reply	other threads:[~2011-12-21 10:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18 12:48 [PATCH 0 of 5] build: various fixes for building with uclibc Roger Pau Monne
2011-12-18 12:48 ` [PATCH 1 of 5] blktap: remove HAVE_BYTESWAP_H checking, since it's defined by qemu Roger Pau Monne
2011-12-19  9:48   ` Ian Campbell
2011-12-19  9:57     ` William Pitcock
2011-12-19  9:58     ` Roger Pau Monné
2011-12-19 10:08       ` Ian Campbell
2011-12-19 11:26         ` Roger Pau Monné
2011-12-19 11:27           ` Ian Campbell
2011-12-19 11:28             ` Roger Pau Monné
2011-12-19 11:38               ` Ian Campbell
2011-12-19 11:46                 ` Roger Pau Monné
2011-12-19 11:49                   ` Ian Campbell
2011-12-19 12:04                     ` Roger Pau Monné
2011-12-21  9:40                       ` Roger Pau Monné
2011-12-18 12:48 ` [PATCH 2 of 5] build: detect uclibc Roger Pau Monne
2011-12-19 10:08   ` William Pitcock
2011-12-20 18:02   ` Ian Jackson
2011-12-20 18:24     ` Roger Pau Monné
2011-12-20 18:25       ` Ian Jackson
2011-12-18 12:48 ` [PATCH 3 of 5] blktap2: fix vhd compilation under uclibc Roger Pau Monne
2011-12-19 10:05   ` Ian Campbell
2011-12-19 10:07   ` William Pitcock
2011-12-19 12:30     ` Roger Pau Monné
2011-12-19 13:26       ` Ian Campbell
2011-12-19 13:30         ` Roger Pau Monné
2011-12-19 13:43           ` Ian Campbell
2011-12-19 14:43             ` Roger Pau Monné
2011-12-20 17:55               ` Roger Pau Monné
2011-12-21 10:01                 ` Ian Campbell [this message]
2011-12-21 10:15                   ` Roger Pau Monné
2011-12-21 10:28                     ` Ian Campbell
2011-12-18 12:48 ` [PATCH 4 of 5] blktap2: remove HAVE_BYTESWAP_H checking, since it's defined by qemu Roger Pau Monne
2011-12-18 12:48 ` [PATCH 5 of 5] libxl: fix link issue on uclibc when using yajl Roger Pau Monne
2011-12-19  9:54   ` Ian Campbell
2011-12-19 10:01     ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1324461678.23729.84.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=nenolod@dereferenced.org \
    --cc=roger.pau@entel.upc.edu \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.