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

fpack failing to dynamically link libssl #127

Closed
Schmavery opened this issue Sep 10, 2018 · 7 comments
Closed

fpack failing to dynamically link libssl #127

Schmavery opened this issue Sep 10, 2018 · 7 comments
Assignees

Comments

@Schmavery
Copy link

Schmavery commented Sep 10, 2018

Just tried the latest release (0.6.0) on my mac (Sierra) and got the following error:

avery@local $ ./node_modules/fpack/fpack --help
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/avery/git/bs-recharts/./node_modules/fpack/fpack
  Reason: image not found
Abort trap: 6

Looks like it was maybe compiled against a non-standard location of libssl (like that installed by homebrew)? Or maybe it was statically linked in previous releases..
I do have a version of libssl at /usr/lib/libssl.dylib but it's version 0.9.8 so using install_name_tool to rewrite the dep didn't work.

If we need something special installed maybe we can add it to the README but the previous release didn't seem to need it on this machine fwiw.
Thanks!

@zindel zindel self-assigned this Sep 11, 2018
@zindel
Copy link
Member

zindel commented Sep 11, 2018

@Schmavery Thanks for the report! Indeed, it is built against the homebrew version of the lib. I'll be reworking the release process soon. Let me try fixing this in the next patch release.

@zindel
Copy link
Member

zindel commented Sep 21, 2018

@Schmavery took some time, but should be fixed in fpack@0.6.4. Could you try it plz?

@Schmavery
Copy link
Author

@zindel Thanks for following up, it seems like there may still be a problem.

13:18:09 avery@local:~/git/bs-recharts (master)$ rm -rf node_modules/fpack
13:18:16 avery@local:~/git/bs-recharts (master)$ npm i fpack@0.6.4

> fpack@0.6.4 postinstall /Users/avery/git/bs-recharts/node_modules/fpack
> node postinstall.js

@ahrefs/bs-recharts@0.2.1 /Users/avery/git/bs-recharts
└── fpack@0.6.4

13:18:31 avery@local:~/git/bs-recharts (master)$ ./node_modules/fpack/fpack --help
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/avery/git/bs-recharts/./node_modules/fpack/fpack
  Reason: image not found
Abort trap: 6
13:18:40 avery@local:~/git/bs-recharts (master)$ otool -L ./node_modules/fpack/fpack
./node_modules/fpack/fpack:
        /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)

Do you get different output from otool on your version of the binary?

@zindel
Copy link
Member

zindel commented Sep 23, 2018

@Schmavery you're right. The otool gives me the same output. Actually, I hoped that when we move the release process from my local laptop to CI (Azure Pipelines), it is going to fix it (i.e. the build will happen on the "vanilla" MacOS). Naively, I see two ways of fixing it:

  • make sure to uninstall openssl using brew at build time (going to try it right now)
  • pass specific link flags on MacOS to make sure to link with system libraries

Any ideas, how we can do better? CC @andreypopp

@zindel
Copy link
Member

zindel commented Sep 23, 2018

Nevermind. Found the problem & solution! Will publish the release in next 30 mins or so

@zindel
Copy link
Member

zindel commented Sep 23, 2018

@Schmavery I hope it is fixed this time. Please try fpack@0.6.5.

~/ocaml/fpack $ otool -L vendor-darwin/fpack.exe
vendor-darwin/fpack.exe:
        /usr/lib/libssl.35.dylib (compatibility version 36.0.0, current version 36.0.0)
        /usr/lib/libcrypto.35.dylib (compatibility version 36.0.0, current version 36.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
~/ocaml/fpack $ npm publish
+ fpack@0.6.5

@Schmavery
Copy link
Author

Sorry for the delay, seems to work on 0.6.5. Thanks!

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

No branches or pull requests

2 participants