Skip to content

Executable not found while using toolchain with foreign_rules_cc #76

@todd-enf

Description

@todd-enf

While working to integrate a cross-compilation toolchain supported by bazel_embedded, I encountered issues where executing any of the compilation tools (gcc, ar, strip, etc.) would fail with "File or directory not found", when the wrapper script attempts to invoke the actual executable.

Digging into the issue a little more, I found that the wrapper scripts rely on a path relative to the "root" of the sandbox to call the executable themselves. The foreign_rules_cc (in particular the make rule), however changes it's execution directory to better support the make, etc. invocations, which then make the relative path included in the wrapper scripts invalid. This results in the given targets failing to compile.

Reproduction Steps:

Use a bazel_embedded toolchain against a make rule from the foreign_rules_cc toolchain.

Are there any known workarounds/solutions for such an issue?

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