Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel 1.2.1 #46983

Closed
wants to merge 2 commits into from
Closed

bazel 1.2.1 #46983

wants to merge 2 commits into from

Conversation

chenrui333
Copy link
Member

Created with brew bump-formula-pr.

@chenrui333
Copy link
Member Author

bazelisk test failed on highsierra build only

14:14:32 ==> brew test --verbose bazelisk
14:14:41 ==> FAILED
14:14:41 Testing bazelisk
14:14:41 /usr/bin/sandbox-exec -f /private/tmp/homebrew20191120-24913-sbnyaw.sb ruby -W0 -I $LOAD_PATH -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bazelisk.rb --verbose
14:14:41 ==> /usr/local/Cellar/bazelisk/1.1.0/bin/bazelisk version
14:14:41 2019/11/20 19:14:35 Downloading https://releases.bazel.build/1.2.0/release/bazel-1.2.0-darwin-x86_64...
14:14:41 dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
14:14:41 Referenced from: /private/tmp/bazelisk-test-20191120-24914-1nw6vhm/Library/Caches/bazelisk/bin/bazelbuild/bazel-1.2.0-darwin-x86_64 (which was built for Mac OS X 10.15)
14:14:41 Expected in: /usr/lib/libSystem.B.dylib
14:14:41
14:14:41 dyld: Symbol not found: ____chkstk_darwin
14:14:41 Referenced from: /private/tmp/bazelisk-test-20191120-24914-1nw6vhm/Library/Caches/bazelisk/bin/bazelbuild/bazel-1.2.0-darwin-x86_64 (which was built for Mac OS X 10.15)
14:14:41 Expected in: /usr/lib/libSystem.B.dylib
14:14:41

@chenrui333
Copy link
Member Author

@BrewTestBot test this please

@chenrui333
Copy link
Member Author

retest to see if it happens again.

@Bo98
Copy link
Member

Bo98 commented Nov 20, 2019

which was built for Mac OS X 10.15

Is there a binary floating around or something? I can't see how High Sierra would even know about 10.15.

@chenrui333
Copy link
Member Author

Is there a binary floating around or something? I can't see how High Sierra would even know about 10.15.

I also checked with the previous releases, like 1.1.0 (seems fine with bazellisk)

@chenrui333
Copy link
Member Author

I downloaded and unzipped the source code, did not find 10.15 or catalina reference there.

@Bo98
Copy link
Member

Bo98 commented Nov 20, 2019

Oh wait, my reading comprehension is apparently terrible and I didn't see a few lines up:

Downloading https://releases.bazel.build/1.2.0/release/bazel-1.2.0-darwin-x86_64...

I think bazelisk is downloading a binary.

@chenrui333
Copy link
Member Author

chenrui333 commented Nov 20, 2019

yeah, I dont understand why bazel is trying to download the artifact.

@Bo98
Copy link
Member

Bo98 commented Nov 20, 2019

It's bazelisk rather than bazel itself, so I don't think it's to do with your bazel 1.2.0 upgrade. It just happened to break because the latest binary bazelisk is trying to download no longer works on 10.13.

The behaviour seems to be what bazelisk is supposed to do:

How does Bazelisk know which Bazel version to run and where to get it from?

It uses a simple algorithm:

  • If the environment variable USE_BAZEL_VERSION is set, it will use the version specified in the value.
  • Otherwise, if a .bazelversion file exists in the current directory or recursively any parent directory, it will read the file and use the version specified in it.
  • Otherwise it will use the official latest Bazel release.

https://github.com/bazelbuild/bazelisk

@chenrui333
Copy link
Member Author

if that is case, it should consistently fail for the other two environments as well, right?

@Bo98
Copy link
Member

Bo98 commented Nov 21, 2019

It's failing on a particular symbol (____chkstk_darwin) that was added on 10.14, hence why it only fails on 10.13. It's just the way the precompiled binary it's downloading was compiled.

The problem is we didn't compile it. Bazelisk does not use Homebrew bazel unless you tell it to via USE_BAZEL_VERSION or the .bazelversion file. Bazelisk is basically just a wrapper around downloading bazel.

@philwo
Copy link
Contributor

philwo commented Nov 22, 2019

Hi,

I work on Bazel and its CI. Sorry - this might be an unintended breakage resulting from us upgrading our Xcode version on the CI machines from 10.2.1 to 11.1. 😞 I guess that new toolchain generates binaries that no longer work on High Sierra. Bazel 1.1.0 was still built with the older Xcode, but Bazel 1.2.0 was built with the newer one.

I'll prepare Bazel 1.2.1 as a patch release on Monday that will be built with Xcode 10.2.1 to restore High Sierra compatibility.

What's your policy in Homebrew for supporting older macOS releases - would it be OK if we dropped support for High Sierra in Bazel 2.0 (~next month)? Or should we try to keep this working for as long as possible?

@Bo98
Copy link
Member

Bo98 commented Nov 22, 2019

Thanks for reaching out!

Generally, we support the current OS and the last two. However, we don't constrain other developers to do the same. If Bazel drops support for High Sierra, and such change is documented as intended, then we can set the specific formula to require Mojave and later (example here).

@chenrui333
Copy link
Member Author

@Bo98 @philwo

I have two sides for this, as maintainer for homebrew-core, I do think if it does not support, we should remove the bottle from the formula.

But as Meetup engineer, we do still have some engineers running Bazel on HIgh Sierra machine, so I might prefer to have a fix for it in Bazel side. :)

Thanks though!

@Bo98
Copy link
Member

Bo98 commented Nov 22, 2019

It should be possible to build to support High Sierra on Xcode 11 if that's the only issue you are having @philwo. Make sure the "deployment target" is set - this is the minimum macOS version you'd like to support.

@SMillerDev
Copy link
Member

While not supporting an older apple-supported version wouldn't be grounds for removal it would be something that would indicate to users that you're not serious about macOS support. (And as a maintainer pretty annoying to answer questions about)

@chenrui333
Copy link
Member Author

@SMillerDev I just dont have a machine to test, that is why I was pushing a rc release though. But we do have engineers at Meetup using an old Mac.

@Bo98
Copy link
Member

Bo98 commented Nov 25, 2019

The problem isn't our compile of bazel. Even without this pull request bazelisk won't work currently on High Sierra because the very nature of it is to download binaries not compiled by ourselves.

If you move it back to 1.1.0 and revision bump the same thing will probably happen.

@philwo
Copy link
Contributor

philwo commented Nov 25, 2019

While not supporting an older apple-supported version wouldn't be grounds for removal it would be something that would indicate to users that you're not serious about macOS support.

Thanks for explaining your thoughts here. It was an accidental breakage on Bazel's side and we have no plans to drop High Sierra support at the moment. (We also don't have enough CI machines to test on it, though, so we rely on users to report breakages ideally during our release candidate window.) I agree that supporting the latest macOS release + the two previous releases is a nice policy. AFAIK that's also what Apple does with their security fixes, right?

The problem isn't our compile of bazel. Even without this pull request bazelisk won't work currently on High Sierra because the very nature of it is to download binaries not compiled by ourselves.

Yes. The step that is failing here is the Bazel downloaded by Bazelisk, not the Bazel binary that you're building yourself. Bazelisk always picks the latest stable version by default. If you want to temporarily override this, you can set the USE_BAZEL_VERSION=1.1.0 environment variable before calling Bazelisk. It should always work to use the previous Bazel release to build the current release (this is what we do on Bazel's CI, too).

We also have a patch release 1.2.1rc1 that will fix the incompatibility. I will release it tomorrow morning. @soonho-tri kindly tested and confirmed that the new version works again on High Sierra. :)

@chenrui333
Copy link
Member Author

Add USE_BAZEL_VERSION env line for fixing the bazelisk test issue.

Formula/bazelisk.rb Outdated Show resolved Hide resolved
@chenrui333
Copy link
Member Author

Current build failure is due to the rc build audit failure.

@chenrui333
Copy link
Member Author

Refresh the PR with the latest bazel 1.2.1 release.

@Bo98 Bo98 changed the title bazel 1.2.0 bazel 1.2.1 Nov 26, 2019
@chenrui333
Copy link
Member Author

brew doctor failed on highsierra build, which can be totally ignored.

@chenrui333
Copy link
Member Author

Thanks everyone!!

@lock lock bot added the outdated PR was locked due to age label Jan 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
@chenrui333 chenrui333 deleted the bazel-1.2.0 branch December 18, 2022 04:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants