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

Build failed on Mac OS X 10.9 #25

Closed
yyuu opened this Issue Jun 27, 2013 · 16 comments

Comments

Projects
None yet
6 participants
@yyuu
Collaborator

yyuu commented Jun 27, 2013

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

@rnhmjoj

This comment has been minimized.

Show comment
Hide comment
@rnhmjoj

rnhmjoj Jun 27, 2013

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

rnhmjoj commented Jun 27, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@yyuu

yyuu Jun 27, 2013

Collaborator

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
Collaborator

yyuu commented Jun 27, 2013

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

This comment has been minimized.

Show comment
Hide comment
@rnhmjoj

rnhmjoj Jun 27, 2013

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

rnhmjoj commented Jun 27, 2013

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

This comment has been minimized.

Show comment
Hide comment
@yyuu

yyuu Jun 27, 2013

Collaborator

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"
Collaborator

yyuu commented Jun 27, 2013

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

This comment has been minimized.

Show comment
Hide comment
@yyuu

yyuu Jun 27, 2013

Collaborator

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
Collaborator

yyuu commented Jun 27, 2013

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

This comment has been minimized.

Show comment
Hide comment
@rnhmjoj

rnhmjoj Jun 27, 2013

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?

rnhmjoj commented Jun 27, 2013

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

This comment has been minimized.

Show comment
Hide comment
@yyuu

yyuu Jun 27, 2013

Collaborator

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.

Collaborator

yyuu commented Jun 27, 2013

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

This comment has been minimized.

Show comment
Hide comment
@rnhmjoj

rnhmjoj Jun 27, 2013

Have a look at this issue.

rnhmjoj commented Jun 27, 2013

Have a look at this issue.

@zenweasel

This comment has been minimized.

Show comment
Hide comment
@zenweasel

zenweasel Jul 13, 2013

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.

zenweasel commented Jul 13, 2013

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

This comment has been minimized.

Show comment
Hide comment
@rnhmjoj

rnhmjoj Jul 13, 2013

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

rnhmjoj commented Jul 13, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@yyuu

yyuu Jul 14, 2013

Collaborator
Collaborator

yyuu commented Jul 14, 2013

@KevinSjoberg

This comment has been minimized.

Show comment
Hide comment
@KevinSjoberg

KevinSjoberg Oct 20, 2013

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.

KevinSjoberg commented Oct 20, 2013

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

This comment has been minimized.

Show comment
Hide comment
@daenney

daenney Nov 3, 2013

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

daenney commented Nov 3, 2013

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

@rnhmjoj

This comment has been minimized.

Show comment
Hide comment
@rnhmjoj

rnhmjoj Nov 3, 2013

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

rnhmjoj commented Nov 3, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@yyuu

yyuu Nov 5, 2013

Collaborator

Ok. Thanks for the confirmation 👍

Collaborator

yyuu commented Nov 5, 2013

Ok. Thanks for the confirmation 👍

@yyuu yyuu closed this Nov 5, 2013

@leighmcculloch

This comment has been minimized.

Show comment
Hide comment
@leighmcculloch

leighmcculloch Nov 16, 2013

The final release with the latest XCode doesn't have /usr/include. But there is an easy fix by changing your import to #import <sqlite3.h>. The compiler will automatically reference the header contained in the SDK your compiling against and there's no need to reference the SDK specifically or do any hacks like that.

leighmcculloch commented Nov 16, 2013

The final release with the latest XCode doesn't have /usr/include. But there is an easy fix by changing your import to #import <sqlite3.h>. The compiler will automatically reference the header contained in the SDK your compiling against and there's no need to reference the SDK specifically or do any hacks like that.

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