Re: Centos Compilation Errors:

67 views
Skip to first unread message

Christopher

unread,
Apr 16, 2013, 4:38:53 AM4/16/13
to sire-de...@googlegroups.com
  Hi George,

I think that the problem may be that the python library used to compile the python wrappers may not match the python library used to compile libboost_python. Could you use the "ldd" command on lib boost_python.so and let me know which python it is linked against? Do this by typing;

ldd /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libboost_python.so

Then, could you send me the name of the python executable used to compile the wrappers. You can do this by typing "cmake ." in the directory you are compiling the python wrappers, and sending me all of the output. On my Mac, the output looks like this;

pazuzu 15:44:22 ~/Work/Sire/build/python2/branches/devel
:-> cmake .
-- Sire version: 0.0.1
-- Importing Sire library definitions from /Users/chris/local/include/Sire/cmake/SireLibraries.cmake
-- Found Sire version 0.0.1
-- Sire root = /Users/chris/local
-- Header files in /Users/chris/local/include/Sire
-- Libraries in /Users/chris/local/lib
-- Using Qt version 4.8.2 (/Library/Frameworks/QtOpenGL.framework;/Library/Frameworks/QtWebKit.framework;/Library/Frameworks/QtXmlPatterns.framework;/Library/Frameworks/QtGui.framework;/Library/Frameworks/QtXml.framework;/Library/Frameworks/QtSql.framework;/Library/Frameworks/QtNetwork.framework;/Library/Frameworks/QtCore.framework)
-- Found Python-Version 2.7
-- Python paths -framework Python;-ldl  -framework CoreFoundation | /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 | lib/python2.7/site-packages
-- Boost version: 1.50.0
-- Found the following Boost libraries:
--   python
-- Boost paths /usr/local/lib | /usr/local/include
-- Using boost::python library /usr/local/lib/libboost_python.dylib
-- Compiling the python 2 wrappers using a SMALL build.
-- CMAKE_SYSTEM_NAME      == Darwin
-- CMAKE_C_COMPILER       == /usr/bin/gcc
-- CMAKE_CXX_COMPILER     == /usr/bin/c++
-- C compiler flags       == -Wall -pipe -Wno-strict-aliasing -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -DSIRE_USE_SSE -Os 
-- C++ compiler flags     == -Wall -pipe -Wno-strict-aliasing -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -DSIRE_USE_SSE -Os 
-- Shared library flags   ==    -Wl -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden
-- Static library flags   ==  -static
-- Executable link flags  ==   
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chris/Work/Sire/build/python2/branches/devel

  Best wishes,

  Christopher

p.s. Also, could you talk with Gaetano, as he should have compiled the python wrappers at Edinburgh before, so he may have seen (and solved) this problem as well.
 

george gerogiokas

unread,
Apr 16, 2013, 4:53:09 AM4/16/13
to sire-de...@googlegroups.com
Hi Chris,

The output of the ldd command is this:

[root@localhost buildpython2]# ldd /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libboost_python.so
        linux-gate.so.1 =>  (0x00761000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00e54000)
        libm.so.6 => /lib/libm.so.6 (0x006f7000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x001e5000)
        libc.so.6 => /lib/libc.so.6 (0x001f1000)
        /lib/ld-linux.so.2 (0x006d0000)

output of cmake is what follows:

[root@localhost buildpython2]# cmake .
-- Sire version: 0.0.1
-- Importing Sire library definitions from /usr/local/include/Sire/cmake/SireLibraries.cmake

-- Found Sire version 0.0.1
-- Sire root = /usr/local
-- Header files in /usr/local/include/Sire
-- Libraries in /usr/local/lib
-- Using Qt version 4.7.4 (/usr/lib/qt4/lib/libQtOpenGL.so;/usr/lib/qt4/lib/libQtWebKit.so;/usr/lib/qt4/lib/libQtGui.so;/usr/lib/qt4/lib/libQtXml.so;/usr/lib/qt4/lib/libQtSql.so;/usr/lib/qt4/lib/libQtXmlPatterns.so;/usr/lib/qt4/lib/libQtNetwork.so;/usr/lib/qt4/lib/libQtCore.so)
-- Found Python-Version 2.7
-- Python paths /usr/local/lib/libpython2.7.a;-lpthread -ldl  -lutil;-lm | /usr/local/include/python2.7 | lib/python2.7/site-packages
-- Boost paths /usr/lib | /usr/include
-- Using boost::python library /usr/lib/libboost_python.so

-- Compiling the python 2 wrappers using a SMALL build.
-- CMAKE_SYSTEM_NAME      == Linux

-- CMAKE_C_COMPILER       == /usr/bin/gcc
-- CMAKE_CXX_COMPILER     == /usr/bin/c++
-- C compiler flags       == -Wall -pipe -Wno-strict-aliasing -fopenmp -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -DSIRE_USE_SSE -Os
-- C++ compiler flags     == -Wall -pipe -Wno-strict-aliasing -fopenmp -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -DSIRE_USE_SSE -Os
-- Shared library flags   ==   -rdynamic -Wl,--no-undefined -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden

-- Static library flags   ==  -static
-- Executable link flags  == 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/georgeg/software/sire/buildpython2

Many thanks,
George




 

--
You received this message because you are subscribed to the Google Groups "Sire Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sire-develope...@googlegroups.com.
To post to this group, send email to sire-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/sire-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
George Gerogiokas

Christopher Woods

unread,
Apr 16, 2013, 5:03:57 AM4/16/13
to Sire Developers

  Hi George,

It is a concern that cmake has found the libpython2.7.a static library file. Sire needs to link against the dynamic library (libpython2.7.so). Is there a libpython2.7.so file installed on centos? (use "locate libpython2.7.so" to find it). It may be in /usr/local/lib or /usr/local/lib64. Could you see if this file contains the missing function e.g. by typing;

strings /usr/libpython2.7.so | grep PyUnicodeUCS4_AsWideChar

(please send the output of the above).

If there is no .so file, or no PyUnicodeUCS4_AsWideChar then it does imply that boost_python has been built against a different python than the one found in  /usr/local/lib/libpython2.7.a. Could you look in /usr/lib and see if there is another python there? Maybe someone installed python 2.7 in /usr/local and forgot to update all of the other libraries that depend on python?

  Cheers,

  Christopher

---------------------------------------------------------
Christopher Woods
Centre for Computational Chemistry
School of Chemistry
University of Bristol, BS8 1TS, UK
+44 (0) 7786 264562
http://chryswoods.com
http://uk.linkedin.com/in/chryswoods

george gerogiokas

unread,
Apr 16, 2013, 5:23:22 AM4/16/13
to sire-de...@googlegroups.com
Hi Chris,

There is no libpython2.7.so file but there is another libpython2.4.so.  I don't  think I updated the libraries that depend on python2.7 so
it could be built against python2.4 I guess.

Many thanks,
George

Christopher Woods

unread,
Apr 16, 2013, 5:28:05 AM4/16/13
to Sire Developers

  Hi George,

Yes - that will be the problem. It should be rebuilt against libpython2.4.so. Use "ccmake" in the python2 build directory and change "PYTHON_EXECUTABLE" to point to the python2.4 executable (I guess this is /usr/bin/python) and change "_python_library" to "/usr/lib/libpython2.4.so" (if it is in /usr/lib). You can get these options by pressing "t" to toggle advanced mode.

  Cheers,

  Christopher

george gerogiokas

unread,
Apr 17, 2013, 4:23:55 AM4/17/13
to sire-de...@googlegroups.com
Hi Chris,

unfortunately I get a new error:

/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp: In function ‘void register_OpenMMMDIntegrator_class()’:
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:91: error: ‘createWorkspace’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:102: error: ‘createWorkspace’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:113: error: ‘ensemble’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:123: error: ‘getAndersen’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:133: error: ‘getAndersen_frequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:143: error: ‘getBufferFrequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:153: error: ‘getCMMremoval_frequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:163: error: ‘getConstraintType’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:173: error: ‘getCutoffType’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:183: error: ‘getCutoff_distance’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:193: error: ‘getDeviceIndex’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:203: error: ‘getField_dielectric’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:213: error: ‘getMCBarostat’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:223: error: ‘getMCBarostat_frequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:233: error: ‘getPlatform’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:243: error: ‘getPressure’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:253: error: ‘getRestraint’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:263: error: ‘getTemperature’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:273: error: ‘initialise’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:283: error: ‘integrate’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:294: error: ‘isTimeReversible’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:318: error: ‘setAndersen’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:329: error: ‘setAndersen_frequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:340: error: ‘setBufferFrequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:351: error: ‘setCMMremoval_frequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:362: error: ‘setConstraintType’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:373: error: ‘setCutoffType’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:384: error: ‘setCutoff_distance’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:395: error: ‘setDeviceIndex’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:406: error: ‘setField_dielectric’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:417: error: ‘setMCBarostat’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:428: error: ‘setMCBarostat_frequency’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:439: error: ‘setPlatform’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:450: error: ‘setPressure’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:461: error: ‘setRestraint’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:472: error: ‘setTemperature’ is not a member of ‘SireMove::OpenMMMDIntegrator’
/home/georgeg/software/sire/python2source/Move/OpenMMMDIntegrator.pypp.cpp:483: error: ‘toString’ is not a member of ‘SireMove::OpenMMMDIntegrator’
....
/usr/include/boost/python/object/inheritance.hpp:89: error: cannot dynamic_cast ‘(SireMove::OpenMMMDIntegrator*)source’ (of type ‘class SireMove::OpenMMMDIntegrator*’) to type ‘class SireBase::Property*’ (source type is not polymorphic)
/usr/local/include/Sire/SireUnits/units.h: At global scope:
/usr/local/include/Sire/SireUnits/units.h:326: warning: ‘SireUnits::one_over_four_pi_eps0’ defined but not used
/usr/local/include/Sire/SireUnits/units.h:333: warning: ‘SireUnits::k_boltz’ defined but not used
/usr/local/include/Sire/SireUnits/units.h:336: warning: ‘SireUnits::mu0’ defined but not used
/usr/local/include/Sire/SireUnits/units.h:340: warning: ‘SireUnits::G_newton’ defined but not used
/usr/local/include/Sire/SireUnits/units.h:350: warning: ‘SireUnits::h_slash’ defined but not used
/usr/local/include/Sire/SireMaths/constants.h:88: warning: ‘SireMaths::smallest’ defined but not used
/usr/local/include/Sire/SireMaths/constants.h:97: warning: ‘SireMaths::largest’ defined but not used
make[2]: *** [Move/CMakeFiles/Move.dir/OpenMMMDIntegrator.pypp.cpp.o] Error 1
make[1]: *** [Move/CMakeFiles/Move.dir/all] Error 2
make: *** [all] Error 2


Something to do with OpenMM.  Not sure what it has to do with.

Many thanks,
George

Christopher Woods

unread,
Apr 17, 2013, 5:36:25 AM4/17/13
to Sire Developers

  Hi George,

Can you run "cmake ." in the corelib build directory. I guess from the output that the corelib may not have been compiled with openmm support, and so the python wrappers are not compiling correctly. The earlier version of Julien's code that you are using has not got the code needed to switch off openmm in the python wrappers if it is not present in the corelib. You may need to install openmm and recompile the corelib with openmm support.

  Best wishes,

  Christopher

george gerogiokas

unread,
Apr 17, 2013, 5:40:13 AM4/17/13
to sire-de...@googlegroups.com
Hi Chris,

Yes, that's right I had thought I turned it on but I didn't.

-- Using Qt version 4.7.4 (/usr/lib/qt4/lib/libQtOpenGL.so;/usr/lib/qt4/lib/libQtWebKit.so;/usr/lib/qt4/lib/libQtGui.so;/usr/lib/qt4/lib/libQtXml.so;/usr/lib/qt4/lib/libQtXmlPatterns.so;/usr/lib/qt4/lib/libQtNetwork.so;/usr/lib/qt4/lib/libQtCore.so)

-- Boost paths /usr/lib | /usr/include
-- Using GSL from /usr
-- GSL paths  -lgsl -lgslcblas -lm | /usr/include
-- A library with BLAS API found.
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Found BLAS library /usr/lib/libblas.so
-- Found LAPACK library /usr/lib/liblapack.so;/usr/lib/libblas.so
-- Found MPI, so switching MPI support on
-- Detected and using GCC C and C++ compilers
-- Using GCC version 4.1

-- CMAKE_SYSTEM_NAME      == Linux
-- CMAKE_C_COMPILER       == /usr/bin/gcc
-- CMAKE_CXX_COMPILER     == /usr/bin/c++
-- CMAKE_Fortran_COMPILER == /usr/bin/gfortran
-- SIRE_SMALL_FLAGS       == -Os
-- SIRE_WARNALL_FLAGS     == -Wall
-- SIRE_DEBUG_FLAGS       == -g
-- SIRE_RELEASE_FLAGS     == -O3 -ffast-math -fomit-frame-pointer
-- SIRE_OPENMP_FLAGS      == -fopenmp
-- SIRE_VECTOR_FLAGS      == -msse2 -DSIRE_USE_SSE
-- SIRE_VISIBILITY_FLAGS  == -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden
-- SIRE_PLATFORM_FLAGS    == -pipe -Wno-strict-aliasing
-- SIRE_SHARE_LINK_FLAGS  ==  -rdynamic -Wl,--no-undefined
-- SIRE_STATIC_LINK_FLAGS == -static
-- SIRE_EXE_LINK_FLAGS    ==
-- Compiling Sire using a default (RELEASE) build
-- C compiler flags       == -Wall -pipe -Wno-strict-aliasing -fopenmp -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -DSIRE_USE_SSE -O3 -ffast-math -fomit-frame-pointer
-- C++ compiler flags     == -Wall -pipe -Wno-strict-aliasing -fopenmp -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden -msse2 -DSIRE_USE_SSE -O3 -ffast-math -fomit-frame-pointer 
-- Shared library flags    ==   -rdynamic -Wl,--no-undefined -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden
-- Static library flags    ==  -static
-- Executable link flags   == 
--  ** Adding MPI support to SireCluster **
-- MPI headers: /usr/local/include
-- MPI libraries: /usr/local/lib/libmpichcxx.a /usr/local/lib/libmpich.a;/usr/local/lib/libopa.a;/usr/lib/libpthread.so;/usr/lib/librt.so
-- MPI definitions:
-- Backtrace functionality is available.
-- Detecting C++/Fortran interface using cmake-2.8 code...
-- OpenMM not found, so OpenMM support is disabled.
--  ** Adding MPI support to sire **
-- MPI headers: /usr/local/include
-- MPI libraries: /usr/local/lib/libmpichcxx.a /usr/local/lib/libmpich.a;/usr/local/lib/libopa.a;/usr/lib/libpthread.so;/usr/lib/librt.so
-- MPI definitions:
--  ** Adding MPI support to sire **
-- MPI headers: /usr/local/include
-- MPI libraries: /usr/local/lib/libmpichcxx.a /usr/local/lib/libmpich.a;/usr/local/lib/libopa.a;/usr/lib/libpthread.so;/usr/lib/librt.so
-- MPI definitions:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/georgeg/software/sire/buildcorelib

Thanks,
George

Reply all
Reply to author
Forward
0 new messages