Hello Andreas and all the people in the mailing list.
I'm installing hedge-0.91 (should I use this or it's better to check out
the latest release from git?) on my laptop and I'm having some troubles.
I work on:
Ubuntu 12.04.1 LTS
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Python 2.7.3 (Installed on a virtualenv --distribute in
$HOME/PythonEnv/PyEnv1, with numpy, scipy and matplotlib)
I followed the instructions at
http://documen.tician.de/hedge-manual/installing.html
and in order to be consistent with the instruction I installed the boost
libraries 1.37 in my local directory tree
$HOME/lib
$HOME/include
I also installed the boost-numerical-bindings in the local tree:
$ ls -l $HOME/include
drwxr-sr-x 3 dabi danielebigoni 72 Jan 14 19:24 boost-1_37
drwxr-sr-x 3 dabi danielebigoni 72 Jan 14 19:46 boost-numeric-bindings
In order to keep the installation basic, I'm going to use the blas
libraries (in /usr/lib) and nothing else (no atlas, no mpi, no cuda).
Now I encounter two problems during the installation (the first I solved
and I post what I did).
==========================================================================================
PROBLEM 1
Boost libraries and bindings are installed on the local $HOME tree
directory.
Configure sets the variables correctly, but it fails on make.
$ ./configure
$ cat siteconf.py
BOOST_INC_DIR = ['/home/dabi/include/boost-1_37']
BOOST_LIB_DIR = ['/home/dabi/lib']
BOOST_PYTHON_LIBNAME = ['boost_python-gcc46-mt']
BOOST_BINDINGS_INC_DIR = ['/home/dabi/include/boost-numeric-bindings']
HAVE_BLAS = True
BLAS_LIB_DIR = ['/usr/lib']
BLAS_LIBNAME = ['blas']
HAVE_MPI = False
MPICC = 'mpicc'
BOOST_MPI_LIBNAME = ['boost_mpi-gcc42-mt']
CXXFLAGS = []
LDFLAGS = []
$ make
ctags -R src || true
ctags: skipping src: it is not a regular file.
/home/dabi/PythonEnv/PyEnv1/bin/python setup.py build
--------------------------------------------------------------------------
Sorry, your build failed. Try rerunning configure with different
options.
--------------------------------------------------------------------------
Traceback (most recent call last):
File "setup.py", line 194, in <module>
main()
File "setup.py", line 187, in main
data_files=[("include/hedge", glob.glob("src/cpp/*.hpp"))],
File "/home/dabi/Downloads/software/hedge-0.91/aksetup_helper.py",
line 12, in setup
setup(*args, **kwargs)
File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py", line 221, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py", line 245, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 576, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 821, in best_match
return self.obtain(req, installer) # try and download/install
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 833, in obtain
return installer(requirement)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py", line 294, in fetch_build_egg
return cmd.easy_install(req)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/easy_install.py", line 589, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/easy_install.py", line 619, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/easy_install.py", line 809, in install_eggs
return self.build_and_install(setup_script, setup_base)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/easy_install.py", line 1086, in build_and_install
self.run_setup(setup_script, setup_base, args)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/easy_install.py", line 1075, in run_setup
run_setup(setup_script, args)
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/sandbox.py", line 30, in run_setup
lambda: execfile(
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/sandbox.py", line 72, in run
return func()
File
"/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/sandbox.py", line 32, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 158, in <module>
"hedge.cuda"
File "setup.py", line 33, in main
IncludeDir("BOOST_BINDINGS", []),
File "setup.py", line 8, in get_config_schema
# it under the terms of the GNU General Public License as published
by
ImportError: cannot import name BoostLibraries
make: *** [all] Error 1
SOLUTION 1: Manually install Pyublas:
$ pip install pyublas
==========================================================================================
PROBLEM 2
It fails again on make.
$ make
ctags -R src || true
ctags: skipping src: it is not a regular file.
/home/dabi/PythonEnv/PyEnv1/bin/python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/hedge
copying src/python/data.py -> build/lib.linux-i686-2.7/hedge
copying src/python/timestep.py -> build/lib.linux-i686-2.7/hedge
copying src/python/polynomial.py -> build/lib.linux-i686-2.7/hedge
copying src/python/optemplate.py -> build/lib.linux-i686-2.7/hedge
copying src/python/visualization.py -> build/lib.linux-i686-2.7/hedge
copying src/python/mesh.py -> build/lib.linux-i686-2.7/hedge
copying src/python/interpolation.py -> build/lib.linux-i686-2.7/hedge
copying src/python/quadrature.py -> build/lib.linux-i686-2.7/hedge
copying src/python/flux.py -> build/lib.linux-i686-2.7/hedge
copying src/python/parallel.py -> build/lib.linux-i686-2.7/hedge
copying src/python/log.py -> build/lib.linux-i686-2.7/hedge
copying src/python/pde.py -> build/lib.linux-i686-2.7/hedge
copying src/python/discr_precompiled.py ->
build/lib.linux-i686-2.7/hedge
copying src/python/vtk.py -> build/lib.linux-i686-2.7/hedge
copying src/python/tools.py -> build/lib.linux-i686-2.7/hedge
copying src/python/element.py -> build/lib.linux-i686-2.7/hedge
copying src/python/__init__.py -> build/lib.linux-i686-2.7/hedge
copying src/python/discretization.py -> build/lib.linux-i686-2.7/hedge
copying src/python/operators.py -> build/lib.linux-i686-2.7/hedge
creating build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/optemplate.py ->
build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/execute.py ->
build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/tools.py -> build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/__init__.py ->
build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/plan.py -> build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/cgen.py -> build/lib.linux-i686-2.7/hedge/cuda
copying src/python/cuda/discretization.py ->
build/lib.linux-i686-2.7/hedge/cuda
running build_ext
building '_internal' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/src
creating build/temp.linux-i686-2.7/src/wrapper
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3 -DNDEBUG -fPIC
-DUSE_BLAS=1 -DPYUBLAS_HAVE_BOOST_BINDINGS=1 -Isrc/cpp
-I/home/dabi/include/boost-numeric-bindings
-I/home/dabi/include/boost-1_37
-I/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/numpy/core/include -I/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/pyublas/../include -I/usr/include/python2.7 -c src/wrapper/wrap_main.cpp -o build/temp.linux-i686-2.7/src/wrapper/wrap_main.o
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3 -DNDEBUG -fPIC
-DUSE_BLAS=1 -DPYUBLAS_HAVE_BOOST_BINDINGS=1 -Isrc/cpp
-I/home/dabi/include/boost-numeric-bindings
-I/home/dabi/include/boost-1_37
-I/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/numpy/core/include -I/home/dabi/PythonEnv/PyEnv1/local/lib/python2.7/site-packages/pyublas/../include -I/usr/include/python2.7 -c src/wrapper/wrap_base.cpp -o build/temp.linux-i686-2.7/src/wrapper/wrap_base.o
src/wrapper/wrap_base.cpp: In function ‘PyObject*
{anonymous}::bufferize_list_of_vectors(boost::python::api::object&,
unsigned int)’:
src/wrapper/wrap_base.cpp:125:5: error: ‘make_pair’ was not declared in
this scope
src/wrapper/wrap_base.cpp:125:5: note: suggested alternative:
/usr/include/c++/4.6/bits/stl_pair.h:272:5: note: ‘std::make_pair’
src/wrapper/wrap_base.cpp: In function ‘PyObject*
{anonymous}::bufferize_list_of_components(boost::python::api::object&,
unsigned int)’:
src/wrapper/wrap_base.cpp:154:5: error: ‘make_pair’ was not declared in
this scope
src/wrapper/wrap_base.cpp:154:5: note: suggested alternative:
/usr/include/c++/4.6/bits/stl_pair.h:272:5: note: ‘std::make_pair’
error: command 'gcc' failed with exit status 1
make: *** [all] Error 1
SOLUTION 2: ??
I first tried to fix the wrap_base.cpp file with the suggestion by the
compiler, adding std::. But, is it right?
If the fixing of PROBLEM 2 is right then I've another following up
problem. :) But, I'll wait for suggestions.
Thanks in advance,
Daniele
--
Daniele Bigoni
PhD student
DTU Informatics
---------------------------------------------------
Technical University of Denmark
Department of Informatics and Mathematical Modeling
Richard Petersens Plads
Building 321
2800 Lyngby
Direct +45 45253086
dabi(a)imm.dtu.dk
http://www.imm.dtu.dk