Hello sir,

first of all, thx for your help...

Well, I tried to do what you told me to... but It didn't work... I still get those blanks...
I have tested this --enable-swig argument using both versions (olena-1.0 and the latest one from git).. but nothing has changed :(

thx for the advice about /usr/bin/python, my mistake :)

I fixed that and apparently It finished without problems... look at those lines after make install


test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/"                                                            
 /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/'
Byte-compiling python modules...
config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py
Byte-compiling python modules (optimized versions) ...
config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py
test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/"
 /usr/bin/install -c -m 644 ../../../swilena/python/ltihooks.py ../../../swilena/python/swilena.py ../../../swilena/python/data.py ../../../swilena/python/sps.py '/usr/local/lib/python2.6/'
Byte-compiling python modules...
ltihooks.pyswilena.pydata.pysps.py
Byte-compiling python modules (optimized versions) ...


The sps was installed but when I tried to run, I got:


samuel@beaver:/opt/olena-1.0/build/swilena/python$ sps
exec: 27: -i: not found
samuel@beaver:/opt/olena-1.0/build/swilena/python$



And when tried to import swilena inside of python environment, I got:


samuel@beaver:/opt/olena-1.0/build/swilena/python$ python
Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import swilena
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named swilena
>>>



I think that might be related to some blank field... (e.g I filled the SWIG field, but the SWIG_LIB was blank, I'm not sure what should be put over there)
Do you have a well formed Makefile which you could send me?
So, I can compare which blank fields may be messing with me...

My environment is Ubuntu GNU/Linux

merci,

Samuel

2010/3/29 Roland Levillain <roland@lrde.epita.fr>
Samuel Félix <sfelixjr@gmail.com> writes:

> Hi there,

Hello,

> I'm trying to install swilena, however I'm facing many problems...
>
> After ./configure --enable-swilena... everything seems to be ok.. No
> dependencies problem (Configure result attached)
>
> But during Make... I've got many errors like this one:
>
> ----
>
> if  -Wall -c++ -python -I../../../milena  -MD -MF ".deps/config-wrap.Tcc" -o
> config-wrap.cc ../../../swilena/config.i; then \
>           mv -f ".deps/config-wrap.Tcc" ".deps/config-wrap.Pcc";\
>         else \
>           rm -f ".deps/config-wrap.Tcc"; exit 1;\
>         fi
>
> ---
>
> That error I've mentioned before is related to SWIG field. For some
> reason, the SWIG and many other fields were blank.

Swilena depends on SWIG.  If you plan to compile and install the former,
you must tell configure where it can find working `swig' and `python'
programs.  Adding `--with-swig' to the configure command line should do
the trick:

 ./configure --enable-swig --enable-swilena

Could you give it a try?

Yes, this is a flaw in our build system (`--enable-swilena' should
trigger `--with-swig' automatically).  Worse: this is not documented in
README.  Sorry for the inconvenience.  This will be fixed in the next
release.

> After reading the Makefile
> (/opt/olena-1.0/build/swilena/python/Makefile), I've noticed that It
> failed to fill some configuration commands... most of them related to
> python..
> I have to fill those blanks by myself:
>
> SWIG = swig
> pyexecdir = /opt/olena-1.0/build/swilena/python/
> pythondir = /usr/local/lib/python2.6/
> PYTHON = /usr/lib/python2.6/

Note that PYTHON is expected to contain the path to the Python
interpreter (e.g. `/usr/bin/python'), not a directory.

> PYTHONINC = /usr/include/python2.6
>
> After that, I thought the installation was about to finish
> successfully, but I got this error after "make install":
>
>
> test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/
> "
>  /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py
> box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py
> image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/'
> ../../../build-aux/py-compile: 119: /usr/lib/python2.6/: Permission
> denied                                                                  

[...]

> Yes. I'm root :-) I don't know what is the cause of this permission
> denied

This is probably a consequence of the previous problem (hopefully).  I
guess ``/usr/lib/python2.6/: Permission denied'' is due to the PYTHON
Make variable containing a directory name instead of a program name.

> Still, I changed to /opt/olena-1.0/swilena/python and tried to run what swig
> has created...
>
> but...
>
> samuel@beaver:/opt/olena-1.0/swilena/python$ python swilena.py
> Traceback (most recent call last):
>   File "swilena.py", line 24, in <module>
>     import config
>   File "/usr/lib/python2.6/ihooks.py", line 406, in import_module
>     q, tail = self.find_head_package(parent, str(name))
>   File "/usr/lib/python2.6/ihooks.py", line 449, in find_head_package
>     raise ImportError, "No module named " + qname
> ImportError: No module named config
>
> I checked the generated files and there is no config.py available..

`config.py' should be generated by swig from `swilena/config.i.' at
build time.  It was probably not installed, hence the error message.

> I guess there is something missing in the Makefile... not sure...

By the way, Swilena's Python bindings depends on compiled C++ libraries
(generated by SWIG), and the Python interpreter must be helped to find
them.  If you plan to use Swilena in interactive mode, I recommend using
the Swilena Python Shell (the `sps' command installed during `make
install').

If you want to use Swilena in your script, you may have to set up the
environment correctly, depending on your platform.  For instance, on Mac
OS X, the path to the above-mentioned C++ libraries must be added to the
DYLD_LIBRARY_PATH environment variable.  On GNU/Linux, everything should
run fine if the module `swilena' is imported.  Let us know if you run
into problems of this kind.

Best regards,
Roland

--
Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est
EPITA Research and Development Laboratory (LRDE)
14-16, rue Voltaire - FR-94276 Le Kremlin-Bicêtre Cedex - France
Phone: +33 1 53 14 59 45 - Fax: +33 1 53 14 59 22 - www.lrde.epita.fr



--
Samuel Félix
Computer Science M.Sc. Candidate at Federal University of Minas Gerais
Computer Science B.Sc. at Federal University of Pará