rules_go: bazel build failed on ppc64le
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
If asking a question or requesting a feature, also tell us about the underlying problem you’re trying to solve.
If possible, provide a minimal example to reproduce the problem:
Environment info
- Operating System:
root@cit1046:~/go/src/istio.io/pilot# uname -a
Linux cit1046.rtp.raleigh.ibm.com 4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:56:58 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux
BTW: I build bazel 0.5.4
myself for ppc64le.
- Bazel version (output of
bazel info release
):
root@cit1046:~/go/src/istio.io/pilot# bazel version
Build label: 0.5.4- (@non-git)
Build target: bazel-out/local-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Sep 26 04:10:02 2017 (1506399002)
Build timestamp: 1506399002
Build timestamp as int: 1506399002
- If
bazel info release
returns “development version” or “(@non-git)”, please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD
):
Have you found anything relevant by searching the web?
(e.g. StackOverflow answers,
GitHub issues,
email threads on the bazel-discuss
Google group)
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
- Get the istio pilot code.
git clone git@github.com:istio/pilot.git
- Build the source code with
make setup
$ make setup
....
WARNING: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/bazel_tools/tools/build_defs/pkg/pkg.bzl:196:9: pkg_tar: renaming non-dict `files` attribute to `srcs`.
ERROR: /root/go/src/istio.io/pilot/test/client/BUILD:3:1: no such package '@com_github_gorilla_websocket//': no such package '@io_bazel_rules_go_repository_tools//': failed to build gazelle: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: uE@p@8: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 2: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: @$: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: ELF: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: �: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: �: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: �{�{k�: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: �: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: L: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: �: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: G�{�: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: cannot open 0B�0BN
BHB�HBN�
Q���o@E�@ENH
^���o�E��ENP: No such file
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: -R: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 2: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go:F�FN�
��FNm4@H�@HN: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: JN: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 2: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: ���: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 4: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go:O�M��MN�: not found
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 4: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/exc��Nm���Nk: not foundamd64/bin/go: Y�����Np
/root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: 1: /root/.cache/bazel/_bazel_root/1745129434edd1c4aecf285cdde2d234/external/go1_8_3_linux_amd64/bin/go: Syntax error: Unterminated quoted string
and referenced by '//test/client:go_default_library'.
ERROR: Analysis of target '//test/client:client' failed; build aborted.
INFO: Elapsed time: 55.074s
Makefile:19: recipe for target 'setup' failed
make: *** [setup] Error 1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 37 (27 by maintainers)
Commits related to this issue
- Detect linux_ppc64le as a host platform Related #854 — committed to jayconrod/rules_go by deleted user 7 years ago
- Detect linux_ppc64le as a host platform Related #854 — committed to jayconrod/rules_go by deleted user 7 years ago
- Detect linux_ppc64le as a host platform (#1145) Related #854 — committed to bazelbuild/rules_go by jayconrod 7 years ago
@clnperez I think “at that PR” was referring to #1145, which has since been merged. So nevermind that.
I was able to build a “hello” world binary using your WORKSPACE file.
hello.go
BUILD.bazel
This was with Bazel 0.10.0 (latest version at this time). I also tried this with rules_go at head, and that worked, too.
Couple notes:
--experimental_platforms
can now be replaced with--platforms
.go_prefix
in my build file, since this was with an older version of rules_go. However, that’s not needed with newer versions.@clnperez The instructions I posted earlier today were for a ppc64le host and ppc64le target. The instructions I posted earlier with the
--experimental_platforms
flag were for a ppc64le target from a host platform that can be auto-detected (linux, darwin, or windows on amd64, or linux on s390x).The cross compilation instructions will work for pure Go builds. You shouldn’t need to set
--cpu
for that. However, if you have cgo code or if you depend on C/C++ libraries, you will also need a C/C++ toolchain that can target ppc64le, and you’ll need to write a CROSSTOOL file and point to it with--crosstool_top
.I don’t believe there is anything like that which currently works with Bazel, and I don’t think rules_go will work at the moment in that configuration. We are working on improving it, but that’s the state of things.