collective / buildout.python

Buildout all the Pythons
109 stars 47 forks source link

Build problems on macOS 10.13 #64

Closed hannosch closed 7 years ago

hannosch commented 7 years ago

Similar to #49, I've had some minor problems when building on macOS 10.13 (High Sierra). I've added basic support and @fschulze thankfully fixed one of my mistakes :)

In my case in addition to openssl not being found by default, now also sqlite and zlib headers can't be found. I've installed openssl, openssl@1.1, sqlite and zlib via Homebrew and than added these bits to my local.cfg (I'm not building Python versions before 2.7 anymore):

[python-2.7-build:default]
environment =
    LDFLAGS=-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib
    CPPFLAGS=-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include -I/usr/local/opt/sqlite/include

[python-3.4-build:default]
environment =
    LDFLAGS=-L/usr/local/opt/openssl/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib
    CPPFLAGS=-I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include -I/usr/local/opt/sqlite/include

[python-3.5-build:default]
environment =
    LDFLAGS=-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/sqlite/lib
    CPPFLAGS=-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include -I/usr/local/opt/sqlite/include

And then the same environment section using openssl@1.1 for python-3.6-build:default and python-3.7-build:default.

I'm not building PIL, but that also seems to have trouble finding various dependencies.

If others encounter problems, or think we should put some of these environments into the default templates, please speak up :)

hannosch commented 7 years ago

One more oddity: I had updated to Xcode 9 and the Command Line Tools (macOS Sierra version 10.12) for Xcode before upgrading the OS itself.

Afterwards software update didn't show any updates. But calling xcode-select --install manually prompted another installation and I now have Command Line Tools (macOS High Sierra version 10.13) for Xcode installed. The 'Updates' tab in the App Store app shows both entries now:

app-store-macos-10-13

hannosch commented 7 years ago

This no longer seems to be a problem. Maybe this was fixed via XCode 9.0.1 and the accompanying command line utilities update. Make sure you run xcode-select --install once to ensure you have the most recent utils and have accepted the EULA.