bazelbuild / rules_perl

Perl rules for Bazel
Apache License 2.0
25 stars 38 forks source link

Parameter to use fallback must be a directory not a file #61

Closed andrewkatson closed 4 weeks ago

andrewkatson commented 4 weeks ago

I posted a stack overflow: https://stackoverflow.com/questions/78713054/parameter-to-use-fallback-must-be-a-directory-not-a-file about this issue. Is it simply that MacOS doesn't support compilation because I tried sh_binary that runs a perl script and I get the same error. I am wondering if there is something with bazel sandboxing that is causing this because a shell script works and running the perl script works outside of bazel.

Parameter to use fallback must be a directory, not a file at /private/var/tmp/<redacted>/4e54a0e36f2fab506a36c4eeb929d5f5/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/configure_openssl.runfiles/_main/Configure line 20.
BEGIN failed--compilation aborted at /private/var/tmp/<redacted>/4e54a0e36f2fab506a36c4eeb929d5f5/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/configure_openssl.runfiles/_main/Configure line 20.
andrewkatson commented 4 weeks ago

Okay I have figured it out. Configure looks for a specific path to a file named MODULES.txt not a directory generally speaking. And bazel moves that file when included in the data of whatever rule you use. So the solution is to modify Configure to look at the right path.