All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen 4.4 & 4.5 - Various problems (mostly undefined references to libxenctrl functions)
@ 2015-09-11 13:54 Sébastien Frémal
  0 siblings, 0 replies; only message in thread
From: Sébastien Frémal @ 2015-09-11 13:54 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 4091 bytes --]

Hello,

I'm working with Xen to develop new communication modules to improve data
transfer between xen domains. As I had a really old version of Xen
(installed in 2012 !!) and some functionnalities didn't work (sharing
already allocated pages with grant references), I reinstalled my entire
system (new linux, new xen). Therefore, I installed Ubuntu LTS 14.04 and
the xen hypervisor coming with its packages (xen 4.4). I had no problem to
create a virtual machine, but when I tried to compile the test program
which uses my modules, the battle began. Here is my compilation line :

gcc gntring3_read_async.c
/home/fremals/GVirtus9/modules/gntring/libgntring4.o -lxenctrl -o
ring3_read_async -lm -I /home/fremals/GVirtus9/modules/

libgntring4.o contains the code using libxenctrl : xc_interface_open,
xc_map_foreign_pages and xc_interface_close. With Xen 4.4, I had no problem
to compile libgntring.o, but when I tried to compile ring3_read_async, I
got the message error :
libgntring4.c:(.text+0x328): undefined reference to «
xc_interface_open(xentoollog_logger*, xentoollog_logger*, unsigned int) »
libgntring4.c:(.text+0x328): undefined reference to «
xc_map_foreign_pages(arg list) »
libgntring4.c:(.text+0x365): undefined reference to «
xc_interface_close(xc_interface_core*) »

I checked libxenctrl.so with nm and it was empty. However, libxenctrl.a had
all needed symbols. I tried again with the following command line :
gcc gntring3_read_async.c
/home/fremals/GVirtus9/modules/gntring/libgntring4.o
/usr/local/lib/libxenctrl.a -o ring3_read_async -lm -I
/home/fremals/GVirtus9/modules/
and the compilation fails with only two errors :
libgntring4.c:(.text+0x328): undefined reference to «
xc_interface_open(xentoollog_logger*, xentoollog_logger*, unsigned int) »
libgntring4.c:(.text+0x365): undefined reference to «
xc_interface_close(xc_interface_core*) »
It found the xc_map_foreign_pages ! But not the other two functions. I
thought that there could be a problem with libxenctrl, I therefore
downloaded the xen source code and tried to compile the code of this tool
but I had errors with xen headers (I didn't kept the errors).

At this point, I wanted to do things right and reinstall Xen from source
code, not with an ubuntu package. I removed Xen 4.4 and took Xen 4.5.1. As
I rapidly got an error with this code (I don't remind which one), I used
Xen 4.5 instead. Once I succesfully installed xen, I tried to run my
compilation again. This time with -lxenctrl. I had the same problem than
before :
libgntring4.c:(.text+0x328): undefined reference to «
xc_interface_open(xentoollog_logger*, xentoollog_logger*, unsigned int) »
libgntring4.c:(.text+0x365): undefined reference to «
xc_interface_close(xc_interface_core*) »

To check that previous steps were all right, I tried to recompile
libgntring4.o and it lead to new errors :
g++ -c -O3 -fPIC ../modules/gntring/libgntring4.c -o
../modules/gntring/libgntring4.o
In file included from /usr/local/include/xenctrl.h:50:0,
                 from ../modules/gntring/libgntring4.c:12:
/usr/local/include/xen/platform.h:156:31: error: field ‘set_time’ has
incomplete type
         struct xenpf_efi_time set_time;
                               ^
/usr/local/include/xen/platform.h:160:31: error: field ‘get_wakeup_time’
has incomplete type
         struct xenpf_efi_time get_wakeup_time;
                               ^
/usr/local/include/xen/platform.h:164:31: error: field ‘set_wakeup_time’
has incomplete type
         struct xenpf_efi_time set_wakeup_time;
                               ^
/usr/local/include/xen/platform.h:184:35: error: field ‘vendor_guid’ has
incomplete type
             struct xenpf_efi_guid vendor_guid;
                                   ^
make: *** [libgntring4.o] Erreur 1

I talked to some members of my team about the "unefined reference"
problems, but no one knows what's the problem. Can I ask if someone have an
idea of what's wrong here please ?

Best regards,

Sebastien Fremal

[-- Attachment #1.2: Type: text/html, Size: 5210 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-11 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11 13:54 Xen 4.4 & 4.5 - Various problems (mostly undefined references to libxenctrl functions) Sébastien Frémal

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.