Skip to content
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

Binary fixes - sharp dependency #159

Merged
merged 2 commits into from
Dec 16, 2018
Merged

Binary fixes - sharp dependency #159

merged 2 commits into from
Dec 16, 2018

Conversation

guybedford
Copy link
Contributor

This fixes the issues described in #142, which turned out to be:

  1. Could not locate the bindings file. 0.21.1 issue, which was due to the bindings search happening from the id looking in pkg/lib/build of the path doing the require instead of the base pkg/build. Updated to use the package base path in the createBindings static implementation shim function.

  2. The shared library path missing error - Error: dlopen(/Users/jrdn/sharp-example/dist/sharp.node, 1): Library not loaded: @rpath/libvips-cpp.dylib. The problem here is that the rpath is hard-coded into the binary, so we need to ensure that where the binary is emitted and where the shared libraries are emitted ends up being the same relative path. This is done by emitting binaries based on the package path so we output build/Releases/binary.node instead of just binary.node in the output folder, and then similarly for the dynamic library emission we ensure the same folder structure.

@codecov-io
Copy link

Codecov Report

Merging #159 into master will increase coverage by 1.06%.
The diff coverage is 94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #159      +/-   ##
==========================================
+ Coverage    72.3%   73.37%   +1.06%     
==========================================
  Files          10       11       +1     
  Lines         473      492      +19     
==========================================
+ Hits          342      361      +19     
  Misses        131      131
Impacted Files Coverage Δ
src/loaders/node-loader.js 100% <100%> (ø) ⬆️
src/utils/dedupe-names.js 100% <100%> (ø) ⬆️
src/utils/get-package-base.js 100% <100%> (ø)
src/utils/sharedlib-emit.js 75% <81.81%> (ø) ⬆️
src/loaders/relocate-loader.js 93.15% <93.33%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7bc7a0...c754adf. Read the comment docs.

@rauchg rauchg merged commit d253fe6 into master Dec 16, 2018
@rauchg rauchg deleted the dylib-glob branch December 16, 2018 19:02
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.

3 participants