Skip to content

Exception uncaught by findlib when a package exists but the type_of_threads key is absent #185

Description

@palainp

Dear developers,
I recently attempted to update the ecosystem for compilation of qubes-mirage-firewall, but failed (see mirage/qubes-mirage-firewall#229 for context). To compile for this target, I understand that ocaml-solo5 uses empty META files (see #45). From what I understand, since ocaml/ocamlfind@aedee07, if package_property raises a Not_found exception (to my understanding, because the thread package exists from findlib’s perspective, but a key/some keys are missing from the META file), the exception is no longer caught (I think this is where my problem lies, but I haven’t yet looked into it in more detail). See ocaml/ocamlfind#99 for more details.
A minimal reproducible test:

$ ocamlfind -toolchain solo5 ocamlopt -version ;  \
printf 'type_of_threads = "posix"\n' > $OPAM_SWITCH_PREFIX/lib/ocaml-solo5/lib/threads/META ; \
ocamlfind -toolchain solo5 ocamlopt -version
Uncaught exception: Not_found
5.5.0

So the possible solutions would therefore be as follows: either there is a problem with my setup, and that uncaught exception shouldn’t happen; or we would need to add the minimum line to the thread’s META file instead of an empty file; or add a |Not_found to the try block in findlib. I’d tend to favour, if my installation is not broken, the last solution, as that was how it behaved before the latest patch at findlib, but I don’t know if my case is an isolated one.
/cc @shym @hannesm @dinosaure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions