ocamlPackages: init a bunch of libraries for the MirageOS xen target#118066
Conversation
518d02f to
c2344a4
Compare
|
@ofborg build ocamlPackages.mirage-net-xen ocamlPackages.mirage-bootvar-xen |
|
Result of 1 package marked as broken and skipped:
53 packages skipped due to time constraints:
36 packages built successfully:
Result of 18 packages marked as broken and skipped:
7 packages failed to build:26 packages skipped due to time constraints:
33 packages built successfully:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
There was a problem hiding this comment.
Hmm normally we keep prefix and friends? And prefix is set to $out by default as a best effort.
I went into the rabbit hole a bit, looking at ocaml/dune#1253 and linked issues like:
- Get rid of calls to opam when using opam mirage/mirage-solo5#61
installsubcommand design ocaml/dune#680- Sites, locations, relocation ocaml/dune#3104
It looks like perhaps the pieces are there and those issues can be resolved?
There was a problem hiding this comment.
Oh right, I completely forgot about that. I quickfixed this on a local branch and was meaning to follow up. I'll see what this is all about :)
There was a problem hiding this comment.
The issue boils down to the following: The pkg config file in the repository has been manually created and assumes the default relation between dune's prefix and libdir (which would be "${prefix}/lib" for the latter). However for ocamlPackages we install libraries into a version specific site-lib, so that doesn't work out.
This is probably fixable in mirage-xen's build system, but they probably have little interest in fixing that before the upcoming rework.
There was a problem hiding this comment.
Should be better now!
|
mirage/mirage#969 mirage/mirage#1195 also make me begin to understand the pkg-config might duplicate functionality for the OCaml -> OCaml case (vs OCaml -> C or C -> OCaml case), and why they thus might want to get rid of it. |
Yep, I talked to them on IRC and basically they want to use |
c2344a4 to
10547c5
Compare
|
I don’t understand why the |
The location of the .pc files is OCaml-specific unfortunately, but I don't think we'll need this in the long term (since MirageOS 4 promises to get rid of pkg-config), so I think I'll move it into an |
Unfortunately this requires a bit of trickery with pkg-config to get to work. The root issue is that the mirage-xen assumes that we use the default libdir of dune ($out/lib) whereas we install to an OCaml version-specific site-lib directory. Thus the manually created pkg-config file makes wrong assumptions (which warrants a patch) and the .pc file is installed to the wrong location (which is fixed with a mv invocation).
10547c5 to
4f7a661
Compare
|
I believe, I've cleaned this up now: We don't need a new setup hook or the likes, we can just install the |
|
Was waiting for you to say you think it's ready. LGTM! |
Motivation for this change
#23955
cc @Ericson2314 as well, I'd love to hear your thoughts on the
pkg-configspecific changes to thefindlibsetup hook.Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)