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

slack: add libs to runtime #24687

Closed
wants to merge 1 commit into from
Closed

slack: add libs to runtime #24687

wants to merge 1 commit into from

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Apr 6, 2017

Allow slack to load all the libraries dynamically as well

Motivation for this change

Fixes #24685 with a shotgun approach.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Allow slack to load all the libraries dynamically as well
@mention-bot
Copy link

@zimbatm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @greyson, @fooblahblah and @abbradar to be potential reviewers.

@@ -73,7 +73,8 @@ in stdenv.mkDerivation {

# Fix the symlink
rm $out/bin/slack
ln -s $out/lib/slack/slack $out/bin/slack
makeWrapper $out/lib/slack/slack $out/bin/slack \
--set LD_LIBRARY_PATH ${rpath}
Copy link
Member

@Mic92 Mic92 Apr 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always thought, that LD_LIBRARY_PATH and rpath in the elf file have the same semantic. Maybe the rpath is stripped afterwards in the fixupPhase. Have you tried moving patchelf to postFixup?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The slack binary itself doesn't have libxkbfile.so as a dependency. Wouldn't the path to libkbfile be removed from the rpath in that case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zimbatm It wouldn't if you set dontPatchELF = true or do your patching in postFixup (I personally prefer the former). It is trimmed by patchelf --shrink-rpath in the fixup phase.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I guess --set as opposed to addition means that OpenGL drivers are not found. It is an Electron application, so it would use GPU to offload part of the rendering, right?

@zimbatm
Copy link
Member Author

zimbatm commented May 5, 2017

I stopped having issues with the latest master so that can be closed. dontPatchELF seems like a better route and I will keep that in mind if I get issues again.

@zimbatm zimbatm closed this May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants