Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute paths in native_tool_toolchain result in "Can not copy" error #1218

Closed
kmARC opened this issue Jun 18, 2024 · 0 comments · Fixed by #1219
Closed

Absolute paths in native_tool_toolchain result in "Can not copy" error #1218

kmARC opened this issue Jun 18, 2024 · 0 comments · Fixed by #1219

Comments

@kmARC
Copy link

kmARC commented Jun 18, 2024

After commit bac2c19, when a system tool is registered as a native_tool_toolchain (like /usr/bin/make) then rules_foreign_cc tries to append the absolute path at the end of $EXT_BUILD_ROOT failing with the following error message.

Can not copy /.../execroot/...//usr/bin/make

Workaround: git revert bac2c19d (on top of current main as well as 0.10.0) resolves the issue.

An example BUILD file:

rules_foreign_cc_dependencies(
    native_tools_toolchains = [
        ":system_make_toolchain",
    ],
    register_built_tools = False,
    register_default_tools = False,
    register_preinstalled_tools = True,
)

native_tool_toolchain(
    name = "system_make",
    path = "/usr/bin/make",
)

toolchain(
    name = "system_make_toolchain",
    toolchain = ":system_make",
    toolchain_type = "@rules_foreign_cc//toolchains:make_toolchain",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant