Skip to content

Build failed on Mac OS X 10.9 #25

Closed
@yyuu

Description

@yyuu
Contributor

Continued from #22

By the report from @rnhmjoj, pyenv fails to build ssl module for CPython 3.3.2.

The full output of pyenv install -v 3.3.2 is at https://gist.github.com/Rnhmjoj/5875462

Activity

rnhmjoj

rnhmjoj commented on Jun 27, 2013

@rnhmjoj

@yyuu
You were probably right. The problem is another. I have just tried installing CPython 2.7 and failed.
I get ImportError: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?

yyuu

yyuu commented on Jun 27, 2013

@yyuu
ContributorAuthor

Which version of OS X are you using? Beta release of OS X 10.9??

Installing Python-3.3.2...
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0

My installation of OS X 10.7 has OpenSSL and SQLite3 at the following paths by default. How's about your system?

  • /usr/lib/libssl.dylib
  • /usr/include/openssl/ssl.h
  • /usr/lib/libsqlite3.dylib
  • /usr/include/sqlite3.h
rnhmjoj

rnhmjoj commented on Jun 27, 2013

@rnhmjoj

Yes, I am using 10.9.
I have the two dylib in /usr/lib but the include folder is not in /usr. 
I think is inside /Application/Xcode.app

yyuu

yyuu commented on Jun 27, 2013

@yyuu
ContributorAuthor

hmm, I've never tried Mavericks yet.

If there are no development headers on /usr/include or /usr/local/include, you can specify optional paths for these files via CFLAGS.

CFLAGS="-I/Application/Xcode.app/Contents/Developer/usr/include"
yyuu

yyuu commented on Jun 27, 2013

@yyuu
ContributorAuthor

brew might install formulas keg only if they are installed by default. You might need to set LDFLAGS and CFLAGS for some of keg-only formulas explicitly when building CPython.

CFLAGS="-I/Application/Xcode.app/Contents/Developer/usr/include -I$(brew --prefix openssl)/include -I(brew --prefix sqlite3)/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix sqlite3)/lib" pyenv install -v 3.3.2
rnhmjoj

rnhmjoj commented on Jun 27, 2013

@rnhmjoj

I found temporary fix. 
In OS X 10.9 there is a /usr/include for every SDK installed.
I made a symlink to the old path of include:
ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include/ /usr/include
and the installation succeeded.
Can you update pyenv to check for OS X 10.9 and set the correct flags?

yyuu

yyuu commented on Jun 27, 2013

@yyuu
ContributorAuthor

I don't like platform specific workaround in pyenv itself. But there is still a chance in custom pyenv plugin to hook before_install and set proper build flags for the OS X 10.9.

I'd like to keep track on this issue and see how other packaging tools for OS X deal with this.

rnhmjoj

rnhmjoj commented on Jun 27, 2013

@rnhmjoj

Have a look at this issue.

brent-hoover

brent-hoover commented on Jul 13, 2013

@brent-hoover

FWIW, I am seeing issues with building the exact same versions of Python on Mountain Lion, but I get a different error: File "", line 988, in get_code
ValueError: unmarshallable object

Have two different laptops with different configurations and both fail on just those versions of Python. 3.3.1 (being that its the current stable 3.x) is the big one there.

rnhmjoj

rnhmjoj commented on Jul 13, 2013

@rnhmjoj

@zenweasel I was trying to build CPython 3.3.2, not 3.3.1.
In my case the build failed because of the missing /usr/include in Mavericks. On Mountain Lion you should have this directory. I don't know whether the issue is the same, probably not.

yyuu

yyuu commented on Jul 14, 2013

@yyuu
ContributorAuthor

@zenweasel See #29

hovsater

hovsater commented on Oct 20, 2013

@hovsater

Yeah, this seems to be due to changes made in 10.9 to support multiple SDKs.

I successfully installed 3.3.2 by doing CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.3.2.

daenney

daenney commented on Nov 3, 2013

@daenney

I've had no compilation issues on Mavericks/10.9 when calling pyenv install 2.7 or pyenv install 3.3.2.

rnhmjoj

rnhmjoj commented on Nov 3, 2013

@rnhmjoj

@daenney I have just tried and it's working.
It seems that in the final release of Mavericks there is a /usr/include so @yyuu can close the issue now.

yyuu

yyuu commented on Nov 5, 2013

@yyuu
ContributorAuthor

Ok. Thanks for the confirmation 👍

3 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @yyuu@brent-hoover@leighmcculloch@hovsater@daenney

        Issue actions

          Build failed on Mac OS X 10.9 · Issue #25 · pyenv/pyenv