[Nix-dev] Loading a shared object into the compiler at build time fails

Eric Merritt ericbmerritt at gmail.com
Mon Apr 27 21:03:43 CEST 2015


Guys,

 I am packaging up some ocaml projects and running into a problem. Certain
syntax extensions (bin_prot) include a *.so component that isn't getting
picked up. So when another package has that package as dependency it
doesn't build, because the code from that package gets loaded during build
time. Essentially, its a runtime extension of the compiler and the compiler
isn't using the correct paths.  So the problem is:

package A builds a *.so that needs to be loaded into the compiler.
package B depends on package A

When ocaml build B, then it fails because it can't load the *.so that is
part of A.

My suspicion is that I can use the Runtime Environment (
https://nixos.org/wiki/Nix_Runtime_Environment_Wrapper) wrapper to solve
this problem. Essentially wrapping the compiler in that script in the same
way that firefox does in the  example.

So my question is, is this the right way to handle this problem? Is there
some better way?

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150427/aed75784/attachment.html 


More information about the nix-dev mailing list