RedHat Installation Assistance

Dear All,

I have requested out IT manager to install graph-tool on our local cluster
(based on RedHat).
He changed the "configure" link to point to the corresponding directories,
and the "configure" operation seemed to completed successfully.
However, the make operation failed with the corresponding message:

In file included from ./../graph_python_interface.hh:48:0,
                 from graph_motifs.cc:26:
./../numpy_bind.hh: In function ‘boost::python::api::object
wrap_vector_owned(const std::vector<_RealType>&)’:
./../numpy_bind.hh:83:34: error: ‘NPY_ARRAY_ALIGNED’ was not declared in
this scope
     PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                  ^
./../numpy_bind.hh:83:54: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared
in this scope
     PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                                      ^
./../numpy_bind.hh:84:25: error: ‘NPY_ARRAY_OWNDATA’ was not declared in
this scope
                         NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                         ^
./../numpy_bind.hh:84:45: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in
this scope
                         NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                             ^
./../numpy_bind.hh:84:64: error: there are no arguments to
‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration
of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                         NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                                                ^
./../numpy_bind.hh:84:64: note: (if you use ‘-fpermissive’, G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
./../numpy_bind.hh: In function ‘boost::python::api::object
wrap_vector_not_owned(std::vector<_RealType>&)’:
./../numpy_bind.hh:101:33: error: ‘NPY_ARRAY_ALIGNED’ was not declared in
this scope
     PyArray_ENABLEFLAGS(ndarray,NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                 ^
./../numpy_bind.hh:101:53: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared
in this scope
     PyArray_ENABLEFLAGS(ndarray,NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                                     ^
./../numpy_bind.hh:102:25: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in
this scope
                         NPY_ARRAY_WRITEABLE);
                         ^
./../numpy_bind.hh:102:44: error: there are no arguments to
‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration
of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                         NPY_ARRAY_WRITEABLE);
                                            ^
./../numpy_bind.hh: In function ‘boost::python::api::object
wrap_multi_array_owned(const boost::multi_array<ValueType, Dim>&)’:
./../numpy_bind.hh:122:34: error: ‘NPY_ARRAY_ALIGNED’ was not declared in
this scope
     PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                  ^
./../numpy_bind.hh:122:54: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared
in this scope
     PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                                      ^
./../numpy_bind.hh:123:25: error: ‘NPY_ARRAY_OWNDATA’ was not declared in
this scope
                         NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                         ^
./../numpy_bind.hh:123:45: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in
this scope
                         NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                             ^
./../numpy_bind.hh:123:64: error: there are no arguments to
‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration
of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                         NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                                                ^
./../numpy_bind.hh: In function ‘boost::python::api::object
wrap_multi_array_not_owned(boost::multi_array<ValueType, Dim>&)’:
./../numpy_bind.hh:137:34: error: ‘NPY_ARRAY_ALIGNED’ was not declared in
this scope
     PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                  ^
./../numpy_bind.hh:137:54: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared
in this scope
     PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS

                                                      ^
./../numpy_bind.hh:138:25: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in
this scope
                         NPY_ARRAY_WRITEABLE);
                         ^
./../numpy_bind.hh:138:44: error: there are no arguments to
‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration
of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                         NPY_ARRAY_WRITEABLE);
                                            ^
make[4]: *** [graph_motifs.lo] Error 1
make[4]: Leaving directory `/usr/local/graph-tool-2.19/src/graph/clustering'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/graph-tool-2.19/src/graph'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/graph-tool-2.19/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/graph-tool-2.19'
make: *** [all] Error 2

Any idea how to resolve this?

What numpy version do you have installed?

Please note that when troubleshooting compilation problems, it is always
important to have the _full_ outputs of ./configure and make, as well the
entire contents of the config.log file.

Best,
Tiago

Thanks.
I'm attaching the corresponding information and filed I have received from
out IT manager.

The system info is :

# uname -a
Linux admin 2.6.32-431.5.1.el6.x86_64 #1 SMP Fri Jan 10 14:46:43 EST 2014
x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m

Setup before the configure :

export CAIROMM_CFLAGS=-O
export CAIROMM_LIBS=/usr/lib64/libcairomm-1.0.so
export PYCAIRO_HEADER=/usr/include/pycairo
source /usr/local/gcc5.3/setup.sh

where :
# cat /usr/local/gcc5.3/setup.sh

#!/bin/sh
# Setup for GCC 5.3

export DIR=/usr/local/gcc5.3
export PATH=$DIR/bin:$PATH
export LD_LIBRARY_PATH=$DIR/lib64:$DIR/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=$LD_LIBRARY_PATH

The log files are in the attached zip file.

Thanks ahead! logsofgraphtool2_19installation.zip
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4026894/logsofgraphtool2_19installation.zip&gt;

Thanks, but I still don't know what numpy version you have installed.

Hi,

Here's the IT manager response :
Via the RedHat rpm - numpy-1.4.1-9 is installed.
Also under the local installation of python2.7, numpy-1.8.1-2 is installed.
Regarding folders :

/usr/lib64/python2.6/site-packages/numpy

/usr/local/epd/lib/python2.7/site-packages/numpy

Once again, thanks for your help!

attachment.html (4.83 KB)

This is the problem. graph-tool requires numpy version 1.7 or above.

Numpy 1.4 is already over 6 years old.

Thanks! I'll ask the manager to update the numpy installation. However, he
might be reluctant to do so due to breaking other dependencies. I guess
this is the reason he tried to link with the local numpy-1.8.1-2. It's
there a way to link/compile with the epd copy ( at
usr/local/epd/lib/python2.7/site-packages/numpy) rather than the system
numpy?

attachment.html (4.02 KB)

Yes, you have to specify its directory with the option --with-numpy=DIR
passed to ./configure.

Best,
Tiago

Thank you once again.
I apologize for re-consulting, but our IT manager failed to install again
(arghh).
I'm forwarding his message:

I set the environment to use the newer python and numpy, and corrected the
boost library to work with it.
Configure worked OK but now make failed in searching cairommconfig.h

  CXX graph_cairo_draw.lo
graph_cairo_draw.cc:37:27: fatal error: cairommconfig.h: No such file or
directory
compilation terminated.

cairommconfig.h exists: /usr/include/cairomm-1.0/cairomm/cairommconfig.h
as a part of the installed cairomm-devel.

I didn't find a way to tell the configure from where to take the cairomm
header files.
Please ask the developer.

The log files attached.

Best,
Eli

attachment.html (6.93 KB)

Try the following:

    ./configure CPPFLAGS="-I/usr/include/cairomm-1.0/cairomm/"

Hi,

Alas, still no compilation. Our's IT response:

tried :
./configure CPPFLAGS="-I/usr/include/cairomm-1.0/cairomm/"
make

and now got :

graph_cairo_draw.cc:38:29: fatal error: cairomm/context.h: No such file or
directory
compilation terminated.
make[4]: *** [graph_cairo_draw.lo] Error 1
make[4]: Leaving directory `/usr/local/graph-tool-2.19/src/graph/draw'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/graph-tool-2.19/src/graph'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/graph-tool-2.19/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/graph-tool-2.19'
make: *** [all] Error 2

but the file exists :

# ls -l /usr/include/cairomm-1.0/cairomm/context.h
-rw-r--r-- 1 root root 39093 Dec 20 2008 /usr/include/cairomm-1.0/
cairomm/context.h

Best,
Eli

attachment.html (7.81 KB)

If the file being included is cairomm/context.h the include path should be:

   ./configure CPPFLAGS="-I/usr/include/cairomm-1.0/"

otherwise the preprocessor will search for
/usr/include/cairomm-1.0/cairomm/cairomm/context.h, which does not exist.

But there seems to be something inconsistent with the cairomm install. If
the above reverts back to the previous error, you should try

   ./configure CPPFLAGS="-I/usr/include/cairomm-1.0/
-I/usr/include/cairomm-1.0/cairomm/"

Anyways, this is pretty basic stuff, really. Your IT guy should be able to
figure this out instead of just copy and pasting the error messages.