mloberg / puppet-python

Mange Python with Boxen and pyenv
MIT License
20 stars 21 forks source link

Python 2.7.8 fails to install because of missing zlib extension #19

Open dkowis opened 9 years ago

dkowis commented 9 years ago

puppet config is the same as #18:

output:

Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Downloading readline-6.3.tar.gz...
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: -> http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Installing readline-6.3...
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Installed readline-6.3 to /opt/boxen/pyenv/versions/2.7.8
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Downloading Python-2.7.8.tgz...
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: -> https://yyuu.github.io/pythons/74d70b914da4487aa1d97222b29e9554d042f825f26cb2b93abd20fdda56b557
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Installing Python-2.7.8...
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: ERROR: The Python zlib extension was not compiled. Missing the zlib?
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Please consult to the Wiki page to fix the problem.
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: https://github.com/yyuu/pyenv/wiki/Common-build-problems
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: BUILD FAILED (OS X 10.10.3 using python-build 20141118)
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Inspect or clean up the working tree at /tmp/python-build.20150701141332.85386
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Results logged to /tmp/python-build.20150701141332.85386.log
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: Last 10 log lines:
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: (cd /opt/boxen/pyenv/versions/2.7.8/bin; ln -s python2-config python-config)
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: test -d /opt/boxen/pyenv/versions/2.7.8/lib/pkgconfig || /usr/bin/install -c -d -m 755 /opt/boxen/pyenv/versions/2.7.8/lib/pkgconfig
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: rm -f /opt/boxen/pyenv/versions/2.7.8/lib/pkgconfig/python2.pc
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: (cd /opt/boxen/pyenv/versions/2.7.8/lib/pkgconfig; ln -s python-2.7.pc python2.pc)
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: rm -f /opt/boxen/pyenv/versions/2.7.8/lib/pkgconfig/python.pc
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: (cd /opt/boxen/pyenv/versions/2.7.8/lib/pkgconfig; ln -s python2.pc python.pc)
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: rm -f /opt/boxen/pyenv/versions/2.7.8/share/man/man1/python2.1
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: (cd /opt/boxen/pyenv/versions/2.7.8/share/man/man1; ln -s python2.7.1 python2.1)
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: rm -f /opt/boxen/pyenv/versions/2.7.8/share/man/man1/python.1
Notice: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: (cd /opt/boxen/pyenv/versions/2.7.8/share/man/man1; ln -s python2.1 python.1)
Error: /opt/boxen/pyenv/bin/pyenv install --skip-existing 2.7.8 returned 1 instead of one of [0]
Error: /Stage[main]/People::Dkowis::Pythons/Python::Version[2.7.8]/Exec[python-install-2.7.8]/returns: change from notrun to 0 failed: /opt/boxen/pyenv/bin/pyenv install --skip-existing 2.7.8 returned 1 instead of one of [0]
dkowis commented 9 years ago

This one appears to be the problem listed as the CFLAGS stuff mentioned in #12

dkowis commented 9 years ago

and it looks like I can fix this with the CFLAGS in hieradata, but I'm not sure if it'll merge with the existing CFLAGS? How does that part work? (I think this would solve my 2.7.8 installing issue.)

dkowis commented 9 years ago

I tried this hiera file in my boxen repo: hiera/Darwin/10.10.yaml:

dxk0875-mbp-dtc:hiera dxk0875$ cat Darwin/10.10.yaml
python::version::env:
  Darwin:
    CFLAGS: "-I%{::homebrew::config::installdir}/include -I/opt/X11/include -I$(xcrun --show-sdk-path)/usr/include -march=core2 -O3"

This did not solve the problem :( I assume I'm doing it wrong and the shell expansion isn't the right way to do this...

mloberg commented 9 years ago

@dkowis I am unable to reproduce this on my machine, but I'm still trying to dig into it. For the xcrun expansion, I would try using the full path to xcrun. If that doesn't work. There is a close PR that includes a fact for the xcrun sdk path that I could add, so you can get that by using a fact. Let me know if the full path doesn't work for you.

dkowis commented 9 years ago

I actually used the full path to the result of the run rather than running the command anyway. Like I evaluated it and then put that in my 10.10.yaml file.

Is there anything else I could do to help you debug it on my end? It happens reliably every time heh.

ogenstad commented 9 years ago

Are there any updates on this issue? I'm seeing the same thing.