I just installed RDKit_Q22010_1 on my MacBook Pro running: OS X 10.6.3 gcc version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659) Python version 2.6
As usual with RDKit+Boost, it took a long time (about 3-4 hours). That's in part because Boost-based code seems to take so long to compile, and in part because I ran into a problem with the Python part of the installation. I figured a way around the problem, but it isn't a solution. (Though I don't even know if I needed to do that work-around.) Here are the steps I did for installation: ** BOOST ** I installed the latest version of Boost; boost_1_43_0.tar.bz2 1) Downloaded the 33MB file to ~/ftps/boost_1_43_0.tar.bz2 and extracted it (in that directory) as bzcat boost_1_43_0.tar.bz2 | tar xvf - I then did a: sudo ln -s ~/ftps/boost_1_43_0 /usr/local/ so that I have a /usr/local/boost_1_43_0 . 2) I followed the Boost instructions (which are different than the RDKit ones in INSTALL) which had me do a % ./bootstrap.sh -n Building Boost.Jam with toolset darwin... tools/jam/src/bin.macosxx86_64/bjam -n Detecting Python version... 2.6 -n Detecting Python root... /System/Library/Frameworks/Python.framework/Versions/2.6 -n Unicode/ICU support for Boost.Regex?... not found. Generating Boost.Build configuration in project-config.jam... Bootstrapping is done. To build, run: ./bjam .... 3) I then compiled and installed Boost, using: % sudo ./bjam install Password: warning: Building Boost.Regex with the optional Unicode/ICU support disabled. note: Please refer to the Boost.Regex documentation for more information note: this is a strictly optional feature. warning: Graph library does not contain MPI-based parallel components. note: to enable them, add "using mpi ;" to your user-config.jam warning: skipping optional Message Passing Interface (MPI) library. note: to enable MPI support, add "using mpi ;" to user-config.jam. note: to suppress this message, pass "--without-mpi" to bjam. note: otherwise, you can safely ignore this message. .... and waited a *long* time until it finished 4) I checked the installation % ls -lt /usr/local/lib/libboost_* | head -rw-r--r-- 1 root wheel 28943960 Jul 3 20:18 /usr/local/lib/libboost_wave.a -rw-r--r-- 1 root wheel 580848 Jul 3 20:16 /usr/local/lib/libboost_thread.a -rw-r--r-- 1 root wheel 7834496 Jul 3 20:16 /usr/local/lib/libboost_unit_test_framework.a ... % ls -lt /usr/local/include/boost/ total 1680 drwxr-xr-x 3 root wheel 102 Jul 3 21:45 compatibility drwxr-xr-x 49 root wheel 1666 Jul 3 21:44 units drwxr-xr-x 16 root wheel 544 Jul 3 21:44 tr1 drwxr-xr-x 29 root wheel 986 Jul 3 21:44 spirit drwxr-xr-x 92 root wheel 3128 Jul 3 21:44 python ... (The dates are different because I wiped the old include/boost to make sure that there was no contamination from an old Boost.) ** RDKit ** 1) Download RDKit_Q22010_1.tgz into my ~/ftps/ directory then tar xZvf RDKit_Q22010_1.tgz 2) Set up the environment variables PATH= ..elided..:/Users/dalke/ftps/RDKit_Q22010_1/bin PYTHONPATH=/Users/dalke/ftps/RDKit_Q22010_1 RDBASE=/Users/dalke/ftps/RDKit_Q22010_1 BOOST_ROOT=/usr/local/boost_1_43_0 DYLD_LIBRARY_PATH=/Users/dalke/ftps/RDKit_Q22010_1/bin LD_LIBRARY_PATH=/Users/dalke/ftps/RDKit_Q22010_1/bin (Do I need to do all these? I'm still not sure about the Mac's use of DYLD_LIBRARY_PATH vs. LD_LIBRARY_PATH ) 3) Follow the build steps [gateway:~/ftps/RDKit_Q22010_1] dalke% mkdir build [gateway:~/ftps/RDKit_Q22010_1] dalke% cd build [gateway:~/ftps/RDKit_Q22010_1/build] dalke% cmake .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- 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 -- Found PythonLibs: -framework Python -- Found PythonInterp: /usr/bin/python2.6 -- Boost version: 1.43.0 -- Found the following Boost libraries: -- python -- Found BISON: /usr/bin/bison -- Found FLEX: /usr/bin/flex -- Boost version: 1.43.0 -- Found the following Boost libraries: -- regex -- Configuring done -- Generating done -- Build files have been written to: /Users/dalke/ftps/RDKit_Q22010_1/build [gateway:~/ftps/RDKit_Q22010_1/build] dalke% make Scanning dependencies of target fastentropy [ 1%] Building CXX object External/cmim-1.0/CMakeFiles/fastentropy.dir/fastentropy.cc.o [ 1%] Building CXX object External/cmim-1.0/CMakeFiles/fastentropy.dir/misc.cc.o Linking CXX static library libfastentropy.a ... Linking CXX shared library libRDGeneral.dylib ld: warning: directory '-framework Python' following -L not found [ 3%] Built target RDGeneral Scanning dependencies of target testDict [ 3%] Building CXX object Code/RDGeneral/CMakeFiles/testDict.dir/testDict.cpp.o Linking CXX executable testDict ld: warning: directory '-framework Python' following -L not found [ 3%] Built target testDict ... Notice the "directory '-framework Python' following -L not found"? That's because of things like the following, from Code/GraphMol/CMakeFiles/graphmoltestPickler.dir/link.txt /usr/bin/c++ -mmacosx-version-min=10.6 -O3 -DNDEBUG -Wl,-search_paths_first -headerpad_max_install_names CMakeFiles/graphmoltestPickler.dir/testPickler.cpp.o -o graphmoltestPickler -L"-framework Python" -L/usr/local/lib SmilesParse/libSmilesParse.dylib Substruct/libSubstructMatch.dylib FileParsers/libFileParsers.dylib libGraphMol.dylib ../Geometry/libRDGeometryLib.dylib ../RDGeneral/libRDGeneral.dylib SmilesParse/libSmilesParse.dylib libGraphMol.dylib ../Geometry/libRDGeometryLib.dylib ../DataStructs/libDataStructs.dylib ../RDGeneral/libRDGeneral.dylib The part which is -L"-framework Python" should be -framework Python I don't know cmake but it looks like the problem comes from the link_directories() part of CMakeLists.txt, in the following ... endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) link_directories(${PYTHON_LIBRARIES}) find_package(NumPy REQUIRED) ... I don't know how to fix it for real, and I don't know if it makes a difference, but here's my hack fix, which simply removes the '-L"' and the closing '"' from the wrong text. % pwd /Users/dalke/ftps/RDKit_Q22010_1/build % perl -i -pe 's/-L"-framework Python"/-framework Python/g' `find . -name link.txt` % rm `find . -name 'lib*.dylib'` [ 1%] Built target fastentropy Linking CXX shared library libRDGeneral.dylib [ 3%] Built target RDGeneral Linking CXX executable testDict [ 3%] Built target testDict Linking CXX shared library libRDBoost.dylib [ 3%] Built target RDBoost Linking CXX shared module rdBase.so ... You can see that those warning messages have disappeared. 4) Run the self-tests % make testRunning tests... Test project /Users/dalke/ftps/RDKit_Q22010_1/build Start 1: testDict 1/76 Test #1: testDict ......................... Passed 0.00 sec Start 2: testDataStructs 2/76 Test #2: testDataStructs .................. Passed 0.00 sec Start 3: pyBV 3/76 Test #3: pyBV .............................***Failed 0.00 sec Start 4: pyDiscreteValueVect 4/76 Test #4: pyDiscreteValueVect ..............***Failed 0.00 sec Start 5: pySparseIntVect 5/76 Test #5: pySparseIntVect ..................***Failed 0.00 sec Start 6: testTransforms ... You see how all of the Python examples fail? This is because I didn't understand the testing well enough. I assumed that I could run the tests in-place, without doing an install first. According to Testing/Temporary/LastTest.log ---------------------------------------------------------- Traceback (most recent call last): File "/Users/dalke/ftps/RDKit_Q22010_1/Code/DataStructs/Wrap/testBV.py", line 1, in <module> from rdkit import DataStructs File "/Users/dalke/ftps/RDKit_Q22010_1/rdkit/DataStructs/__init__.py", line 7, in <module> from rdkit import rdBase ImportError: cannot import name rdBase <end of output> Test time = 1.00 sec ---------------------------------------------------------- which means the Python search path isn't right. A quick look at the build setup shows that it's not set up for that, so once I did a sudo make install then followed the INSTALL steps to build the test databases (in RDKit_Q22010_1 and not RDKit_Q22010_1/build ) sqlite3 $RDBASE/Data/RDData.sqlt < $RDBASE/rdkit/Dbase/test_data/RDData.s sqlite3 $RDBASE/Data/RDData.sqlt < $RDBASE/rdkit/Dbase/test_data/RDData.sqlite then did a "make test" (I did that out of force of habit. The INSTALL says to run "ctest" and "make test" does "ctest --force-new-ctest-process" so I don't see the need to change my habits.) I ended up with a single error The following tests FAILED: 71 - pythonTestDirML (Failed) Errors while running CTest from the error log 71/76 Testing: pythonTestDirML 71/76 Test: pythonTestDirML Command: "/usr/bin/python2.6" "/Users/dalke/ftps/RDKit_Q22010_1/rdkit/ML/test_li st.py" "--testDir" "/Users/dalke/ftps/RDKit_Q22010_1/rdkit/ML" Directory: /Users/dalke/ftps/RDKit_Q22010_1/build/rdkit "pythonTestDirML" start time: Jul 03 22:33 CDT Output: ... FAIL: testMurtaghUPGMA (__main__.TestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "UnitTestCluster.py", line 70, in testMurtaghUPGMA assert not newClust.Compare(newClust2,ignoreExtras=0),'equality failed3' AssertionError: equality failed3 I'll, ummm, leave that to Greg to figure out. :) BTW, Boost's Getting Started says The path to the boost root directory (often /usr/local/boost_1_43_0) is sometimes referred to as $BOOST_ROOT in documentation and mailing lists . The RDKit INSTALL says * The following are required if you are planning on using the Python wrappers: * build and install the required boost shared libraries: * `cd $BOOST` For consistency, should RDKit use "$BOOST_ROOT" instead of "$BOOST" ? Andrew da...@dalkescientific.com ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss