istio/old_pilot_repo

Build fails on Intel for Istioctl(pilot)

Closed this issue · 14 comments

Hi ,

The pilot version used is 0.2.9 and bazel version used is 0.7.0

The pilot build fails on x86 with error ERROR: /usr/local/go/src/istio.io/pilot/tools/version/BUILD:3:1: in go_library rule //tools/version:go_default_library:
Traceback (most recent call last):
File "/usr/local/go/src/istio.io/pilot/tools/version/BUILD", line 3
go_library(name = 'go_default_library')
File "/root/.cache/bazel/_bazel_root/2325d0d2e5f42b9a686a34f251405905/external/io_bazel_rules_go/go/private/library.bzl" line 143, in _go_library_impl
emit_library_actions(ctx, sources = depset(ctx.files.sr...), <4 more arguments>)
File "/root/.cache/bazel/_bazel_root/2325d0d2e5f42b9a686a34f251405905/external/io_bazel_rules_go/go/private/library.bzl" line 44, in emit_library_actions
depset([], order = "link")

Order name 'link' is deprecated, use 'topological' instead.
ERROR: Analysis of target '//tools/version:go_default_test' failed; build aborted: Analysis of target '//tools/version:go_defaul_library' failed; build aborted.

Any solution to this

I have been trying to build the same version of pilot on intel machine
Used bazel version 0.7

Some inputs on thsi will be very helpful from istio dev team

Can you use bazel 0.6.x? Thats what we are using in our CI/CD as well

Unfortunately, bazel is not all that backward compatible.

@rshriram : Thanks for the reply
as per your suggestion i have moved back to bazel 0.60, using same version for pilot that is 0.2.9
When i start the build with command "make setup"

I get the below error

root@878a9e4f0af9:/usr/local/go/src/istio.io/pilot# make setup
++ pwd

  • PDIR=/usr/local/go/src/istio.io/pilot
  • '[' /usr/local/go/src/istio.io/pilot '!=' /usr/local/go/src/istio.io/pilot ']'
  • bazel build //...
    Extracting Bazel installation...
    .....................
    ERROR: /root/.cache/bazel/_bazel_root/2325d0d2e5f42b9a686a34f251405905/external/io_bazel_rules_go/go/private/binary.bzl:226:48: name 'lib' is not defined (did you mean 'libs'?).
    ERROR: error loading package '': Extension 'go/private/binary.bzl' has errors.
    INFO: Elapsed time: 9.141s
    Makefile:19: recipe for target 'setup' failed
    make: *** [setup] Error 1

Your inputs would help , thank sin advance

also with bazel 0.6.1 we face the same issues

++ pwd

  • PDIR=/usr/local/go/src/istio.io/pilot
  • '[' /usr/local/go/src/istio.io/pilot '!=' /usr/local/go/src/istio.io/pilot ']'
  • bazel build //...
    .....................
    ERROR: /root/.cache/bazel/_bazel_root/2325d0d2e5f42b9a686a34f251405905/external/io_bazel_rules_go/go/private/binary.bzl:226:48: name 'lib' is not defined (did you mean 'libs'?).
    ERROR: error loading package '': Extension 'go/private/binary.bzl' has errors.
    INFO: Elapsed time: 1.451s
    Makefile:19: recipe for target 'setup' failed
    make: *** [setup] Error 1

@rshriram : We would also like to know if you have build istio/pilot project on x86 before, is yes than could you share the build steps

Our test infrastructure is on X86. and its using bazel 0.6.0. When you downgraded, did you do bazel clean --expunge? Typically, after changing bazel versions, you should wipe everything clean and start from scratch.

@rshriram : Thanks for the reply , I have followed your steps to use "bazel clean --expunge"
followed by this i have restarted the build using "make setup" and i get the same error.

ERROR: /root/.cache/bazel/_bazel_root/2325d0d2e5f42b9a686a34f251405905/external/io_bazel_rules_go/go/private/binary.bzl:226:48: name 'lib' is not defined (did you mean 'libs'?).
ERROR: error loading package '': Extension 'go/private/binary.bzl' has errors.
INFO: Elapsed time: 1.451s
Makefile:19: recipe for target 'setup' failed
make: *** [setup] Error 1

I am a little surprised, to see this error in the release version, so hence i was trying to make sure if i was not missing anythg from my side
has this release version of pilot built on your end?

hi @rshriram ,

I tried pilot build for version 0.2.9 with bazel 0.6.0 on Intel.Got libs related error as mentioned by @ketank-new . Also cleaned the previous bazel build with "bazel clean --expunge" command,but the same above error persists.

The error is as follows:
++ pwd

  • PDIR=/usr/local/go/src/istio.io/pilot
  • '[' /usr/local/go/src/istio.io/pilot '!=' /usr/local/go/src/istio.io/pilot ']'
  • bazel build //...
    ERROR: /root/.cache/bazel/_bazel_root/2325d0d2e5f42b9a686a34f251405905/external/io_bazel_rules_go/go/private/binary.bzl:226:48: name 'lib' is not defined (did you mean 'libs'?).
    ERROR: error loading package '': Extension 'go/private/binary.bzl' has errors.
    INFO: Elapsed time: 7.927s
    Makefile:19: recipe for target 'setup' failed

Please let us know your comments on this

Hi @rshriram

I tried building other istio components like CA,auth etc for version 0.2.9 with bazel version 0.6.0. They also fail with similar error as reported above ( same error with which pilot build failed).

Please let us know your comments on this.

Hi @rshriram ,

I tried building pilot latest verison (0.2.10) with lower bazel version (0.5.4). The build was successful . But the readme of pilot mentions to use 0.6.x and above. (https://github.com/istio/pilot). Is it advisable to build pilot with a lower version like (0.5.4) or continue its build with 0.6.x and above.

Please let us know your comments on this.

ayj commented

The minimum required bazel version was updated to 0.6.x after we created 0.2.x branch. The 0.2.10 release requires the older bazel version (e.g. 0.5.4).

Hi @rshriram

The pilot source code is moved to old_repo in github . Is it like the some new code is being added there , or pilot code is being moved out.

We found pilot code in master branch. Why is the structure changed?. How will it affect the build steps.

Please let us know on this.

Issue moved to istio/istio #1372 via ZenHub