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

sh_binary wrapper fails on upper case letters in file extension on Windows #9390

Closed
aherrmann opened this issue Sep 16, 2019 · 0 comments
Closed
Assignees
Labels
area-Windows Windows-specific issues and feature requests P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@aherrmann
Copy link
Contributor

Description of the problem:

Windows filenames are case-insensitive, and also can be shortened to 8.3 format, which is upper-case by default. The sh_binary wrapper fails with the following error when calling the binary with an upper-case file extension.

LAUNCHER ERROR: Cannot open the binary to read launch data
LAUNCHER ERROR: Failed to parse launch info.

This is an issue if the sh_binary is meant to be called by another program which uses upper-case filenames or 8.3 format. E.g. autotools ./configure scripts.

The sh_binary wrapper should accept all combinations of upper and lower case in the file extension.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Create a binary target as follows:

cat >sh-binary.sh <<EOF
echo "Hello world"
EOF
cat >BUILD <<EOF
sh_binary(
    name = "sh-binary",
    srcs = ["sh-binary.sh"],
)
EOF

Build and execute

> bazel build //:sh-binary

> bazel-bin\sh-binary.exe
Hello world

> BAZEL-~1\SH-BIN~1.exe
Hello world

> bazel-bin\sh-binary.EXE
LAUNCHER ERROR: Cannot open the binary to read launch data
LAUNCHER ERROR: Failed to parse launch info.

> BAZEL-~1\SH-BIN~1.EXE
LAUNCHER ERROR: Cannot open the binary to read launch data
LAUNCHER ERROR: Failed to parse launch info.

What operating system are you running Bazel on?

Windows 10

What's the output of bazel info release?

release 0.28.1

@dslomov dslomov added area-Windows Windows-specific issues and feature requests untriaged labels Sep 16, 2019
@laszlocsomor laszlocsomor added P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed untriaged labels Sep 17, 2019
@laszlocsomor laszlocsomor self-assigned this Sep 17, 2019
laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants