[Nix-dev] Patching bundled shared objects

Bryan Gardiner bog at khumba.net
Thu Sep 10 07:21:44 CEST 2015


I'm hoping the esteemed nix-dev list can give me some advice.  I'm
working on fixing the Jitsi binary package, since it fails to be
usable for audio calls, being unable to find Pulse, among other
things[1].  So fine, I need to set the RPATH, but it seems I have to
patch the .so files individually.  (Is that because this is a Java
program?  I have the same issue in my binary Scilab 5 PR.)  Running
ldd on all of the shipped .so files shows that there are lots of them
that depend on various system libraries here and there inconsistenly
(libjawt, libstdc++, X, libssl, a few others).

I'm wondering what the preferred approach is for handling this.  I can
see a few ways:

- lib.makeLibraryPath for each .so and patchelf it, tedious.

- lib.makeLibraryPath one large path and patchelf all objects to use
  it, easiest but more than necessary.

- Even better, is there a function I can pass a list of deps to and it
  will patch .so files with missing deps automagically?

It would be nice to build these bundled .so's from scratch, but that's
potentially a much bigger task.

Thanks in advance,
Bryan

[1] https://github.com/NixOS/nixpkgs/issues/3482
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150909/275d03e2/attachment.bin 


More information about the nix-dev mailing list