mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2990] [Other] sycl/tools/build.sh exits 1 after a successful build and 0 after a failed compile #1200
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thc1006 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2990
Area
[Other] (anything else, including setup and installation)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
sycl/tools/build.shsetspipefailand has noexit, so the script exits with the status of its last pipeline:After a successful build this
grepfinds nothing and returns 1. After a failed compile it finds ninja'sFAILED:lines and returns 0. TheBUILD EXITline that the script prints is correct.With the script from 0.2.0-beta (
3d1fb48), which is byte-identical to the one in 0.1.45 (477ac13):BUILD_DIRset to the build directory of a small CMake project that builds, it printedBUILD EXIT 0anderrors: 0, and exited with 1.BUILD_DIRset to the same project with a compile error, it printedBUILD EXIT 1anderrors: 1, and exited with 0.With 0.1.45 it also exited with 1 in a SYCL build directory with nothing left to build, after printing
BUILD EXIT 0anderrors: 0.The image's entrypoint is
bash -lc, so indocker run ... strata-sycl-dev "cd /work/$H && bash sycl/tools/build.sh strata" && <next step>, the next step is skipped after a good build and runs after a failed compile.docs/A770_SPEED_SPEC.mdalready notes the first case and says not to chain tests behind the script.Saving
${PIPESTATUS[0]}right after the build and ending the script withexiton that value would fix it.Smallest steps or command that reproduce it
Two small CMake projects with one target named
strata(Ninja, g++ 11.4), configured withcmake -G Ninja:src-good/main.cppisint main() { return 0; },src-bad/main.cppisint main() { return x; }. Then, for each:Output with the script from 0.2.0-beta (sha256
a5f95ab736c072b9160d523456454c8689791750cfae91f82f03e2a97374b122, the same as 0.1.45's):The 0.1.45 runs, the SYCL build directory included, are in
sycl-build-sh-exit-20261018.txt.Reproduction status
Reproduced locally
Strata version
0.2.0-beta (
3d1fb48);sycl/tools/build.shis unchanged since 0.1.45 (477ac13)Graphics card, memory and system
No Intel GPU (the script ran outside the strata-sycl-dev image) · 4× Tesla P100 16 GB · 62.8 GiB RAM · Ubuntu 22.04.5
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@thc1006 commented on GitHub (Oct 19, 2026):
/reopen
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Reopened, thank you. A maintainer will pick it up from here.
@Niko1221 commented on GitHub (Oct 27, 2026):
Thanks. Confirmed on main: the script ends with greps and an if, so a failed compile exits 0 (the good build now exits 0 only because of the ocloc check added at the end after 0.2.0). Fixed in 0.2.7: It exits with the build's own status, with a test using a stub cmake.
Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7