New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix travis pyexpat build time error #1263

Closed
aashish24 opened this Issue May 2, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@aashish24
Contributor

aashish24 commented May 2, 2015

No description provided.

@durack1 durack1 added Build Bug labels May 14, 2015

@durack1

This comment has been minimized.

Member

durack1 commented Nov 5, 2015

@aashish24 the same issue has been hit in PCMDI/pcmdi_metrics#279 and hopefully will get a fix that can allow travis OS X build testing to be turned back on.. From where I'm up to with this, it looks like the inbuild python install has problems - this doesn't appear to be a problem with the travis system python2.7.5 or with a python2.7.10 that is pre-built before calling cmake.

This build failure looks like:

CMake Error at /Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/setuptools-prefix/src/setuptools-stamp/setuptools-build.cmake:56 (message):
  CTEST_FULL_OUTPUT
   Command failed: 1
   'env' 'PYTHONPATH=' 'LD_LIBRARY_PATH=' '/Users/travis/build/PCMDI/_build/PCMDI_METRICS/bin/python' 'setup.py' 'build'
   From /Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/setuptools-prefix/src/setuptools-stamp/setuptools-build-out.log
  -------------------------------------------------
  -------------------------------------------------
   From /Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/setuptools-prefix/src/setuptools-stamp/setuptools-build-err.log
  -------------------------------------------------
  Traceback (most recent call last):
    File "setup.py", line 17, in <module>
      exec(init_file.read(), command_ns)
    File "<string>", line 8, in <module>
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcd-- [download 31% complete]
at/uvcdat_build/build/setuptools/setuptools/__init__.py", line 11, in <module>
      from setuptools.extension import Extension
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/setuptools/extension.py", line 5, in <module>
      from setuptools.dist import _get_unpatched
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/setuptools/dist.py", line 16, in <module>
      import pkg_resources
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/pkg_resources.py", line 706, in <module>
      class Environment(object):
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/pkg_resources.py", line 709, in Environment
      def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/pkg_resources.py", line 148, in get_supported_platform
      plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3))
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/pkg_resources.py", line 241, in _macosx_vers
      version = platform.mac_ver()[0]
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 809, in mac_ver
      info = _mac_ver_xml()
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 786, in _mac_ver_xml
      pl = plistlib.readPlist(fn)
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
      rootObject = p.parse(pathOrFile)
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 401, in parse
      from xml.parsers.expat import ParserCreate
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
      from pyexpat import *
  ImportError: No module named pyexpat
@durack1

This comment has been minimized.

Member

durack1 commented Nov 5, 2015

@aashish24 just FYI - it seems that our UV-CDAT build environment is causing the problem with the above - an outside build of python2.7.10 along with setuptools1.4 & 18.5 install works fine.. So it seems just the python built by cmake has the problems on travis - for the step by step of testing take a peek at https://github.com/PCMDI/pcmdi_metrics/pull/285/files

@durack1

This comment has been minimized.

Member

durack1 commented Nov 11, 2015

@aashish24 @doutriaux1 it appears adding --with-system-expat to the Python build statement within the UV-CDAT build system fixes this issue.. BUT there are a bunch of other problems that are also being triggered by the cmake build environment that should really be checked.. I would imagine that a slight tweak to the build environment would solve all the reported warnings in the OS X build logs on travis

@aashish24 can you take a look at this, the --with-system-expat seems a kludge to get back the green travis badges..

The full suite of tests tried to solve this can be found at PCMDI/pcmdi_metrics#285

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Nov 12, 2015

@aashish24 or @jbeezley I think it's worth having someone from Kitware take a look at these. In the mean time I will push an official PR to get the kludge into UV-CDAT.

@durack1

This comment has been minimized.

Member

durack1 commented Nov 12, 2015

@doutriaux1 already done #1674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment