> On Feb 2, 2016, at 4:17 PM, Ben Webb ben@salilab.org wrote: > > On 02/01/2016 08:01 PM, Novosielski, Ryan wrote: >> So I'm using 1.59.0 and the issue has gone away. The Python trouble >> remains. I have all of -DCMAKE_INCLUDE_PATH, -DPYTHON_INCLUDE_DIR, and >> -DPYTHON_LIBRARY defined -- no help. I'd have expected the latter two to >> suffice anyway. > > Either your PYTHON_INCLUDE_DIR cmake variable is pointing to the wrong > directory (doesn't include Python.h) or for some reason the compiler > isn't being given the right arguments. You can get more information (the > compiler command line is most useful) by running "make VERBOSE=1”.
Thanks much, Ben. This was interesting, actually: apparently Python.h is NOT in “include” but rather “include/python2.7” (I should have looked sooner). Apparently, though, setting PYTHON_INCLUDE_DIR to /anything/ (whether or not it contains Python.h) stops this error:
CMake Error at modules/rmf/dependency/RMF/cmake_modules/py-FindPackageHandleStandardArgs.cmake:97 (message): Could NOT find PythonLibs: Found unsuitable version "2.7.5", but required is exact version "2.7.11" (found /opt/sw/packages/gcc-4.8.3/python/2.7.11/lib). The version of the Python libraries and/or headers does not match that of your 'python' binary (/opt/sw/packages/gcc-4.8.3/python/2.7.11/bin/python). Either set your PATH so that 'python' uses a different Python (e.g. to use /usr/local/bin/python26, do something like mkdir ~/bin; ln -sf /usr/local/bin/python26 ~/bin/python; PATH=~/bin:$PATH), or set PYTHON_LIBRARY to the full path to the correct version of the Python library and PYTHON_INCLUDE_DIR to the directory containing the corresponding Python.h.
…which is what you see if you have a system Python that is one version and then try to use a different Python in your environment. I figured when the error went away when I set PYTHON_INCLUDE_DIR that I had indeed gotten that correct. Setting it to /opt/sw/packages/gcc-4.8.3/python/2.7.11/include/python2.7 did allow the CMake to succeed as well as the build.
Is this the expected behavior? Maybe so.
-- ____ *Note: UMDNJ is now Rutgers-Biomedical and Health Sciences* || \UTGERS |---------------------*O*--------------------- ||_// Biomedical | Ryan Novosielski - Senior Technologist || \ and Health | novosirj@rutgers.edu - 973/972.0922 (2x0922) || \ Sciences | OIRT/High Perf & Res Comp - MSB C630, Newark `'