You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
missa-prime opened this issue
Feb 21, 2018
· 1 comment
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: bug
After version 0.5.2, a git repo is required to build the Bazel bash completion script on macOS when attempting to install Bazel via MacPorts. The Portfile contains workaround code that deletes a temporary folder and creates a dummy repo to prevent the installation from failing. I'm not sure why all of this is necessary in the first place though.
Feature requests: what underlying problem are you trying to solve with this feature?
N/A
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Make sure JDK 8 or newer is installed
Ensure that /etc/gitconfig file exists and user.name and user.email fields are populated
Remove the code below from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/bazel/Portfile:
# Get ready to build the bash completion script
file delete -force /var/tmp/_${name}_root
# build fails if it does not recognize this dir as a git repo
system -W ${worksrcpath} "git init"
system -W ${worksrcpath} "git add ."
system -W ${worksrcpath} "git commit -m GitRepo"
sudo port install bazel at a terminal prompt to install bazel
What operating system are you running Bazel on?
macOS 10.12.6
What's the output of bazel info release?
ERROR: The 'info' command is only supported from within a workspace.
Since I don't have a workspace handy, I'll provide the output of bazel version:
If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.
Bazel was built from source while being installed with MacPorts.
What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?
N/A
Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
Here is the type of error output you should see (assuming stdout and stderr are directed to a file) without the git repo:
Build successful! Binary is here: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bazel/bazel/work/bazel-0.9.0-dist/output/bazel
xinstall: chdir(/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bazel/bazel/work/bazel-0.9.0-dist/output)
xinstall: bazel -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bazel/bazel/work/bazel-0.9.0-dist/bazel
Extracting Bazel installation...
.....................
Loading:
Loading: 0 packages loaded
Analyzing: target //scripts:bazel-complete.bash (3 packages loaded)
Analyzing: target //scripts:bazel-complete.bash (4 packages loaded)
Analyzing: target //scripts:bazel-complete.bash (73 packages loaded)
Analyzing: target //scripts:bazel-complete.bash (75 packages loaded)
Analyzing: target //scripts:bazel-complete.bash (195 packages loaded)
INFO: Analysed target //scripts:bazel-complete.bash (195 packages loaded).
INFO: Found 1 target...
[0 / 2] [-----] BazelWorkspaceStatusAction stable-status.txt
ERROR: Process exited with status 128: Process exited with status 128
fatal: Not a git repository (or any of the parent directories): .git
Target //scripts:bazel-complete.bash failed to build
INFO: Elapsed time: 25.182s, Critical Path: 0.14s
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Error: Failed to build bazel: child process exited abnormally
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bazel/bazel/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port bazel failed
The text was updated successfully, but these errors were encountered:
missa-prime
changed the title
Bazel bash completion script requires git repo to build on MacOS via MacPorts
Bazel bash completion script requires git repo to build on macOS via MacPorts
Feb 21, 2018
P3We're not considering working on this, but happy to review a PR. (No assignee)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: bug
Description of the problem / feature request:
After version 0.5.2, a git repo is required to build the Bazel bash completion script on macOS when attempting to install Bazel via MacPorts. The
Portfile
contains workaround code that deletes a temporary folder and creates a dummy repo to prevent the installation from failing. I'm not sure why all of this is necessary in the first place though.Feature requests: what underlying problem are you trying to solve with this feature?
N/A
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
/etc/gitconfig
file exists anduser.name
anduser.email
fields are populated/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/bazel/Portfile
:sudo port install bazel
at a terminal prompt to install bazelWhat operating system are you running Bazel on?
macOS 10.12.6
What's the output of
bazel info release
?ERROR: The 'info' command is only supported from within a workspace.
Since I don't have a workspace handy, I'll provide the output of
bazel version
:If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.Bazel was built from source while being installed with MacPorts.
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?N/A
Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
Here is the type of error output you should see (assuming stdout and stderr are directed to a file) without the git repo:
The text was updated successfully, but these errors were encountered: