rpwoodbu / mosh-chrome

Mosh for Chrome
GNU General Public License v3.0
372 stars 59 forks source link

name 'HOST_CFG' is not defined #174

Closed kebugcheckex closed 6 years ago

kebugcheckex commented 6 years ago

I am building mosh-chrome on Ubuntu 16.04, and I got the following error message

ubuntu@vagrant:~/mosh-chrome$ ./build.sh dev
Extracting Bazel installation...
...................
ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/361871dc7ccd8effbff11c6dbb29a7fc/external/io_bazel/third_party/protobuf/protobuf.bzl:96:19: name 'HOST_CFG' is not defined
ERROR: /home/ubuntu/mosh-chrome/mosh_nacl/BUILD:52:1: error loading package '@mosh//': Extension 'third_party/protobuf/protobuf.bzl' has errors and referenced by '//mosh_nacl:mosh_client'
ERROR: Analysis of target '//:mosh_chrome_dev' failed; build aborted: error loading package '@mosh//': Extension 'third_party/protobuf/protobuf.bzl' has errors
INFO: Elapsed time: 78.628s
FAILED: Build did NOT complete successfully (14 packages loaded)
    currently loading: @mosh//

Google the error message name 'HOST_CFG' is not defined I found https://github.com/bazelbuild/bazel/pull/1769 on Bazel's issue tracker. They fixed this in a later version by changing this to host. However, the version of Bazel checked out here is 0.3.0 (2016-06-10) according to git log. I tried to update the WORKSPACE file to use the latest version of Bazel. Apparently the directory structure changed and I got this error

ERROR: /home/ubuntu/mosh-chrome/mosh_nacl/BUILD:52:1: error loading package '@mosh//': Extension file not found. Unable to load file '@io_bazel//third_party/protobuf:protobuf.bzl': file doesn't exist or isn't a file and referenced by '//mosh_nacl:mosh_client'

Is there any workaround to this?

rpwoodbu commented 6 years ago

Note that you must use Bazel v0.3.1, no other version. Please see the README.md. Also note that the version of Bazel referenced in the WORKSPACE file is just to access some third-party items in their tree, and is not reflective of the actual version of Bazel that you're running to do the build. You had to install Bazel on your machine yourself, so check that version (type "bazel version").

I'll close this for now, but if the issue persists with v0.3.1, please let me know.