Skip to content

Add check for OpenSSL on OS X before starting the language service #264

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

Closed
daviwil opened this issue Aug 25, 2016 · 11 comments
Closed

Add check for OpenSSL on OS X before starting the language service #264

daviwil opened this issue Aug 25, 2016 · 11 comments
Labels
Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@daviwil
Copy link
Contributor

daviwil commented Aug 25, 2016

The extension should check for the existence of OpenSSL on OS X before starting the language service. If it cannot be found, the user should be directed to the documentation which guides them through the OpenSSL installation.

One way to check for existence could be to test for the existence of /usr/local/opt/openssl

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Aug 25, 2016
@daviwil daviwil added this to the Backlog milestone Aug 25, 2016
@MarlonRodriguez
Copy link

That check on the path only works if you are using homebrew. For MacPorts:

ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/

fixes it.

@daviwil daviwil modified the milestones: 0.7.2, Backlog Sep 1, 2016
@daviwil
Copy link
Contributor Author

daviwil commented Sep 2, 2016

Thanks a lot @MarlonRodriguez! I'll include your fix in the troubleshooting notes.

daviwil added a commit that referenced this issue Sep 2, 2016
This change adds a check when the extension initializes to verify
whether the machine has OpenSSL installed when running on OS X.  This is
currently a requirement of PowerShell which must be met before
PowerShell Editor Services can be started.  If the proper library paths
are not detected, a message is shown to the user which leads them to
documentation on how to install OpenSSL.
@daviwil daviwil mentioned this issue Sep 2, 2016
@adbertram
Copy link
Contributor

It'd be nice if a link to some instructions on how to resolve this were added to the notification as well.

@daviwil
Copy link
Contributor Author

daviwil commented Sep 4, 2016

That's what the "Show Documentation" button on the notification does, did it not show up for you?

@adbertram
Copy link
Contributor

I'm blind. Thanks but I had originally installed it. It wasn't until I
updated again to this latest version that I saw that popup and Intellisense
isn't working.
When I run brew install openssl I get:

openssl-1.0.2h_1 already installed

On Sun, Sep 4, 2016 at 5:38 PM, David Wilson [email protected]
wrote:

That's what the "Show Documentation" button on the notification does, did
it not show up for you?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#264 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEG3-h7aVQiG6so4vrUypmzoAf-PU98tks5qm0hSgaJpZM4JtZk_
.

@daviwil
Copy link
Contributor Author

daviwil commented Sep 6, 2016

Interesting, @RamblingCookieMonster mentioned the same thing to me yesterday. If you follow the steps in the documentation page about creating symbolic links it should fix the problem for you.

Quick question before you do that though: was IntelliSense working for you without a problem on OS X before the latest update? Maybe I'm checking the incorrect path for Brew's install of OpenSSL.

@RamblingCookieMonster
Copy link

RamblingCookieMonster commented Sep 6, 2016

@adbertram try this (probably a way to script this out, but, a bit busy, sorry!):

  • brew info openssl
  • Pick out the path to the latest, e.g. /usr/local/Cellar/openssl/1.0.2h_1 - find /usr/local/Cellar -name libssl.1.0.0.dylib might also work.
  • Create links mentioned above.

Example:

ln -s /usr/local/Cellar/openssl/1.0.2h_1/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/Cellar/openssl/1.0.2h_1/lib/libssl.1.0.0.dylib /usr/local/lib/

Doesn't seem sustainable though, cleanups happen, and this links to a version-specific (i.e. likely temporal) file.

Cheers!

@adbertram
Copy link
Contributor

Thanks @RamblingCookieMonster! That did it.

@adbertram
Copy link
Contributor

@daviwil Yes. This was working fine before I updated.

@daviwil
Copy link
Contributor Author

daviwil commented Sep 8, 2016

Damn, so apparently my path check gave a false negative for Homebrew installs... I'll need to look into that.

@daviwil
Copy link
Contributor Author

daviwil commented Sep 8, 2016

Tracking the false negative problem here: #286. Thanks Adam!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

4 participants