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] Xen Store API in userspace

To: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Subject: Re: [Xen-devel] Xen Store API in userspace
From: Artur Baruchi <mail.baruchi@xxxxxxxxx>
Date: Tue, 17 Mar 2009 16:12:12 -0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 17 Mar 2009 12:12:42 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=G6YHE12OUa6X1VIcdCDazoS80J5699AnGbdg+nVgTAc=; b=IgGd+G9Cc2xcUDAQDcKiG2CpxyEBtjispko/vhlNJsImcfvewpWOU+0wS3vsaKE069 Ce0665Bv6gsBqJYoUFoj3qvNXVFb/Y+OHcoiGT9UBlG6nbPovsTengikNLwtus2bZU2Z +/ErEaLTVq92Kpcweg+4gSBJOVnozB+BnQ1pg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=PsVv52fGeDjtMFYpmTmrBBf8Gk3dE8hk855cVibLHXaaShGeE9vG+Tc2ngYt+mudPc WLceKTSs/vdTKHSLDteonPVIPzvqqQQPvD0T6EwTUdy+6B1qlNW316e1XqhjM58zQ91o jV1Sbh1lUmHM1RYYaC7LfGGm75aJzKdZffyXs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <e3977d9c0903171204j6cd582e5g43d477d2045006f3@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <e3977d9c0903161547i2fd2f73eu6b93df11952742b9@xxxxxxxxxxxxxx> <49BEF2D6.6040609@xxxxxxxxxx> <e3977d9c0903171204j6cd582e5g43d477d2045006f3@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
A verbose output:



[root@linuxprv03 daemon]# gcc -Wall -v get_info.c
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1 -quiet -v get_info.c
-quiet -dumpbase get_info.c -mtune=generic -auxbase get_info -Wall
-version -o /tmp/ccVtYUxc.s
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include
 /usr/include
End of search list.
GNU C version 4.1.2 20070925 (Red Hat 4.1.2-33) (x86_64-redhat-linux)
        compiled by GNU C version 4.1.2 20070925 (Red Hat 4.1.2-33).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9f833c3d322ccff4b0d52ae42234eccc
get_info.c: In function âmainâ:
get_info.c:15: warning: implicit declaration of function âstrlenâ
get_info.c:15: warning: incompatible implicit declaration of built-in
function âstrlenâ
get_info.c:15: warning: passing argument 1 of âstrlenâ makes pointer
from integer without a cast
get_info.c:15: warning: passing argument 4 of âxs_writeâ makes pointer
from integer without a cast
 as -V -Qy -o /tmp/ccQEpxTj.o /tmp/ccVtYUxc.s
GNU assembler version 2.17.50.0.18 (x86_64-redhat-linux) using BFD
version version 2.17.50.0.18-1 20070731
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/collect2 --eh-frame-hdr
--build-id -m elf_x86_64 --hash-style=gnu -dynamic-linker
/lib64/ld-linux-x86-64.so.2
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64 /tmp/ccQEpxTj.o -lgcc --as-needed
-lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o
/tmp/ccQEpxTj.o: In function `main':
get_info.c:(.text+0x9): undefined reference to `xs_daemon_open'
get_info.c:(.text+0x5a): undefined reference to `xs_write'
get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
collect2: ld returned 1 exit status


Thanks.

Att.
Artur Baruchi





On Tue, Mar 17, 2009 at 4:04 PM, Artur Baruchi <mail.baruchi@xxxxxxxxx> wrote:
> Hi.
>
> I used the xs.h but when tring to compile it, I got the follow error messages:
>
> get_info.c:(.text+0x9): undefined reference to `xs_daemon_open'
> get_info.c:(.text+0x5a): undefined reference to `xs_write'
> get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
> collect2: ld returned 1 exit status
>
>
> The command to compile is:
> gcc -Wall get_info.c -o get_info.o
>
> Part of the code:
> #include <xs.h>
> ...
> struct xs_handle *xsh;
> xsh = xs_daemon_open();
> ...
> xs_write (xsh, XBT_NULL, "testing", mem, strlen(mem));
> xs_daemon_close(xsh);
>
>
> I dont think its a problem in my code, but it is in my libs or the way
> that Im tring to compile it.
>
>
> Thanks in advance.
>
> Att.
> Artur Baruchi
>
>
>
> On Mon, Mar 16, 2009 at 9:46 PM, Zhigang Wang <zhigang.x.wang@xxxxxxxxxx> 
> wrote:
>> Artur Baruchi wrote:
>>> Hi Guys,
>>>
>>> Is possible to use functions like xenbus_printf in user space? If
>>> yes.. which libraries do I should use ?
>>
>> xen-unstable/tools/xenstore/xs.h
>>
>> use this lib.
>>
>> zhigang
>>
>>>
>>> Thanks in advance.
>>>
>>> Att.
>>> Artur Baruchi
>>>
>>> _______________________________________________
>>> 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>