bazel-contrib / bazel-contrib/rules_perl
toolchain uses host's perl libs
- Dominant language
- Starlark
- Stars
- 31
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
The perl keeps using host's perl library:
```
Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /home/bazel/.cache/bazel/_bazel_bazel/8c069df52082beee3c95ca17836fb8e2/sandbox/processwrapper-sandbox/3/execroot/__main__/external/openssl/Configure line 15.
```
So having `@rules_perl//:current_toolchain` in an action sandbox, won't provide a valid perl runtime.
The temporary fix is to add PERL5LIB to env, and point to the lib directory in the toolchain.
Contributor guide
Research direction
Start by examining the action sandbox use of @rules_perl//:current_toolchain and the external/openssl/Configure entry point shown in the error. Check how the toolchain exposes Perl libraries and ensure the sandboxed action receives the toolchain library path through PERL5LIB rather than the host's @INC.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100