@@ -405,3 +405,12 @@ MB) but the build log (.build/xcode/Logs/Build/*.xcactivitylog, gzip) still show
405
405
added CLANG_COVERAGE_MAPPING=NO everywhere. Still to verify on the Mac.
406
406
Verified by the user on the Mac (2026-11-26): no more default.profraw after install.sh with
407
407
CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO. Local tag v0.2.0 moved to dbbd03c.
408
+
409
+## 2026-11-26 — compat.sh build fails with "Operation not permitted"
410
+
411
+User's `scripts/compat.sh` failed twice writing into `.build/xcode` (swiftmodule, .o, then ld on
412
+Products/Release/_NumericsShims.o); stopping kDrive did not help; deleting Intermediates needed
413
+`sudo`. Hypothesis (to confirm with `find .build -user root`): a build ran as root around 15:44
414
+(the failing files date from then) and left root-owned files. Fix proposed: `sudo chown -R
415
+$(whoami) .build`. install.sh and release.sh now refuse to run as root; troubleshooting row in the
416
+build how-to EN+FR. Earlier suspicion on kDrive and on sandbox reads of .build/xcode not confirmed.
@@ -405,3 +405,12 @@ MB) but the build log (.build/xcode/Logs/Build/*.xcactivitylog, gzip) still show
405
added CLANG_COVERAGE_MAPPING=NO everywhere. Still to verify on the Mac.
405
added CLANG_COVERAGE_MAPPING=NO everywhere. Still to verify on the Mac.
406
Verified by the user on the Mac (2026-11-26): no more default.profraw after install.sh with
406
Verified by the user on the Mac (2026-11-26): no more default.profraw after install.sh with
407
CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO. Local tag v0.2.0 moved to dbbd03c.
407
CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO. Local tag v0.2.0 moved to dbbd03c.
408
+
409
+## 2026-11-26 — compat.sh build fails with "Operation not permitted"
410
+
411
+User's `scripts/compat.sh` failed twice writing into `.build/xcode` (swiftmodule, .o, then ld on
412
+Products/Release/_NumericsShims.o); stopping kDrive did not help; deleting Intermediates needed
413
+`sudo`. Hypothesis (to confirm with `find .build -user root`): a build ran as root around 15:44
414
+(the failing files date from then) and left root-owned files. Fix proposed: `sudo chown -R
415
+$(whoami) .build`. install.sh and release.sh now refuse to run as root; troubleshooting row in the
416
+build how-to EN+FR. Earlier suspicion on kDrive and on sandbox reads of .build/xcode not confirmed.
modifieddocs/en/how-to/build-on-the-mac.md+1-0
@@ -60,6 +60,7 @@ The script never overwrites or removes an `rzb` launcher it did not write.
60
60
| Symptom | Fix |
61
61
| --- | --- |
62
62
| The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
63
+| `Operation not permitted` or `can't write output file` under `.build/xcode` | A build ran with `sudo` and left files owned by root. Run `sudo chown -R "$(whoami)" .build`, then build again without `sudo` (`scripts/install.sh` asks for it itself, only to copy). |
63
64
| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
64
65
| `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
65
66
@@ -60,6 +60,7 @@ The script never overwrites or removes an `rzb` launcher it did not write.
60
| Symptom | Fix |
60
| Symptom | Fix |
61
| --- | --- |
61
| --- | --- |
62
| The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
62
| The build fails while compiling MLX's Metal shaders (the `metal` tool is missing) | Run `xcodebuild -downloadComponent MetalToolchain`. |
63
+| `Operation not permitted` or `can't write output file` under `.build/xcode` | A build ran with `sudo` and left files owned by root. Run `sudo chown -R "$(whoami)" .build`, then build again without `sudo` (`scripts/install.sh` asks for it itself, only to copy). |
63
| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
64
| A `default.profraw` file appears in the folder where `rzb` ran | `rzb` was built without `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO`: the package scheme gathers test coverage and instruments the Release build too. Rebuild with the command above (or `scripts/install.sh`) and delete the file. |
64
| `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
65
| `Failed to load the default metallib` when a model loads | `rzb` was built with `swift build`, or copied away from `mlx-swift_Cmlx.bundle`. Build with `xcodebuild` as above and run it from `Build/Products/Release`. |
65
66
modifieddocs/fr/how-to/compiler-sur-le-mac.md+1-0
@@ -60,6 +60,7 @@ Le script n'écrase ni ne supprime jamais un lanceur `rzb` qu'il n'a pas écrit.
60
60
| Symptôme | Solution |
61
61
| --- | --- |
62
62
| La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
63
+| `Operation not permitted` ou `can't write output file` sous `.build/xcode` | Une compilation a tourné avec `sudo` et laissé des fichiers appartenant à root. Lancez `sudo chown -R "$(whoami)" .build`, puis recompilez sans `sudo` (`scripts/install.sh` le demande lui-même, seulement pour la copie). |
63
64
| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
64
65
| `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
65
66
@@ -60,6 +60,7 @@ Le script n'écrase ni ne supprime jamais un lanceur `rzb` qu'il n'a pas écrit.
60
| Symptôme | Solution |
60
| Symptôme | Solution |
61
| --- | --- |
61
| --- | --- |
62
| La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
62
| La compilation échoue en compilant les shaders Metal de MLX (l'outil `metal` manque) | Lancez `xcodebuild -downloadComponent MetalToolchain`. |
63
+| `Operation not permitted` ou `can't write output file` sous `.build/xcode` | Une compilation a tourné avec `sudo` et laissé des fichiers appartenant à root. Lancez `sudo chown -R "$(whoami)" .build`, puis recompilez sans `sudo` (`scripts/install.sh` le demande lui-même, seulement pour la copie). |
63
| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
64
| Un fichier `default.profraw` apparaît dans le dossier où `rzb` a tourné | `rzb` a été compilé sans `CLANG_ENABLE_CODE_COVERAGE=NO CLANG_COVERAGE_MAPPING=NO` : le scheme du package mesure la couverture des tests et instrumente aussi la compilation Release. Recompilez avec la commande ci-dessus (ou `scripts/install.sh`) et supprimez le fichier. |
64
| `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
65
| `Failed to load the default metallib` au chargement d'un modèle | `rzb` a été compilé avec `swift build`, ou copié loin de `mlx-swift_Cmlx.bundle`. Compilez avec `xcodebuild` comme ci-dessus et lancez-le depuis `Build/Products/Release`. |
65
66
modifiedscripts/install.sh+6-0
@@ -28,6 +28,12 @@ done
28
28
29
29
fail(){echo"install.sh: $*" >&2;exit 1;}
30
30
31
+# Never as root: the build would leave root-owned files in .build that later builds, run as
32
+# the user, cannot replace ("Operation not permitted").
33
+if[["$(id -u)"==0]];then
34
+ fail "do not run this script with sudo: it asks for sudo itself, only to copy into the prefix"
35
+fi
36
+
31
37
products=.build/xcode/Build/Products/Release
32
38
home="$prefix/lib/razorbill"
33
39
launcher="$prefix/bin/rzb"
@@ -28,6 +28,12 @@ done
28
28
29
fail(){echo"install.sh: $*" >&2;exit 1;}
29
fail(){echo"install.sh: $*" >&2;exit 1;}
30
30
31
+# Never as root: the build would leave root-owned files in .build that later builds, run as
32
+# the user, cannot replace ("Operation not permitted").
33
+if[["$(id -u)"==0]];then
34
+ fail "do not run this script with sudo: it asks for sudo itself, only to copy into the prefix"
35
+fi
36
+
31
products=.build/xcode/Build/Products/Release
37
products=.build/xcode/Build/Products/Release
32
home="$prefix/lib/razorbill"
38
home="$prefix/lib/razorbill"
33
launcher="$prefix/bin/rzb"
39
launcher="$prefix/bin/rzb"
modifiedscripts/release.sh+6-0
@@ -27,6 +27,12 @@ done
27
27
28
28
fail(){echo"release.sh: $*" >&2;exit 1;}
29
29
30
+# Never as root: the build would leave root-owned files in .build that later builds, run as
31
+# the user, cannot replace ("Operation not permitted").
32
+if[["$(id -u)"==0]];then
33
+ fail "do not run this script with sudo"
34
+fi
35
+
30
36
version=$(sed -n 's/.*static let version = "\([^"]*\)".*/\1/p' Sources/RazorbillCore/Razorbill.swift)
31
37
[[ -n "$version"]]|| fail "no version found in Sources/RazorbillCore/Razorbill.swift"
32
38
name="razorbill-${version}-macos-arm64"
@@ -27,6 +27,12 @@ done
27
27
28
fail(){echo"release.sh: $*" >&2;exit 1;}
28
fail(){echo"release.sh: $*" >&2;exit 1;}
29
29
30
+# Never as root: the build would leave root-owned files in .build that later builds, run as
31
+# the user, cannot replace ("Operation not permitted").
32
+if[["$(id -u)"==0]];then
33
+ fail "do not run this script with sudo"
34
+fi
35
+
30
version=$(sed -n 's/.*static let version = "\([^"]*\)".*/\1/p' Sources/RazorbillCore/Razorbill.swift)
36
version=$(sed -n 's/.*static let version = "\([^"]*\)".*/\1/p' Sources/RazorbillCore/Razorbill.swift)
31
[[ -n "$version"]]|| fail "no version found in Sources/RazorbillCore/Razorbill.swift"
37
[[ -n "$version"]]|| fail "no version found in Sources/RazorbillCore/Razorbill.swift"
32
name="razorbill-${version}-macos-arm64"
38
name="razorbill-${version}-macos-arm64"
One first-party cookie so a repeat visit isn't counted twice. No cross-site tracking, nothing stored until you accept. Cookie Policy.