Hi,
I am trying to install alps-2.1.1-r6670-src-with-boost on my Desktop(ubuntu 12.04, 64 bit machine).
The following is the script I run at the terminal. After cmake it seems to me everything fine. After that I issued a command make -j 3. Then I got an error at 100% build. You can see that error at the end of this mail. Could any one help me to solve this problem?
export Boost_ROOT_DIR=/opt/boost_1_49_0
export CXX=/usr/bin/g++
export CXXFLAGS="-W -march=native -O3"
export CC=/usr/bin/gcc
export BUILD_SHARED_LIBS=OFF
export MPI_COMPILER=/usr/bin/mpicc
export MPIEXEC=/usr/lib/openmpi/bin/mpiexec
export CMAKE_BUILD_TYPE=RELEASE
export ALPS_BUILD_TESTS=OFF
export CMAKE_INSTALL_PREFIX=/home/dasari/DMFT_ALPS/alps
export HDF5_LIB=/opt/hdf5/lib/libhdf5.so
export HDF5_INC=/opt/hdf5/include
export MPI_EXTRA_LIBRARY=/usr/lib/openmpi/lib/libmpi.so
cmake ../alps-2.1.1-r6670-src-with-boost/alps -DBoost_ROOT_DIR=$Boost_ROOT_DIR \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
-DALPS_BUILD_APPLICATIONS=ON \
-DALPS_BUILD_EXAMPLES=ON \
-DALPS_INSTALL_HEADERS=OFF \
--DALPS_INCLUDE_TUTORIALS=ON \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DALPS_BUILD_TESTS=$ALPS_BUILD_TESTS \
-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX \
-DALPS_BUILD_NGS="ON" \
-DHDF5_LIBRARIES=$HDF5_LIB \
-DHDF5_INCLUDE_DIR=$HDF5_INC\
-DALPS_BUILD_PYTHON="ON"\
-DMPIEXEC=$MPIEXEC \
-DMPI_COMPILER=$MPI_COMPILER \
-DMPI_EXTRA_LIBRARY=$MPI_EXTRA_LIBRARY
This is the error I got.
Linking CXX executable spinmc_evaluate
[100%] Built target spinmc_evaluate
Scanning dependencies of target worm
[100%] Building CXX object applications/qmc/worms/CMakeFiles/worm.dir/main.C.o
In file included from /opt/boost_1_49_0/boost/python/detail/wrap_python.hpp:50:0,
from /opt/boost_1_49_0/boost/python/detail/prefix.hpp:13,
from /opt/boost_1_49_0/boost/python/args.hpp:8,
from /opt/boost_1_49_0/boost/python.hpp:11,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/alea/mcdata.hpp:76,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/alea.h:34,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/alea/observableset.h:49,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/scheduler/montecarlo.h:40,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/scheduler.h:31,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/applications/qmc/worms/WRun.h:34,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/applications/qmc/worms/main.C:29:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous definition
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:166:0: note: this is the location of the previous definition
Scanning dependencies of target worm_evaluate
[100%] Building CXX object applications/qmc/worms/CMakeFiles/worm_evaluate.dir/evaluate.C.o
In file included from /opt/boost_1_49_0/boost/python/detail/wrap_python.hpp:50:0,
from /opt/boost_1_49_0/boost/python/detail/prefix.hpp:13,
from /opt/boost_1_49_0/boost/python/args.hpp:8,
from /opt/boost_1_49_0/boost/python.hpp:11,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/alea/mcdata.hpp:76,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/alea.h:34,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/alea/observableset.h:49,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/scheduler/montecarlo.h:40,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/src/alps/scheduler.h:31,
from /home/dasari/DMFT_ALPS/alps-2.1.1-r6670-src-with-boost/alps/applications/qmc/worms/evaluate.C:29:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous definition
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:166:0: note: this is the location of the previous definition
Linking CXX executable worm
Linking CXX shared library cthyb.so
/usr/bin/ld: ../../../src/alps/libalps.a(hdf5.cpp.o): relocation R_X86_64_32S against `vtable for alps::bad_cast' can not be used when making a shared object; recompile with -fPIC
../../../src/alps/libalps.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [applications/dmft/qmc/cthyb.so] Error 1
make[1]: *** [applications/dmft/qmc/CMakeFiles/cthyb.so.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target worm
Linking CXX executable worm_evaluate
[100%] Built target worm_evaluate
make: *** [all] Error 2
With regards,
Dasari.