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

Build rules_perl for ppc64le. #74

Open
Sunidhi-Gaonkar1 opened this issue Jan 8, 2025 · 2 comments
Open

Build rules_perl for ppc64le. #74

Sunidhi-Gaonkar1 opened this issue Jan 8, 2025 · 2 comments

Comments

@Sunidhi-Gaonkar1
Copy link

Hello team,
We are working on building ray on Power architecture and it has a dependency on rules_perl. There is no perl tarball released for Power by relocatable_perl.
Is there a way to use system installed perl instead of fetching it from relocatable_perl? Any pointers will be helpful. Thank you.

@skeletonkey
Copy link
Collaborator

It's been a while since I've done something like this and Bazel has changed, but I believe you can do this by using a genrule like:

genrule(
    name = "my_perl_rule",
    srcs = ["my_script.pl"],
    outs = ["output.txt"],
    tools = ["/usr/bin/perl"],  # Path to your host's Perl interpreter
    cmd = "$(location :perl) $(location my_script.pl) > $@",
)

This requires that each system you are running this on has the same location of Perl, preferably the same version of Perl, and all required modules are installed for that version.

@Sunidhi-Gaonkar1
Copy link
Author

@skeletonkey , Thank you for your response and sorry for the delayed reply. facing the following issue after using genrule.

:/rules_perl# bazel build :all
ERROR: /rules_perl/BUILD:19:8: //:my_perl_rule: invalid label '/usr/bin/perl' in element 0 of attribute 'tools' in 'genrule' rule: invalid target name '/usr/bin/perl': target names may not start with '/'
ERROR: package contains errors: : //:my_perl_rule: invalid label '/usr/bin/perl' in element 0 of attribute 'tools' in 'genrule' rule: invalid target name '/usr/bin/perl': target names may not start with '/'

Looking into it further, if you have any suggestions please let me know. Thank you.

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

2 participants