WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] error while static linking of libxenctrl and libxenguest

To: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] error while static linking of libxenctrl and libxenguest
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 20 May 2008 08:30:35 +0100
Delivery-date: Tue, 20 May 2008 00:30:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080519151606.GR5731@implementation>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aci6S2RposNGxCY+Ed2XCgAWy6hiGQ==
Thread-topic: [Xen-devel] error while static linking of libxenctrl and libxenguest
User-agent: Microsoft-Entourage/11.4.0.080122
That would make sense. Please send a patch.

 -- Keir


On 19/5/08 16:16, "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx> wrote:

> Hello,
> 
> When statically linking the following program:
> 
> #include <stdio.h>
> #include <xenctrl.h>
> #include <xenguest.h>
> 
> int main(void) {
> printf("%p\n", xc_domain_resume);
> printf("%p\n", xc_domain_save);
> return 0;
> }
> 
> gcc -static test.c -o test -lxenguest -lxenctrl -lpthread -lz
> 
> we get
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libxenctrl.a(xc_private.o)
> : In function `lock_pages':
> /home/sthibault/xen-unstable-stubdom.hg/tools/libxc/xc_private.c:130: multiple
> definition of `lock_pages'
> /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libxenguest.a(xg_private.o
> ):/home/sthibault/xen-unstable-stubdom.hg/tools/libxc/xg_private.c:15: first
> defined here
> /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libxenctrl.a(xc_private.o)
> : In function `unlock_pages':
> /home/sthibault/xen-unstable-stubdom.hg/tools/libxc/xc_private.c:142: multiple
> definition of `unlock_pages'
> /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libxenguest.a(xg_private.o
> ):/home/sthibault/xen-unstable-stubdom.hg/tools/libxc/xg_private.c:24: first
> defined here
> 
> Since libxenguest depends on libxenctrl anyway, shouldn't it use
> xc_private's lock/unlock functions?
> 
> Samuel
> 
> _______________________________________________
> 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

<Prev in Thread] Current Thread [Next in Thread>