graph-tool installing and cygwin

Hi to all,

I'm trying to configure, build and install graph-tool in a windows
environment using CygWin.
I already successfully installed all the dependencies reported in the
graph-tool website.

The problem arises while running "configure" script: when it tries to find a
python version it comes to me the following error:

checking for python... (cached) /cygdrive/c/Program Files/Python27/python
checking for a version of Python >= '2.1.0'... configure: line 16603:
/cygdrive/
c/Program: No such file or directory
no
configure: error: in `/cygdrive/c/Program Files/graph-tool-2.2.11':
configure: error:
This version of the AC_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.

See `config.log' for more details

I guess the problem is with my python root directory, that is "C:\Program
Files\Python27" and contains a blank space, so when the script receives from
the cygwin environment the path "/cygdrive/c/Program Files/Python27" it
searches for "/cygdrive/c/Program" that doesn't exist.

I don't know if my supposition is correct... in any case, can anybody please
help me to deal with this problem?

Thanks in advance,
DD

Hi DD,

Hi Tiago,

thanks for your quick reply.
I have some problem with the building of the git version... now I am running
under cygwin 1.7.8-1, can you help me to fix it with these settings?
I tried different hints from the web (mount point, soft links...) but with
no success.

Thanks in advance,
DD
<http://cygwin.com/ml/cygwin-announce/2011-03/msg00000.html&gt;
2011/3/22 Tiago Peixoto [via Main discussion list for the graph-tool
project] <ml-node+2715443-161065882-384487(a)n3.nabble.com>

attachment.html (4.24 KB)

I apologize, I didn't understood your suggestion: you were talking about
installing the git version of graph-tool, not the one of cygwin!
Last night I was too tired... this is why I replied you with my actual
version of cygwin instead of the one of graph-tool. :slight_smile:
I'm going to try to reproduce the error with the git version of graph-tool,
and after to report you the behaviour. Thanks!

Cheers,
DD

2011/3/23 Donatella Firmani <donatellafirmani(a)gmail.com>

attachment.html (5.04 KB)

Just tried the git version and same error occurs... :frowning:

DD

2011/3/22 Tiago Peixoto [via Main discussion list for the graph-tool
project] <ml-node+2715443-161065882-384487(a)n3.nabble.com>

attachment.html (3.45 KB)

It is a bit of a hack, but could you try creating a symlink named
/cygdrive/c/root which points to /cygdrive/c/Program Files, and then
adding /cygdrive/c/root/Python27 to the path?

Hi Tiago,

from the cygwin shell I executed:

ln -s "/cygdrive/c/Program Files" /cygdrive/c/root

After this I replaced in the cygwin PATH variable all the occurences of
"/cygdrive/c/Program Files" with "/cygdrive/c/root".
I really cannot understand why the error keeps occurring... this is the same
old output:

checking for python... /cygdrive/c/Program Files/Python27/python
checking for a version of Python >= '2.1.0'... ./configure: line 16310:
/cygdriv
e/c/Program: No such file or directory
no
configure: error: in `/cygdrive/c/Program Files/graph-tool':
configure: error:
This version of the AC_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.

See `config.log' for more details

Thanks for your help,
DD

2011/3/24 Tiago Peixoto [via Main discussion list for the graph-tool
project] <ml-node+2725733-1627874884-384487(a)n3.nabble.com>

attachment.html (4.29 KB)

Are you sure you updated your environment, i.e. restarted the shell, and
that the PATH is actually set? You should also remove the file
config.cache, if it exists.

Finally I found a workaround! :slight_smile: Here it is my solution:

1) create a symlink in Windows to solve the "Program Files" problem with the
space:
    from the win prompt:
  mklink /D "C:\ProgramFiles\" "C:\Program Files"

2) in the cygwin PATH environment variable, replace paths containing
"/cygdrive/c/Program Files" with "/cygdrive/c/ProgramFiles"

3) now there is an interesting error. the following line of the file
"configure" (the one generated by "autogen")

if test "$ac_supports_python_ver != "True";

does't work because my system sets the variable ac_supports_python_ver to

$'True\r' (I don't know why...)

and so a possible workaround is to substitute the line with

if test $ac_supports_python_ver != $'True\r';

4) now I have the following error.

configure: error:
  Could not link test program to Python. Maybe the main Python library has
been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"

attachment.html (6 KB)

Hi dd,

3) now there is an interesting error. the following line of the file
   "configure" (the one generated by "autogen")

if test "$ac_supports_python_ver != "True";

does't work because my system sets the variable ac_supports_python_ver to

$'True\r' (I don't know why...)

What is exactly the error that the configure scripts outputs when this
happens?

and so a possible workaround is to substitute the line with

if test $ac_supports_python_ver != $'True\r';

It is best not do modifiy the configure script like this, since the
behaviour can be unpredictable... You should modify configure.ac
instead, and run autogen.sh.

4) now I have the following error.

configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution. The exact name of this package varies among them.
  ============================================================================

In order to understand why errors like this happen, you should look at
the file config.log, which will say exactly why the test program did not
link with the python library.

There is no file "conftest" in my folder... could it be a problem for
the following instruction?

ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

I have no idea how the variables in the configure script are defined,
and what they mean... The configure script is not meant to be understood
by humans; it is automatically generated from configure.ac. Usually it
is possible to debug things by looking at config.log and modifying
configure.ac and/or the m4 macros.

Cheers,
Tiago

Hi Tiago,

first of all I want to thank you for your kind assistance.

Unfortunately I could not set up the environment and - despite our
tentatives - I think that we would need a lot of time to solve the problem.
I guess it is because I am not an expert, and it is a mess that I cannot use
the tool... anyway, I used another solution to implement my code and now it
is ok. I will keep following graph-tool project and I hope that in the
future I will install and use graph-tool without going crazy. :slight_smile:

Cheers,
DD

2011/3/29 Tiago Peixoto [via Main discussion list for the graph-tool
project] <ml-node+2750303-1653022295-384487(a)n3.nabble.com>

attachment.html (5.95 KB)