On 27/05/15 07:10, Andrew Stuart wrote:
You could give instructions on how to repeat your experiment. Then we apply
science ;)
Ah science, I’m told that works. OK Ive spent a great deal of time trying to
figure out a solution, learned alot but still haven’t put enough pieces
together to make it work or even understand where the problem lies. I shall
ask for help.
The context is I do most of my programming in Python. I am trying to learn more
about C and at least be very good at building C programs if not writing them.
My immediate goal is to take Python ‘hello world’ program and build it as a
rump kernel.
I‘m using python 3.4 and using cython http://cython.org/ which is a python
compiler, or more specifically, translates Python to C. You can install it by
'pip install cython'
hw.py is hello world in python (attached to this email).
It is converted to c via this command:
cython --embed hw.py
The embed flag creates a standlone program. The result should be hw.c which is
attached to this email
To compile it is necessary to first install the python dev headers via
sudo apt-get install python3.4-dev
hw.c should now be possible to compile, using the following line
gcc $CFLAGS -I/usr/include/python3.4m -o hw hw.c -lpython3.4m -lpthread -lm
-lutil -ldl
there is now a ‘hw' application which works, and prints ‘hello world'
I now want to build hw.c into a rump kernel. So I re-do last command but
replace gcc with rump run-xen-cc
rumprun-xen-cc $CFLAGS -I/usr/include/python3.4m -o hw hw.c -lpython3.4m
-lpthread -lm -lutil -ldl
In file included from hw.c:8:0:
/usr/include/python3.4m/pyconfig.h:78:3: error: #error unknown multiarch
location for pyconfig.h
# error unknown multiarch location for pyconfig.h
^