Skip to content

The libexec variable doesn't expand to the host-context library in case of cross-compilation #4057

@TheLortex

Description

@TheLortex

Expected Behavior

As documented, the libexec variable should expand to the file from the host build context in case of cross-compilation.

Actual Behavior

Using libexec in a cross-compilation setup fails to find the requested library even if it's available in the host context.

Reproduction

With dune master branch, dune build lib/host-config fails on this example:
https://github.com/TheLortex/dune-libexec-bug

By the way this bug is acknowledged in the source code, dune_rules/expander.ml:

(* TODO: The [exec = true] case is currently not handled correctly and
         does not match the documentation. *)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions