Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing #include<xddconn/if.h> in xdd.c #2

Open
belsholff opened this issue Feb 3, 2018 · 6 comments
Open

Missing #include<xddconn/if.h> in xdd.c #2

belsholff opened this issue Feb 3, 2018 · 6 comments

Comments

@belsholff
Copy link

belsholff commented Feb 3, 2018

Hey!

During compile process of chaos, I have a problem with this lib. I guess it should be at ' inc/ ' folder, but I could forget something in process install. I'm following tips inserted in README.

I'm using debian 9, xen project 4.8.2 already builded, and libjansson is here.

Output error is here:

CC         bin/chaos.o
CC         lib/chaos/cmdline.o
CC         lib/h2/xen/xc.o
CC         lib/h2/xen/dev.o
CC         lib/h2/xen/sysctl.o
CC         lib/h2/xen/vif.o
CC         lib/h2/xen/vbd.o
CC         lib/h2/xen/xdd.o
lib/h2/xen/xdd.c:2:24: fatal error: xddconn/if.h: Arquivo ou diretório não encontrado
#include <xddconn/if.h>
                       ^
compilation terminated.
lib/h2.mk:23: recipe for target 'lib/h2/xen/xdd.o' failed
make: *** [lib/h2/xen/xdd.o] Error 1

My .config is:

# Basic configuration
## Enable NoXenstore support
CONFIG_H2_XEN_NOXS  := n

## Set install prefix
PREFIX              := /usr/local/


# libh2
## Set libh2 version
LIBH2_V_MAJOR   := 0
LIBH2_V_MINOR   := 1
LIBH2_V_BUGFIX  := 0


# XEN sources
## Point to root of (built) xen sources
XEN_ROOT        := /home/eric/sys/xen-4.8.2/
## Set install prefix configured for xen build
XEN_PREFIX      := /usr/local/


# Linux sources
## Point to the location of UAPI headers, if not using system installed ones
LINUX_HEADERS   :=

# Xendevd sources
XDD_ROOT        :=          

Thanks!

@lukablurr
Copy link

Hi there! You also need the XendevD daemon in order to use Chaos. You can find the code here. After you clone the repo go back to the Chaos config and set XDD_ROOT to your local clone.

@belsholff
Copy link
Author

belsholff commented Feb 4, 2018

The problem persists.
To tell you the truth, I've already tried it before, but I supposed it could be wrong.

Using find command, I found many if.h libs, but no one inside a xddconn folder, and they are different, so I won't make this as a Frankenstein.

Could Chaos works with Xen Project + ClickOS, or just with LightVM? I'm on the first case, and in ClickOS official tutorial at SysML have a broken link to cosmos, that I suppose not work with the newest ClickOS version. I've already compiled Cosmos from CnpLab, but results on similar problems with libs. I had to copy xenstore.h and xs_wire.h to /usr/local/include to make these discoverable by compilation process, and then, another problem raised. =/

Now I'm thinking about Debian 9 and your dist packets that couldn't turn available these libs (Chaos and Cosmos), or software are not available to Debian 9. Is it a possibility?

Thanks!

@lukablurr
Copy link

Right. Sorry, I forgot to mention that you should use the noxs branch in xendevd repo. So, you are trying to build clickos on top of that? It should work, we did it. Please get back here with any problems you encounter in case I forgot to mention other configuration steps.

@belsholff
Copy link
Author

belsholff commented Feb 5, 2018

Great! This problem was solved! But now I have another one, and I don't know what to do... =/
Look:

root@clickos:/path/to/chaos# make
 CC         bin/chaos.o
 CC         lib/chaos/cmdline.o
 CC         lib/h2/xen/xc.o
 CC         lib/h2/xen/dev.o
 CC         lib/h2/xen/sysctl.o
 CC         lib/h2/xen/vif.o
 CC         lib/h2/xen/vbd.o
 CC         lib/h2/xen/xdd.o
 CC         lib/h2/xen/xs.o
 CC         lib/h2/xen/console.o
 CC         lib/h2/h2.o
 CC         lib/h2/xen.o
 CC         lib/h2/guest_ctrl.o
 CC         lib/h2/stream.o
 CC         lib/h2/os_stream_file.o
 CC         lib/h2/os_stream_net.o
 CC         lib/h2/config.o
 CC         lib/h2/config_vbd.o
 LD         lib/libh2.so
/usr/bin/ld: cannot find -lxddconn-client
collect2: error: ld returned 1 exit status
lib/h2.mk:23: recipe for target 'lib/libh2.so' failed
make: *** [lib/libh2.so] Error 1

By the way, I got a similar problem with cnplab cosmos, and without options I gave up. Look:

root@clickos:/path/to/cosmos# make
make: *** xen: Arquivo ou diretório não encontrado.  Pare.
  CC  /path/to/cosmos/src/main.c
  CC /path/to/cosmos/src/clickos.c
  CC  /path/to/cosmos/src/domain_none.c
  LD  /path/to/cosmos/dist/bin/cosmos
/usr/bin/ld: cannot find -lxenctrl
/usr/bin/ld: cannot find -lxenguest
/usr/bin/ld: cannot find -lxenstore
collect2: error: ld returned 1 exit status
Makefile:286: recipe for target '/path/to/cosmos/dist/bin/cosmos' failed
make: *** [/path/to/cosmos/dist/bin/cosmos] Error 1

I follow these tips, but didn't works. I couldn't find shared libs.

EDIT: Now I found a solution for Cosmos here. Basically I searched for one those libs reported by make and found the name's package, installing Debian relate one: apt install libxen-dev. But I repeated this process to find shared lib needed by Chaos and I didn't find.

@lukablurr
Copy link

The xddconn-client library comes from xendevd. So you should also build xendevd and then try to build chaos again. Please keep in mind that at runtime the xendevd must be running before running chaos.

For cosmos you have the same problem. Those libraries come from xen. So you should build those (make dist-tools) in xen and then build cosmos. Again, you should check in the cosmos config/Makefile if it points to the right xen root directory.

@belsholff
Copy link
Author

Thanks for all your help! Chaos are compiled!

Please keep in mind that at runtime the xendevd must be running before running chaos.

I saw some daemons in xendevd folder. This is how I start it before chaos? xendevd has no make install, so, I need some instructions to put files into correct folders and make it works well.

Can you give me examples about use chaos command? Because i've tried as cosmos used to do (and do not used to do) and a found this error for any executions:

./chaos: error while loading shared libraries: libxddconn-client.so: cannot open shared object file: No such file or directory

libxddconn-client.so can be find in /path/to/xendev/lib/ folder. I already copied it to /usr/local/include/ and didn't work either.

As a tip, I think these informations that you give me could be inserted in readme next update, as a manner to simplify processes to noobs as I am. One of my intentions are produce a detailed tutorial/recipe to install and operate Xen + ClickOS + MiniOS + Chaos/Cosmos/Clickos Control, but I don't know when it going to happen. First I need to put it to work well. I already did, but with a 2015 third party tutorial, using old code, and some bugs that brakes all sometimes and had no performance garanties.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants