Repository navigation
Conversation
setup.csh closes an `if' with `fi', and site-setup.csh uses `elseif'.
Neither is csh, and tcsh does not accept them.
setup.csh is the damaging one. The block has an `else', so after running
either branch tcsh searches for `endif', runs off the end of the file, and
reports "if: then/endif not found" (tcsh sh.func.c:975). The script
therefore only completes when $RISCV/site-setup.csh is ABSENT -- when it is
present, sourcing succeeds and then setup fails at the last line.
site-setup.csh is quieter but not harmless: tcsh parses `elseif ( ... )' as
a command with a parenthesised argument and answers
Badly placed ()'s.
with no line number. The gcc-10 fallback branch is never taken, so on Ubuntu
20.04 the older toolchain is not put on PATH.
Both are one-token fixes: `fi' -> `endif', `elseif' -> `else if'.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Thank you for this improvement. Create an account with https://www.eclipse.org/ |
davidharrishmc
approved these changes
Sep 8, 2026
Contributor
|
Do you still want to proceed with this PR? |
Contributor
|
Thank you @tropibyte for finding and fixing these. We can't merge this PR because the Eclipse Contributor Agreement check hasn't passed for its author, so I've re-applied the same change in #1940, which credits you and this PR as the source. Closing in favor of #1940. |
rosethompson
pushed a commit
that referenced
this pull request
Oct 6, 2026
setup.csh closed an if/else with 'fi', so tcsh searched for endif, ran off the end of the file and failed with 'if: then/endif not found' whenever $RISCV/site-setup.csh exists. site-setup.csh used 'elseif', which tcsh rejects with 'Badly placed ()'s.', so the gcc-10 fallback was never taken. Reported and first fixed by @tropibyte in #1842; this is an independent copy of that two-token change because that PR cannot be merged without an Eclipse Contributor Agreement. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
Author
|
What is Eclipse Contributor Agreement check?
I am happy to help.
…On Tue, Oct 6, 2026 at 6:14 PM David Harris ***@***.***> wrote:
Closed #1842 <#1842>.
—
Reply to this email directly, view it on GitHub
<#1842?email_source=notifications&email_token=ANQIZTVCKIIRKLUFYGXGHBT5SVVE7A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRWGQYTKMBVGAYTPJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#event-32641505017>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANQIZTWNO4XWEXQ6CN3QTD35SVVE7AVCNFSNUABFKJSXA33TNF2G64TZHMZTEOJYGA3DMMJVHNEXG43VMU5TKMZWG42TSNJQGMZKC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ANQIZTXUEEPRSTE2VLRHKDD5SVVE7A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRWGQYTKMBVGAYTPJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FKMZXW65DFOJPWS33T>
and Android
<https://github.com/notifications/mobile/android/ANQIZTTEBHR7WMNSRQVRXAD5SVVE7A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRWGQYTKMBVGAYTPJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FOMZXW65DFOJPWC3TEOJXWSZA>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setup.cshcloses anifwithfi, andsite-setup.cshuseselseif. Neither is csh, and tcsh does not accept either.setup.csh:40—fishould beendifThis is the damaging one. The block has an
else, so after running either branch tcsh searches forendif, runs off the end of the file, and reports:(tcsh
sh.func.c:975.) The practical effect is thatsetup.cshonly completes when$RISCV/site-setup.cshis absent — when it is present, thesourcesucceeds and then setup fails at the very last line.site-setup.csh:57—elseifshould beelse ifQuieter, but not harmless. tcsh parses
elseif ( ... )as a command with a parenthesised argument and answerswith no line number, which is why it is easy to miss. The
gcc-10fallback branch is never taken, so on Ubuntu 20.04 the older toolchain is not placed onPATH.The change
Two tokens:
How this was found
Parsing a 1,287-script corpus of real-world csh/tcsh from 184 repositories with cshw, a csh implementation for Windows. Both files were verified to parse cleanly after the change.
Happy to split this into two PRs if you would rather take them separately.
🤖 Generated with Claude Code