Skip to content
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

aashish24 opened this issue May 2, 2015 · 5 comments

Fix travis pyexpat build time error #1263

aashish24 opened this issue May 2, 2015 · 5 comments


Copy link

@aashish24 aashish24 commented May 2, 2015

No description provided.

Copy link

@durack1 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):
   Command failed: 1
   'env' 'PYTHONPATH=' 'LD_LIBRARY_PATH=' '/Users/travis/build/PCMDI/_build/PCMDI_METRICS/bin/python' '' '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 "", line 17, in <module>
      exec(, 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/", line 11, in <module>
      from setuptools.extension import Extension
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/setuptools/", 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/", line 16, in <module>
      import pkg_resources
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/", line 706, in <module>
      class Environment(object):
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/", 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/", line 148, in get_supported_platform
      plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]),
    File "/Users/travis/build/PCMDI/_build/PCMDI_METRICS/tmp/uvcdat/uvcdat_build/build/setuptools/", 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/", 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/", 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/", 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/", 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/", line 4, in <module>
      from pyexpat import *
  ImportError: No module named pyexpat

Copy link

@durack1 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

Copy link

@durack1 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

Copy link

@doutriaux1 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.

Copy link

@durack1 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
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants