Skip to content

Use static libssh2_config.h on MacOS builds#1569

Merged
implausible merged 8 commits into
nodegit:masterfrom
emmax86:fix/do-not-use-system-openssl-macos
Oct 19, 2018
Merged

Use static libssh2_config.h on MacOS builds#1569
implausible merged 8 commits into
nodegit:masterfrom
emmax86:fix/do-not-use-system-openssl-macos

Conversation

@emmax86
Copy link
Copy Markdown
Collaborator

@emmax86 emmax86 commented Oct 16, 2018

Background:

Per the discussion in #1566, we are opting to use a static libssh2_config.h for MacOS builds.

tl;dr: The libssh2_config.h header file is generated as a side effect of running vendor/libssh2/configure, and necessary for libssh2 to build. The script it is trying to use the system headers to compile and test dynamic links to OpenSSL from libssh2. Node already these headers and links for us, or we provide our own (in the case of Electron). The configured header is safe and stable to provide statically.

Summary of Changes

  • Add a new directory in vendor called static_config. This is where statically provided configurations for our vendored dependencies will be found.
  • Move openssl_distributions.json into vendor/static_config. Also updated the related utility scripts to use this location.
  • Move vendor/libssh2/win32 files into vendor/static_config/libssh2/win32.
  • Add vendor/darwin/libssh2_config.h.
  • Copy win32 or darwin directories from vendor/static_config/libssh2 into vendor/libssh2 during the Configure Libssh2 build step.
  • Add vendor/libssh2/darwin to the include_dirs for MacOS builds of libssh2. (Windows already did this respective action).

@emmax86 emmax86 force-pushed the fix/do-not-use-system-openssl-macos branch from 95cd77b to 23b98da Compare October 17, 2018 16:43
@implausible implausible merged commit 724c567 into nodegit:master Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants