Merge pull request #17176 from mohawk2/patch-1

Cookbook document what `Operation not permitted` means
This commit is contained in:
Mike McQuaid 2024-04-30 09:05:27 +01:00 committed by GitHub
commit 11348b348e
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.