Hi there,


I've been trying to get Python.Net working for the last couple weeks on linux (using rev 110), and so far i haven't had much luck. Maybe i am using libraries that are not yet supported, so any help would be appreciated.

I am using centOS 5.5, and python 2.5.1 64bit. I am using the latest (2.8.1) version of mono.

To get python.net to build, i had to modify a couple of files, as by default it wouldn't build. First I had to build and install  glib (2.26.1), then do the following:

Add these lines to the setup.py (most likely my glib installation wasn't doing its setup properly)
kw["include_dirs"].append('/usr/local/include/glib-2.0')
kw["include_dirs"].append('/usr/local/lib/glib-2.0/include')
Then edit the pynetclr.h file and add this line:
#include <gmodule.h>

Then edit the makefile for monoclr:
add include files to PY_CFLAGS variable: -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
MONO_LIBS = $(shell pkg-config --libs mono-2)
MONO_CFLAGS = $(shell pkg-config --cflags mono-2)
add clrpython.o to clr.so make: -dynamiclib pynetinit.o clrmod.o clrpython.o -o clr.so
remove -lpython from the PY_LIBS listing
After this everything built without errors. However... the clr.so files don't quite work :)

I get 3 behaviours:
  • if i use the clr.so in the root folder: import clr; import System; => segmentation fault
  • if i use the clr.so in the monoclr folder: ImportError: /usr/local/lib/python2.5/site-packages/clr.so: cannot dynamically load executable
  • if i use the clr.so in the root folder, and also copy the libpython2.5.so in the site-packages folder: import clr => segmentation fault
Not sure what i'm doing wrong to be honest. I'll try to roll back mono a couple versions, and try that (2.4.3 maybe).

I have a feeling i am missing something very obvious here...

Any pointers would be appreciated!


cheers,
laszlo sebo
_________________________________________________
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet

Reply via email to