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

Bump LLVM to 19.1.7 #1653

Merged
merged 6 commits into from
Jan 16, 2025
Merged

Bump LLVM to 19.1.7 #1653

merged 6 commits into from
Jan 16, 2025

Conversation

sunshaoce
Copy link
Contributor

No description provided.

@TommyMurphyTM1234
Copy link
Collaborator

Shouldn't .gitmodules also be updated?

@sunshaoce
Copy link
Contributor Author

Shouldn't .gitmodules also be updated?

Done. Thanks!

@TommyMurphyTM1234
Copy link
Collaborator

The CI failure seems odd and not directly related to this change?

@sunshaoce
Copy link
Contributor Author

It should be an issue with my local Git repository, but I don't know exactly where the problem lies.

@TommyMurphyTM1234
Copy link
Collaborator

It should be an issue with my local Git repository, but I don't know exactly where the problem lies.

I don't think that that's it - the failure is on the GitHub CI side so should have nothing to do with your repos... I'll try a build later to see if I can spot anything.

@sunshaoce
Copy link
Contributor Author

It seems to be affected by the shallow option of git clone, making it unable to checkout ca371cf9c48186716d26c8e10d442affaf002c80.

@TommyMurphyTM1234
Copy link
Collaborator

I don't think that simply removing the shallow clone/checkout is the correct solution here as it undoes changes recently applied here:

Maybe @mickflemm might have some better idea?

Copy link
Collaborator

@TommyMurphyTM1234 TommyMurphyTM1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope this helps!

@@ -50,7 +50,7 @@ jobs:

- name: Checkout required submodules
if: steps.smcache.outputs.cache-hit != 'true'
run: git submodule update --init -j $(nproc) --depth 1 $(echo ${submodule_paths} | sed '$d' | tr '\n' ' ')
run: git submodule update --init -j $(nproc) $(echo ${submodule_paths} | sed '$d' | tr '\n' ' ')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the PR conversation I don't think that this is the correct solution since the shallow clone/checkout was deliberately added recently for a specific purpose:

Ditto for the removal of shallow = true in .gitmodules below.

[submodule "llvm"]
path = llvm
url = https://github.com/llvm/llvm-project.git
branch = release/18.x
shallow = true
branch = release/19.x
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Branch release/19.x:

is commit 61c9f97:

But this PR changes the submodule commit from 3b5b5c to e21dc4b.

Isn't this a mismatch?

Copy link
Contributor Author

@sunshaoce sunshaoce Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch release/19.x has tag llvmorg-19.1.6 ( e21dc4b, https://github.com/llvm/llvm-project/tree/llvmorg-19.1.6 ) . When I submitted (including now), there was no llvmorg-19.1.7 (61c9f97) related tag. I will update it as soon as it becomes available.

.gitmodules Outdated
@@ -2,56 +2,44 @@
path = binutils
url = https://sourceware.org/git/binutils-gdb.git
branch = binutils-2_43-branch
shallow = true
Copy link
Collaborator

@TommyMurphyTM1234 TommyMurphyTM1234 Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See earlier review comment about removing the shallow clone/checkout functionality.

@TommyMurphyTM1234
Copy link
Collaborator

TommyMurphyTM1234 commented Jan 13, 2025

I tried to bump LLVM locally to see if I could reproduce the CI failure but I hit other issues along the way...

git clone https://github.com/riscv-collab/riscv-gnu-toolchain pull-1653
Cloning into 'pull-1653'...
remote: Enumerating objects: 9508, done.
remote: Counting objects: 100% (415/415), done.
remote: Compressing objects: 100% (101/101), done.
remote: Total 9508 (delta 353), reused 316 (delta 314), pack-reused 9093 (from 2)
Receiving objects: 100% (9508/9508), 6.46 MiB | 6.68 MiB/s, done.
Resolving deltas: 100% (4729/4729), done.

cd pull-1653

# Edit .gitmodules to bump LLVM
# [submodule "llvm"]
#        path = llvm
#        url = https://github.com/llvm/llvm-project.git
#        branch = release/19.x
#        shallow = true

git submodule update

cd llvm

git checkout -b release/19.x
Switched to a new branch 'release/19.x'

git pull https://github.com/llvm/llvm-project
remote: Enumerating objects: 6217989, done.
remote: Counting objects: 100% (8728/8728), done.
remote: Compressing objects: 100% (1221/1221), done.
remote: Total 6217989 (delta 8321), reused 7510 (delta 7507), pack-reused 6209261 (from 2)
Receiving objects: 100% (6217989/6217989), 1.58 GiB | 10.10 MiB/s, done.
Resolving deltas: 100% (5154153/5154153), done.
From https://github.com/llvm/llvm-project
 * branch                      HEAD       -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

I've tried various other approaches to updating the submodule to the release/19.x commit but get the same or similar problems so I'm not sure what's the correct way to do this...

I don't understand why the CI build fails because it cannot find the relevant Binutils commit when the shallow clone/checkout is used. And I can't see how bumping LLVM would trigger this.

FWIW I cannot reproduce the problem with the "missing/unavailable" Binutils commit if I just clone, configure and build as usual from the repo master/head.

@sunshaoce
Copy link
Contributor Author

Many thanks to @TommyMurphyTM1234 for the patient response. Indeed, the shallow=true and --depth=1 code should not be removed in this PR. However, after trying this approach https://github.com/riscv-collab/riscv-gnu-toolchain/actions/runs/12743602742, it seems to resolve the issue.

@TommyMurphyTM1234
Copy link
Collaborator

However, after trying this approach https://github.com/riscv-collab/riscv-gnu-toolchain/actions/runs/12743602742, it seems to resolve the issue.

I don't undestand this. Is the link correct? It seems to link to a CI run status. What approach are you referring to?

@sunshaoce
Copy link
Contributor Author

I don't undestand this. Is the link correct? It seems to link to a CI run status. What approach are you referring to?

Sorry, I didn't express myself clearly. At that time, I removed shallow and depth=1, and then the CI passed.

@sunshaoce sunshaoce changed the title Bump LLVM to 19.1.6 Bump LLVM to 19.1.7 Jan 15, 2025
@cmuellner
Copy link
Collaborator

I don't undestand this. Is the link correct? It seems to link to a CI run status. What approach are you referring to?

Sorry, I didn't express myself clearly. At that time, I removed shallow and depth=1, and then the CI passed.

I've just created #1655 (as a quick workaround).

@TommyMurphyTM1234
Copy link
Collaborator

@cmuellner
Copy link
Collaborator

Please rebase this PR to fix the CI issue.

Copy link
Collaborator

@cmuellner cmuellner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmuellner cmuellner merged commit 071541e into riscv-collab:master Jan 16, 2025
27 checks passed
@cmuellner
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants