compilation problem, boost_python3

2,564 views
Skip to first unread message

Io

unread,
Nov 7, 2014, 11:30:25 AM11/7/14
to hoomd...@googlegroups.com
Hello everybody.

I was trying to compile hoomd in an Ubuntu system (Ubuntu 14.04) but I have some problem.

I run:

cmake ../hoomd-blue/ -DCMAKE_INSTALL_PREFIX=~/hoomd1.0

that give me:
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring HOOMD v1.0.1-13-gea60220
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- MPI<->CUDA interoperability does not appear to be available.
-- Found PythonInterp: /usr/bin/python3 (found version "3.4")
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES)
-- First attempt to find boost, it's OK if it fails
-- Could NOT find Boost
-- Python python-3.4 not found, trying python or python3
CMake Error at /usr/local/share/cmake-3.1/Modules/FindBoost.cmake:1182 (message):
  Unable to find the requested Boost libraries.


  Boost version: 1.54.0


  Boost include path: /usr/include


  Could not find the following Boost libraries:


          boost_python3


  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMake/hoomd/HOOMDBoostSetup.cmake:51 (find_package)
  CMakeLists.txt:39 (include)




-- Found CUDA: /usr/local/cuda  
-- Found Thrust: /usr/local/cuda/include  
-- Overriding CMake'
s default CFLAGS (this should appear only once)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY
(ADVANCED)
    linked
by target "libhoomd" in directory /home/fbenedet/hoomd-inst-1.0/hoomd-blue/libhoomd




Plus a long list of ""linked by target" and then:

-- Configuring incomplete, errors occurred!
See also "/home/fbenedet/hoomd-inst-1.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/fbenedet/hoomd-inst-1.0/build/CMakeFiles/CMakeError.log".




After a quite long search on internet I found a way to fix the missing PythonLibs but other problems remain.

I used the following line:
cmake ../hoomd-blue/  -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/ -DCMAKE_INSTALL_PREFIX=~/hoomd1.0
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring HOOMD v1.0.1-13-gea60220
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- MPI<->CUDA interoperability does not appear to be available.
-- Found PythonInterp: /usr/bin/python3 (found version "3.4")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu  
-- First attempt to find boost, it's OK if it fails
-- Could NOT find Boost
-- Python python-3.4 not found, trying python or python3
CMake Error at /usr/local/share/cmake-3.1/Modules/FindBoost.cmake:1182 (message):
  Unable to find the requested Boost libraries.


  Boost version: 1.54.0


  Boost include path: /usr/include


  Could not find the following Boost libraries:


          boost_python3


  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMake/hoomd/HOOMDBoostSetup.cmake:51 (find_package)
  CMakeLists.txt:39 (include)




-- Found CUDA: /usr/local/cuda  
-- Found Thrust: /usr/local/cuda/include  
-- Overriding CMake'
s default CFLAGS (this should appear only once)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Configuring incomplete, errors occurred!
See also "/home/fbenedet/hoomd-inst-1.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/fbenedet/hoomd-inst-1.0/build/CMakeFiles/CMakeError.log".




I tried many other options of cmake like:
-DPYTHON_EXECUTABLE=/usr/lib/python3.4
-DBOOST_ROOT=/usr/lib/x86_64-linux-gnu/
-DBOOST_LIBRARYDIR=/usr/include/boost/
-DPYTHON_INCLUDE_DIR=/usr/include/python3.4m/

but without success.
Can somebody please help?


Joshua Anderson

unread,
Nov 7, 2014, 1:27:18 PM11/7/14
to hoomd...@googlegroups.com
You need to install the libboost-python library compiled against python3. Or, possibly it is already installed built against python2 (as python2 is the default on ubuntu 14.04), so your forcing python3 causes the configure step to fail.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
Phone: 734-647-8244
http://www-personal.umich.edu/~joaander/
> --
> You received this message because you are subscribed to the Google Groups "hoomd-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
> To post to this group, send email to hoomd...@googlegroups.com.
> Visit this group at http://groups.google.com/group/hoomd-users.
> For more options, visit https://groups.google.com/d/optout.

Io

unread,
Nov 20, 2014, 6:08:55 AM11/20/14
to hoomd...@googlegroups.com


I am sorry for keeping up this thread but it's unclear for me what should I do.
Apparently all the libboost-python (also the dev) are installed.

If I try to compile the old hoomd 0.11.3 I have no problems, this is what I get:

cmake ../code/ -DCMAKE_INSTALL_PREFIX=~/hoomd-test
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring HOOMD v0.11.3-960-gc3c19c8
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6") 
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Found PythonLibs: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so  
-- First attempt to find boost, it's OK if it fails
-- Could NOT find Boost
-- Python python-2.7 not found, trying python or python3
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   filesystem
--   signals
--   program_options
--   unit_test_framework
--   iostreams
--   serialization
--   python
--   system
-- Found CUDA: /usr/local/cuda  
-- Found Thrust: /usr/local/cuda/include  
-- Overriding CMake's default CFLAGS (this should appear only once)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Enabling MPI.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/student/hooinst/build


So far so good with 0.11.3 .
But when I try with the 1.0 it doesn't even find the boost library. 

cmake ../ -DCMAKE_INSTALL_PREFIX=~/hoomd-1.0
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring HOOMD v1.0.1-13-gea60220
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- MPI<->CUDA interoperability does not appear to be available.
-- Found PythonInterp: /usr/bin/python3 (found version "3.4") 
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
-- First attempt to find boost, it's OK if it fails
-- Could NOT find Boost
-- Python python-3.4 not found, trying python or python3
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
PYTHON_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/student/hoomd-inst-1.0/hoomd-blue


If I set the cmake options to use python2.7 and the corresponding library (the same that were used in the version 0.11.3 and that were compiling) I get:

cmake ../ -DPYTHON_EXECUTABLE=/usr/lib/python2.7  -DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/  -DCMAKE_INSTALL_PREFIX=~/hoomd-1.0
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring HOOMD v1.0.1-13-gea60220
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- MPI<->CUDA interoperability does not appear to be available.
-- Found PythonInterp: /usr/lib/python2.7 (found version "1.4") 
-- Error while querying python for information
-- Error while querying python for information
-- Error while querying python for information
-- Error while querying python for information
-- Error while querying python for information
-- Error while querying python for information
-- Error while querying python for information
CMake Error at CMake/hoomd/HOOMDPythonSetup.cmake:45 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:37 (include)


-- Could NOT find PythonLibs (missing:  PYTHON_INCLUDE_DIRS) 
-- First attempt to find boost, it's OK if it fails
-- Could NOT find Boost
-- Python python-. not found, trying python or python3
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   filesystem
--   signals
--   program_options
--   unit_test_framework
--   iostreams
--   serialization
--   python
--   system
-- Found CUDA: /usr/local/cuda  
-- Found Thrust: /usr/local/cuda/include  
-- Overriding CMake's default CFLAGS (this should appear only once)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/student/hoomd-inst-1.0/hoomd-blue


I also tried to follow this thread http://ericscottbarr.com/blog/2012/03/building-boost-python-for-python-3-2/ (not on the same computer though) to install boost with python3 support but with no success.

Any help please?

Best



Joshua Anderson

unread,
Nov 20, 2014, 7:55:47 AM11/20/14
to hoomd...@googlegroups.com
On Nov 20, 2014, at 6:08 AM, Io <fusion...@hotmail.com> wrote:

> I am sorry for keeping up this thread but it's unclear for me what should I do.
> Apparently all the libboost-python (also the dev) are installed.

Thanks for the detailed traces. They confirm my earlier suspicions.

> If I try to compile the old hoomd 0.11.3 I have no problems, this is what I get:

This confirms that the libboost_python you have installed is for python27.

> So far so good with 0.11.3 .
> But when I try with the 1.0 it doesn't even find the boost library.
> ...
> -- Found PythonInterp: /usr/bin/python3 (found version "3.4")

This is because you have python3 installed and hoomd defaults to that first. You do not have a compatible boost-python installed that is built against python3. I doubt that your distro even provides such. Gentoo is the only distro I am aware of that will install libboost_python for every python version slot installed.

> If I set the cmake options to use python2.7 and the corresponding library (the same that were used in the version 0.11.3 and that were compiling) I get:
> cmake ../ -DPYTHON_EXECUTABLE=/usr/lib/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/ -
> ....
> -- Found PythonInterp: /usr/lib/python2.7 (found version "1.4")
> -- Error while querying python for information
> -- Error while querying python for information
> -- Error while querying python for information
> -- Error while querying python for information
> -- Error while querying python for information
> -- Error while querying python for information
> -- Error while querying python for information

Almost there, /usr/lib/python2.7 is a directory, not an executable.

Also, do not specify PYTHON_LIBRARY at all - if you set the python executable, hoomd will find everything else from that in an error-free way.

Try: cmake ../ -DPYTHON_EXECUTABLE=`which python2.7`

Io

unread,
Nov 20, 2014, 10:08:26 AM11/20/14
to hoomd...@googlegroups.com
Thanks a lot

cmake ../ -DPYTHON_EXECUTABLE=`which python2.7` -DCMAKE_INSTALL_PREFIX=~/hoomd-1.0

worked.

Best

Io

unread,
Nov 20, 2014, 11:47:59 AM11/20/14
to hoomd...@googlegroups.com

After the successful cmake I tried the "make".
I found another problem that I may had solve (although I didn't test it yet) and thought that it was worth to report it.
the make, when it build the CXX objects give me:

[ 35%] Building CXX object libhoomd/CMakeFiles/libhoomd.dir/computes/BondTablePotential.cc.o
/tmp/ccnzDjQF.s: Assembler messages:
/tmp/ccnzDjQF.s:11674: Error: no such instruction: `vfmadd312ss 60(%rsp),%xmm0,%xmm1'

I rerun cmake adding the following line in CMakeLists.txt:
SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -march=native -mno-avx")
It seems to solve the problem of compilation.

Best
Reply all
Reply to author
Forward
0 new messages