Skip to content

Bazel 0.19.1 released with a bug  #6665

Closed

Description

@nlopezgi

Description of the problem / feature request:

Bazel 0.19.1 was released with a bug fixed by 6bc4528
(bazelbuild/bazel-toolchains#198)

Bazel 0.19.0 does not have that bug.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Use bazel-toolchains repo
Try to run this target:
https://github.com/bazelbuild/bazel-toolchains/blob/master/tests/config/BUILD#L70
modify the value of the bazel_version target to point to 0.19.1
bazel_version = "0.19.1",

Try with version 0.19.0 to see it pass (see bazelbuild/bazel-toolchains#237)

What operating system are you running Bazel on?

Linux - an ubuntu16_04 docker container

What's the output of bazel info release?

Bazel 0.19.1

@mhlopko fyi as he authored the commit that was not included in the 0.19.1 release

Activity

  1. ittaiz commented on Nov 12, 2018

    @ittaiz
    Member
  2. nlopezgi commented on Nov 12, 2018

    @nlopezgi
    ContributorAuthor

    There should be no ramifications for remote exec users. This will only impact our internal process to produce a toolchain configs that works with RBE for Bazel 0.19.1 (but the ones for 0.19.0 work well with 0.19.1).

  3. ittaiz commented on Nov 13, 2018

    @ittaiz
    Member
  4. lberki commented on Nov 13, 2018

    @lberki
    Contributor

    (in the absence of @mhlopko )

  5. lberki commented on Nov 13, 2018

    @lberki
    Contributor

    /cc @katre -- I think if it "only" makes it harded to produce toolchain configs for RBE, let's not have a 0.19.2 . That said, it's a regrettable omission :(

  6. katre commented on Nov 13, 2018

    @katre
    Collaborator

    This may not be worth a patch, but #6662 definitely is. I am trying today to determine if they are related or not.

  7. scentini commented on Nov 13, 2018

    @scentini
    Contributor

    They are related, the @bazel_tools//tools/cpp:default-toolchain is in error.

  8. scentini commented on Nov 13, 2018

    @scentini
    Contributor

    @katre, do you know when users set --crosstool_top=@bazel_tools//tools/cpp:default-toolchain instead of using the ones generated by cc_configure?

  9. katre commented on Nov 13, 2018

    @katre
    Collaborator

    @scentini I do not know that. Ask the user who reported #6662.

  10. katre commented on Nov 13, 2018

    @katre
    Collaborator

    @nlopezgi Is there a way to run the //tests/config:debian-jessie-custom-bazel-rc-version-autoconfig with a custom local version of Bazel?

  11. nlopezgi commented on Nov 13, 2018

    @nlopezgi
    ContributorAuthor

    @katre unfortunately, there is not, these tests depend on downloading an installer, you can repro the error easily though, just try to run a build form an environment in which the same env variables as those set in the docker autoconfig target are set. Specifically, you should be able to repro this by simply adding the env variable:
    "CC_TOOLCHAIN_NAME": "linux_gnu_x86"
    and then trying to run a build of any target that requires the cc toolchain.
    With 0.19.0 the build will succeed, with 0.19.1 the build will fail unless you set
    "CC_TOOLCHAIN_NAME": "local" (or remove the env variable)

  12. nlopezgi commented on Nov 13, 2018

    @nlopezgi
    ContributorAuthor

    and I do agree with @lberki that if this only impacts our use case it does not warrant a new version being cut (but I'd be surprised no one else is using the CC_TOOLCHAIN_NAME env variable for some other reason)

  13. katre commented on Nov 13, 2018

    @katre
    Collaborator

    Okay, results of testing that (using the cpp-tutorial):

    With Bazel 0.19.1:

    $ CC_TOOLCHAIN_NAME=linux_gnu_x86 bazel build //main:hello-world 
    ERROR: Toolchain identifier 'local' was not found, valid identifiers are [stub_armeabi-v7a, linux_gnu_x86, msys_x64_mingw, msvc_x64]
    INFO: Elapsed time: 0.593s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (1 packages loaded)
    

    With Bazel 0.19.2rc1:

    $ CC_TOOLCHAIN_NAME=linux_gnu_x86 ~/repos/bazel-release-0.19.1/bazel-bin/src/bazel build //main:hello-world 
    Starting local Bazel server and connecting to it...
    INFO: Analysed target //main:hello-world (8 packages loaded, 65 targets configured).
    INFO: Found 1 target...
    Target //main:hello-world up-to-date:
      bazel-bin/main/hello-world
    INFO: Elapsed time: 1.759s, Critical Path: 0.01s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
    INFO: 0 processes.
    INFO: Build completed successfully, 1 total action
    

    So I will continue with sending out 0.19.2.rc1.

  14. added
    P0
    team-Rules-CPP
    on Nov 13, 2018
  15. wjywbs commented on Nov 14, 2018

    @wjywbs
    Contributor

    I'm also encountering an issue similar to this, and related to #6662 as well. I took some time to make a minimal repro in https://github.com/wjywbs/bazel-cc-toolchain-bug.

  16. katre commented on Nov 14, 2018

    @katre
    Collaborator

    It looks like cherrypicking 683c302 will fix this (but, it changes how crosstool_top is selected). @wjywbs, can you cherrypick that onto the current release-0.19.2 branch and test your case?

  17. katre commented on Nov 14, 2018

    @katre
    Collaborator

    I've pushed the cherrypick into the RC, please let me know if there are still issues.

  18. gunan commented on Nov 14, 2018

    @gunan

    This is also affecting TF

  19. wjywbs commented on Nov 15, 2018

    @wjywbs
    Contributor

    @katre The release-0.19.2 branch works in both of my use cases. Thanks for the fix.

  20. katre commented on Nov 19, 2018

    @katre
    Collaborator

    Closing since 0.19.2 will release today.

  21. added a commit that references this issue on Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0team-Rules-CPPtype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions