How to build bazel for mips64el arch

202 views
Skip to first unread message

644351021

unread,
May 22, 2017, 7:24:21 AM5/22/17
to bazel-discuss
hello,
My name is zhiyou, xue. When i build bazel at mips64el arch, i get naxt error.

[root@localhost bazel]# ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO:    ./compile.sh compile /path/to/bazel
🍃  Building Bazel from scratch
ERROR: Must specify GRPC_JAVA_PLUGIN if not bootstrapping from the distribution artifact

--------------------------------------------------------------------------------
NOTE: This failure is likely occuring if you are trying to bootstrap bazel from
a developer checkout. Those checkouts do not include the generated output of
the protoc compiler (as we prefer not to version generated files).

* To build a developer version of bazel, do

    bazel build //src:bazel

* To bootstrap your first bazel binary, please download a dist archive from our
  release page at https://github.com/bazelbuild/bazel/releases and run
  compile.sh on the unpacked archive.

The full install instructions to install a release version of bazel can be found
at https://bazel.build/versions/master/docs/install.html#compiling-from-source
For a rationale, why the bootstrap process is organized in this way, see
https://bazel.build/designs/2016/10/11/distribution-artifact.html
--------------------------------------------------------------------------------
our environment
os: fedora21
arch: mips64el
protoc: libprotoc 3.2.0
gcc: Red Hat 4.9.3-5
GRPC_JAVA_PLUGIN cause the error. But i build grpc-java  failed. Could you give me some solutions for fixing this error?
yours,
xue

Klaus Aehlig

unread,
May 22, 2017, 8:12:08 AM5/22/17
to 644351021, bazel-discuss
Does following the instructions at https://bazel.build/versions/master/docs/install-compile-source.html work?
(Sorry for the outdated link in the error message; will update it immediately).

Thanks,
Klaus

--
Klaus Aehlig
Google Germany GmbH, Erika-Mann-Str. 33, 80636 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

644351021

unread,
May 22, 2017, 8:51:41 AM5/22/17
to Klaus Aehlig, bazel-discuss
hello Klaus,
i refer the instructions at https://bazel.build/versions/master/docs/install-compile-source.html 
however, it doesn't work. i encounter the first error is next
[root@localhost bazel]# bash ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO:    ./compile.sh compile /path/to/bazel
🍃  Building Bazel from scratch
ERROR: Must specify PROTOC if not bootstrapping from the distribution artifact
building protocbuf and setting env  PROTOC to fix it. But exec #bash ./compile.sh again, i get the second error,
[root@localhost bazel]# ./compile.sh
 INFO: You can skip this first step by providing a path to the bazel binary as second argument:
 INFO:    ./compile.sh compile /path/to/bazel
 🍃  Building Bazel from scratch
 ERROR: Must specify GRPC_JAVA_PLUGIN if not bootstrapping from the distribution artifact
i try build grpc-java, but i  always build error. I stay this step for 3 days. I don't know how to go on. Could you give some ideas for fixing it?
yours,
best wish !


------------------ 原始邮件 ------------------
发件人: "Klaus Aehlig"<aeh...@google.com>;
发送时间: 2017年5月22日(星期一) 晚上8:12
收件人: "644351021"<xuezhi...@foxmail.com>;
抄送: "bazel-discuss"<bazel-...@googlegroups.com>;
主题: Re: How to build bazel for mips64el arch

Klaus Aehlig

unread,
May 22, 2017, 8:59:05 AM5/22/17
to 644351021, bazel-discuss
> i refer the instructions at https://bazel.build/versions/master/docs/install-compile-source.html
> however, it doesn't work. i encounter the first error is next
> [root@localhost bazel]# bash ./compile.sh
> INFO: You can skip this first step by providing a path to the bazel binary as second argument:
> INFO: ./compile.sh compile /path/to/bazel
> 🍃 Building Bazel from scratch
> ERROR: Must specify PROTOC if not bootstrapping from the distribution artifact

The quoted instructions state that you download a distribution file and unpack it. The error
message indicates that you most likely used a checkout of the source tree instead. Note that this
is *not* the same. The distribution file contains more than just the sources; in particular, it
contains the output of the protoc invocations.

If you did use a distribution file, please tell me which file you used, where you got it from
and its sha256 hash sum.

Klaus Aehlig

unread,
May 22, 2017, 9:00:50 AM5/22/17
to bazel-discuss
> (Sorry for the outdated link in the error message; will update it immediately).

Pending change https://bazel-review.googlesource.com/#/c/11350/

644351021

unread,
May 22, 2017, 9:19:26 AM5/22/17
to Klaus Aehlig, bazel-discuss
Sorry, i forget to tell where i get source code.  I get it by executing git clone https://github.com/bazelbuild/bazel.git
By the way, i don't know hot to get a directory sha256  hash sum.
yours,
best wish!


------------------ 原始邮件 ------------------
发件人: "Klaus Aehlig"<aeh...@google.com>;
发送时间: 2017年5月22日(星期一) 晚上8:59
收件人: "644351021"<xuezhi...@foxmail.com>;
抄送: "bazel-discuss"<bazel-...@googlegroups.com>;
主题: Re: 回复: How to build bazel formips64el arch

Klaus Aehlig

unread,
May 22, 2017, 9:24:58 AM5/22/17
to 644351021, bazel-discuss
> Sorry, i forget to tell where i get source code. I get it by executing git clone https://github.com/bazelbuild/bazel.git

That's what I expected. The instructions, however, tell you to download
https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-dist.zip
instead. This is not the same; the dist.zip also contains generated files needed
for bootstrapping.

644351021

unread,
May 22, 2017, 11:30:25 PM5/22/17
to Klaus Aehlig, bazel-discuss
I download zip source code bazel-0.4.5-dist.zip .Then unziping it and executing bash ./compile.sh, i get the next error.
[root@localhost bazel-0.4.5]# bash ./compile.sh

INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO:    ./compile.sh compile /path/to/bazel
🍃  Building Bazel from scratch.......
🍃  Building Bazel with Bazel.
.WARNING: /tmp/bazel_qadO1W8B/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_qadO1W8B/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions.
ERROR: No toolchain found for cpu 'unknown'. Valid cpus are: [
  piii,
  armeabi-v7a,
  x64_windows_msvc,
  s390x,
  mips64el,
  ios_x86_64,
].
INFO: Elapsed time: 8.248s

ERROR: Could not build Bazel
I have added mips64el arch support, i upload the change log  in my github, see https://github.com/xzy256/bazel-mips64el/blob/master/1.patch
Why does the error imply "unknown" cpu?  Do I omit  something?
yours,
best wish!


------------------ Original ------------------
From: "Klaus Aehlig"<aeh...@google.com>;
Date: 2017年5月22日(星期一) 晚上9:24
To: "644351021"<xuezhi...@foxmail.com>;
Cc: "bazel-discuss"<bazel-...@googlegroups.com>;
Subject: Re: 回复: 回复: How tobuild bazel formips64el arch
Reply all
Reply to author
Forward
0 new messages