Menu

#151 pymol 1.7.3.4 fails to compile against numpy

v1.7.1.0
closed-invalid
nobody
None
5
2014-11-21
2014-11-21
No

The pymol svn for the 1.7.3.x releases are failing to compile against the numpy library. The build...

/sw/bin/python2.7 setup.py install --root /sw/src/fink.build/root-pymol-py27-1.7.3.4-0

produces compile errors of the form...

gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -fwrapv -O3 -Wall -Wstrict-prototypes -I/sw/include -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D_PYMOL_OPENGL_SHADERS -D_PYMOL_CGO_DRAWARRAYS -D_PYMOL_CGO_DRAWBUFFERS -D_PYMOL_GL_CALLLISTS -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -D_PYMOL_FREETYPE -DNO_MMLIBS -D_CGO_DRAWARRAYS -DOPENGL_ES_2 -D_PYMOL_NUMPY -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Imodules/cealign/src -Imodules/cealign/src/tnt -Ibuild/generated -Icontrib/uiuc/plugins/include -Icontrib/uiuc/plugins/molfile_plugin/src -I/sw/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/include/libxml2 -I/usr/X11/include -I/usr/X11/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libxml2 -I/sw/include -I/sw/include/freetype2 -I/sw/include/libxml2 -I/sw/include/python2.7 -c layer1/ButMode.cpp -o build/temp.macosx-10.10-x86_64-2.7/layer1/ButMode.o -Werror=implicit-function-declaration -Werror=declaration-after-statement -Wno-write-strings -Wno-unused-function -Wno-empty-body -Wno-char-subscripts -ffast-math -funroll-loops -O3 -fcommon
In file included from layer1/ButMode.cpp:17:
In file included from layer0/os_python.h:33:
In file included from /sw/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /sw/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /sw/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:
/sw/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning:
"Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

^
layer1/ButMode.cpp:175:7: error: use of undeclared identifier 'MenuActivate0Arg'
MenuActivate0Arg(G,x,y,x,y,false,"mouse_config");
^
1 warning and 1 error generated.

This is building against numpy 1.8.2, scipy 0.14.0 and python 2.7.8 from the fink. project.org. Pymol 1.7.2.0 builds without error against the same libraries.

1 Attachments

Discussion

  • Thomas Holder

    Thomas Holder - 2014-11-21

    works for me. The NumPy warnings are not the reason why it fails for you, but the undeclared 'MenuActivate0Arg'. Could there be a conflicting 'Menu.h' header file on your system? Also, if you intent to build an isolated fink version, make sure you set up an environment like this:

    export PATH=/sw/bin:/usr/bin:/bin
    export PREFIX_PATH=/sw:/usr:/usr/X11
    
     
  • Thomas Holder

    Thomas Holder - 2014-11-21

    Your system includes /sw/include/Menu.h, you have to remove the -I/sw/include between -Wstrict-prototypes and -D_PYMOL_LIBPNG

     
  • Jack Howarth

    Jack Howarth - 2014-11-21

    I would note that it is the setup.py in pymol that places -I/sw/include front of the -Ilayer4...

     try:
         prefix_path = os.environ['PREFIX_PATH'].split(os.pathsep)
     except KeyError:
         prefix_path = ["/usr", "/usr/X11", "/opt/local", "/sw"]
    

    The real problem would seem to be a header name collision between the menu.h header from ncurses in either /usr/include, /opt/local/include or /sw/include and the Menu.h header in layer4. This is an issue on Mac OS X because the default HFS filesystem is not case sensitive.

     
  • Jack Howarth

    Jack Howarth - 2014-11-21

    I think the real question is why setup.py isn't configured to insure that the includes in inc_dirs ends up in front of any includes set in prefix_path? Otherwise, any of the local source headers can be accidentally ignored in favor of one exposed in the includes of prefix_path.

     
  • Jack Howarth

    Jack Howarth - 2014-11-21

    Nevermind. It appears that we need to use...

    NoSetCPPFLAGS: true

    now in for pymol svn to build on fink. The setup.py script still appends -I/sw/include after the source code includes...

    gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -fwrapv -O3 -Wall -Wstrict-prototypes -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D_PYMOL_OPENGL_SHADERS -D_PYMOL_CGO_DRAWARRAYS -D_PYMOL_CGO_DRAWBUFFERS -D_PYMOL_GL_CALLLISTS -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -D_PYMOL_FREETYPE -DNO_MMLIBS -D_CGO_DRAWARRAYS -DOPENGL_ES_2 -D_PYMOL_NUMPY -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Imodules/cealign/src -Imodules/cealign/src/tnt -Ibuild/generated -Icontrib/uiuc/plugins/include -Icontrib/uiuc/plugins/molfile_plugin/src -I/sw/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/include/libxml2 -I/usr/X11/include -I/usr/X11/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libxml2 -I/sw/include -I/sw/include/freetype2 -I/sw/include/libxml2 -I/sw/include/python2.7 -c layer1/ButMode.cpp -o build/temp.macosx-10.10-x86_64-2.7/layer1/ButMode.o -Werror=implicit-function-declaration -Werror=declaration-after-statement -Wno-write-strings -Wno-unused-function -Wno-empty-body -Wno-char-subscripts -ffast-math -funroll-loops -O3 -fcommon

     
  • Thomas Holder

    Thomas Holder - 2014-11-21
    • status: open --> closed-invalid
     
  • Thomas Holder

    Thomas Holder - 2014-11-21

    closing since you figured it out

     

Log in to post a comment.