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?
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 themake
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 amake
rule from theforeign_rules_cc
toolchain.Are there any known workarounds/solutions for such an issue?