[Nix-dev] Loading a shared object into the compiler at build time fails
Eric Merritt
ericbmerritt at gmail.com
Mon Apr 27 22:42:00 CEST 2015
Thanks all of you. I added the following to my dependee (bin_prot) and it
worked nicely.
setupHook = writeText "setupHook.sh" ''
export
CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/bin_prot/"
'';
On Mon, Apr 27, 2015 at 12:37 PM, Vladimír Čunát <vcunat at gmail.com> wrote:
> On 04/27/2015 09:14 PM, Vincent Laporte wrote:
> > Le 2015-04-27 21:08, Vladimír Čunát a ēcrit :
> >> On 04/27/2015 09:03 PM, Eric Merritt wrote:
> >>> When ocaml build B, then it fails because it can't load the *.so
> >>> that is part of A.
> >
> >> That all seems to boil down to the question: how are those
> >> so-files searched for? (by the ocaml compiler, I guess, or by
> >> what?)
> >
> > The compiler looks in the colon-separated list of directories given in
> > the CAML_LD_LIBRARY_PATH environment variable.
>
> If that pattern recurs in ocaml-built packages, I'd expect the compiler
> to define an envHook to automatically extend that variable by build
> inputs containing such modules. We have already a few very similar cases
> in nixpkgs, e.g.:
>
>
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/logic/coq/default.nix#L50
>
>
> Vladimir
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150427/f99cbdda/attachment.html
More information about the nix-dev
mailing list