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

Re: [Xen-devel] Xen Store API in userspace


  • To: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

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