facebookresearch / torchbeast

A PyTorch Platform for Distributed RL
Apache License 2.0
734 stars 113 forks source link

link openssl library on Mac OS X when using Homebrew #9

Open aluscher opened 4 years ago

aluscher commented 4 years ago

With the latest Homebrew formula of openssl@1.1, it seems necessary to link the ssl library explicitly. After modifying setup.py as below, things work fine again.

...
if sys.platform == "darwin":
    extra_compile_args += ["-stdlib=libc++", "-mmacosx-version-min=10.14", "-I/usr/local/opt/openssl@1.1/include"]
    extra_link_args += ["-stdlib=libc++", "-mmacosx-version-min=10.14", "-L/usr/local/opt/openssl@1.1/lib"]

    # Relevant only when c-cares is not embedded in grpc, e.g. when
    # installing grpc via homebrew.
    libraries.append("cares")
    libraries.append("ssl")
...