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

runnable_binary is not usable in genrule #1329

Open
snakethatlovesstaticlibs opened this issue Nov 26, 2024 · 0 comments
Open

runnable_binary is not usable in genrule #1329

snakethatlovesstaticlibs opened this issue Nov 26, 2024 · 0 comments

Comments

@snakethatlovesstaticlibs

I have a python interpreter being built from source:

configure_make(
    name = "python3",
    ...

which is then used in a runnable_binary rule:

runnable_binary(
    name = "python_binary",
    binary = "python3",
    foreign_cc_target = "python3",
    visibility = ["//visibility:public"],
)

however, if I want to use the runnable binary in this genrule

genrule(
    name = "repro",
    cmd = "$(location :python_binary) -c 'from locale import localeconv; localeconv()' > $@",
    srcs = [":python_binary"],
    outs = ["thing.txt"],
)

I get the classic in cmd attribute of genrule rule @@python3.13.0//:repro: label '@@python3.13.0//:python_binary' in $(location) expression expands to more than one file, please use...

Is there a known workaround for this?

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

No branches or pull requests

1 participant