Repository navigation
fix: update clang/lld version to fix #13972 - #13988
Conversation
|
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
|
Renamed to make the robot happy. |
|
@pcc on #llvm IRC found the exact revision that fixed it: https://github.com/llvm-project/lld/commit/1adba6d5d2f5f51d0719e81f71461437ecc1bd59 - another approach would be to simply cherry-pick this to the current clang revision (though I'm not sure if this is possible with the way the artifacts are produced). |
|
@K900 Thanks for the awesome work with debugging the issue. This bumps 3 different clang rolls in chromium https://chromium-review.googlesource.com/c/chromium/src/+/582074 i believe we should also build https://github.com/electron/libchromiumcontent/tree/electron-2-0-x with the same clang revision. /cc @nornagon @zcbenz As a side note the sysroot we build 2-0-x with comes from https://github.com/electron/debian-sysroot-image-creator/tree/jessie that has an older glibc, should we also update it ? |
|
For Clang rolls, I'd rather leave it up to people who understand the process better - I'm not really familiar enough with what changes in those revisions, I just picked one that seemed sensible and made sure things build with it. The exact revision that fixes the linker bug is 308681, so even the first roll (308728) should be good enough for fixing this issue if you want to go with that. libchromiumcontent works fine with the existing prebuilts, I'm not really sure it needs to be rebuilt. As for glibc - it's probably a good idea to stay with an older version, since that ensures forward compatibility (assuming no further linker nonsense). Also, @zatrazz might know more here, being a glibc core dev :) |
|
Also re: the sysroot: the debug builds it produces don't actually run on Arch thanks to incompatible Freetype - the release builds work fine though, as they're statically linked, so I don't think that's an issue. |
See upstream: https://chromium-review.googlesource.com/c/chromium/src/+/582074 We don't need any of the other changes from that CL, because they're all fuchsia- or iOS-only. Ref electron/electron#13988
|
It's a little concerning to build electron with a different version of clang than libcc was built with. It looks like the changes that were made in chromium related to the roll are only fuchsia and iOS related, so we don't need to worry about updating anything other than the clang version. I made electron/libchromiumcontent#643 to kick off a test build, using just the first roll (307486:308728). Would be great if you could update this PR with the smaller clang revision. Once the libcc patch lands, we should also update this PR to include the updated libchromiumcontent submodule reference. |
|
I'll update the PR as soon as I get to my build machine and make sure the builds work fine. This will probably take me a few hours :) |
See upstream: https://chromium-review.googlesource.com/c/chromium/src/+/582074 We don't need any of the other changes from that CL, because they're all fuchsia- or iOS-only. Ref electron/electron#13988
MarshallOfSound
left a comment
There was a problem hiding this comment.
Requesting changes to ensure we have this discussion, changing this is scary enough in itself. But changing it throughout the entire toolchain for a "fix" / "patch" release of Electron scares me.
How confident are we that bumping the revision to fix this glibc issue won't introduce new issues.
|
It's not a glibc issue really, it's an lld bug that causes it to produce binaries that were only working on older glibc versions by pure luck. If we want to avoid updating the whole toolchain, we can probably build a custom clang distro with that single patch applied - that way there's a lot less risk, but I'm not sure what the process for that is. |
Agreed, the clang roll we decided to go with |
|
Also potentially interesting is that Arch has compiled Electron successfully with the default toolchain (LLVM 6.0.1 stable), and it works just fine for people. Obviously, that's not representative of the total Electron install base, but any extra confirmation we can get is good. |
|
@K900 electron/libchromiumcontent#643 builds are done, can you update the submodule reference and also the clang revision to verify again. Thanks! |
This seems like some sort of a weird linker bug, so just update the toolchain a bit.
|
Here goes... |
|
The tests are fine, I'm also running a local build to make sure the linking is fine, will update as soon as that's done. |
Looks good - no absolute symbols anywhere in libnode. |
|
Arch has reverted the glibc commit that breaks things for now, so Electron should be back to functional for everyone, but I'd still push for a proper fix on the Electron side of things - it only works through pure luck on the old versions. |
ckerr
left a comment
There was a problem hiding this comment.
I'm OK with this change (and appreciate you doing the research on it, @K900!) but am concerned about it going straight to stable. Since it's c62 specific, and since we don't dot betas for point releases, I'm not sure what the Right Thing is for ensuring this doesn't have side-effects.
So at a minimum I'd at least like to get consensus from the maintainers. So, let's resolve this at the Monday meeting.
Marking as 'Request changes' solely to pause the PR until Monday.
|
I believe this is causing Rocket Chat Desktop segmentation fault on start on Arch Linux |
|
Yep, that's most likely it. You can try using a custom Electron build for now, or wait until we figure something out here. |
|
@ckerr @MarshallOfSound any update on this? |
Not everyone, just Arch Linux. I'm under the impression that Fedora rawhide for one is still broken. Also, you unambiguously need this fix, unless you convince the glibc devs to revert things on the glibc side. Otherwise, once other distros start shipping glibc 2.28, they'll break too... also Arch will not carry this patch around forever, it's a temporary workaround to give downstreams time to ship fixed electron binaries. :) |
|
To be fair, Electron 3 is built with a toolchain that's not affected, and downstreams will probably switch to that pretty soon. That said, a fix on the Electron 2.x branch is still needed IMO. |
@eli-schwartz which patch is that? I haven't seen mention of a fix in https://bugs.archlinux.org/task/59550, other than your |
|
It's just a It's the same thing I did to test with that custom glibc package. |
|
Sure :) So should I merge now? |
|
Oh, need @MarshallOfSound to approve first... |
|
Also, what's the process for getting a release out once this lands? I'd love to give downstreams a stable version to update to ASAP, before distros start shipping glibc 2.28. |
|
No Release Notes |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
MarshallOfSound
left a comment
There was a problem hiding this comment.
This is 👌 given the testing that's been done
|
A few more questions here:
|
This seems like some sort of a weird linker bug, so just update the toolchain a bit. The exact clang revision is from the 3.0 branch (Chromium 62), I've picked this specific one because it's the closest that's known to be generally "good", having been used on the 3.0 branch for a while.
Some tests (
Browser.showetc.) don't actually pass on my machine thanks to what I assume is a race condition between Electron itself and Kwin, but they don't pass on the old version either, so it's probably just me - let's see what CI says.Checklist
npm testpasses