Cookbook document what Operation not permitted means

This commit is contained in:
mohawk2 2024-04-29 14:30:15 +01:00 committed by GitHub
parent c076a46c19
commit cba3943ade
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1175,6 +1175,8 @@ brew search --fink foo
`superenv` is our "super environment" that isolates builds by removing `/usr/local/bin` and all user `PATH`s that are not essential for the build. It does this because user `PATH`s are often full of stuff that breaks builds. `superenv` also removes bad flags from the commands passed to `clang`/`gcc` and injects others (for example all [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method) dependencies are added to the `-I` and `-L` flags).
If in your local Homebrew build of your new formula, you see `Operation not permitted` errors, this will be because your new formula tried to write to the disk outside of your sandbox area. This is enforced on MacOS by `sandbox-exec`.
### Fortran
Some software requires a Fortran compiler. This can be declared by adding `depends_on "gcc"` to a formula.