i'm on: osx 10.11.6, homebrew version 0.9.9m openssl 0.9.8zg 14 july 2015
i'm trying play with dotnetcore , following instructions,
i've upgraded/installed latest version of openssl:
> brew install openssl ==> downloading https://homebrew.bintray.com/bottles/openssl-1.0.2h_1.el_capitan.bottle.tar.gz downloaded: /users/administrator/library/caches/homebrew/openssl-1.0.2h_1.el_capitan.bottle.tar.gz ==> pouring openssl-1.0.2h_1.el_capitan.bottle.tar.gz ==> caveats ca file has been bootstrapped using certificates system keychain. add additional certificates, place .pem files in /usr/local/etc/openssl/certs , run /usr/local/opt/openssl/bin/c_rehash formula keg-only, means not symlinked /usr/local. apple has deprecated use of openssl in favor of own tls , crypto libraries there no consequences of you. if build own software , requires formula, you'll need add build variables: ldflags: -l/usr/local/opt/openssl/lib cppflags: -i/usr/local/opt/openssl/include
but when try link openssl continue run linking error:
> brew link --force openssl warning: refusing link: openssl linking keg-only openssl means may end linking against insecure, deprecated system version while using headers homebrew version. instead, pass full include/library paths compiler e.g.: -i/usr/local/opt/openssl/include -l/usr/local/opt/openssl/lib
the option include compiler flags doesn't make sense me, since i'm not compiling these libraries i'm dependent on.
edit dotnetcore has updated instructions:
brew update brew install openssl ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
as update other answer suggests, workaround of installing old openssl101 brew no longer work. right-now workaround, see this comment on dotnet/cli#3964.
the relevant part of issue copied here:
i looked other option suggested setting rpath on library. think following better solution effect specific library.
sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/microsoft.netcore.app/1.0.0/system.security.cryptography.native.dylib
and/or if have netcore 1.0.1 installed perform same command 1.0.1 well:
sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/microsoft.netcore.app/1.0.1/system.security.cryptography.native.dylib
in effect, rather telling operating system use homebrew version of ssl , potentially causing break, we're telling dotnet how find correct library.
also importantly, looks microsoft aware of issue , and have both a) immediate plan mitigate b) long-term solution (probaby bundling openssl dotnet).
another thing note: /usr/local/opt/openssl/lib
brew linked default:
13:22 $ ls -l /usr/local/opt/openssl lrwxr-xr-x 1 ben admin 26 may 15 14:22 /usr/local/opt/openssl -> ../cellar/openssl/1.0.2h_1
if whatever reason install brew , link in different location, path 1 should use rpath.
once you've update rpath of system.security.cryptography.native.dylib libray, you'll need restart interactive session (i.e., close console , start one).
Comments
Post a Comment