Skip to content

Inconsistent ability to build cargo on OS X #3037

@ehiggs

Description

@ehiggs

Issue #2295 reported a link error on OS X due to OpenSSL being installed by brew. The fix is to define the following variables:

export OPENSSL_ROOT_DIR=$(brew --prefix openssl)
export OPENSSL_LIB_DIR=$(brew --prefix openssl)"/lib"
export OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)"/include"

However, even this gives spotty results. I find that with these variables defined, I still get link errors to openssl symbols maybe 4/5 times. And sometimes it works.

The link errors are:

  = note: Undefined symbols for architecture x86_64:
  "_EVP_aes_256_ctr", referenced from:
      _libssh2_crypt_method_aes256_ctr in liblibssh2_sys-5b58702936280067.rlib(crypt.c.o)
     (maybe you meant: __libssh2_EVP_aes_256_ctr)
  "_EVP_aes_192_ctr", referenced from:
      _libssh2_crypt_method_aes192_ctr in liblibssh2_sys-5b58702936280067.rlib(crypt.c.o)
     (maybe you meant: __libssh2_EVP_aes_192_ctr)
  "_EVP_aes_128_ctr", referenced from:
      _libssh2_crypt_method_aes128_ctr in liblibssh2_sys-5b58702936280067.rlib(crypt.c.o)
     (maybe you meant: __libssh2_EVP_aes_128_ctr)
ld: symbol(s) not found for architecture x86_64
$ uname -a
Darwin myhostname 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
$ brew info openssl| head -1
openssl: stable 1.0.2h (bottled) [keg-only]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions