-
Notifications
You must be signed in to change notification settings - Fork 694
Add troubleshooting guide and editorconfig #1311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
splint-disk-8i
wants to merge
3
commits into
apple:main
Choose a base branch
from
splint-disk-8i:fix/build-deps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+121
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # EditorConfig helps maintain consistent coding styles across editors | ||
| # https://editorconfig.org | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [Makefile] | ||
| indent_style = tab | ||
|
|
||
| [*.Makefile] | ||
| indent_style = tab | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
| [*.yml] | ||
| indent_size = 2 | ||
|
|
||
| [*.yaml] | ||
| indent_size = 2 | ||
|
|
||
| [*.json] | ||
| indent_size = 2 | ||
|
|
||
| [*.toml] | ||
| indent_size = 2 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # Troubleshooting | ||
|
|
||
| Known issues and workarounds. If your problem isn't listed here, check the [open issues](https://github.com/apple/container/issues) or file a new one. | ||
|
|
||
| ## Xcode or developer tools not found | ||
|
|
||
| Build errors about missing compilers usually mean `xcode-select` is pointing at the Command Line Tools instead of a full Xcode installation: | ||
|
|
||
| ```bash | ||
| xcode-select --print-path | ||
| ``` | ||
|
|
||
| If this returns `/Library/Developer/CommandLineTools`, switch it to Xcode: | ||
|
|
||
| ```bash | ||
| sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer | ||
| ``` | ||
|
|
||
| On macOS 26 you'll want the latest Xcode: | ||
|
|
||
| ```bash | ||
| sudo xcode-select --switch /Applications/Xcode-latest.app/Contents/Developer | ||
| ``` | ||
|
|
||
| ## Wrong Swift version | ||
|
|
||
| Swift 6.1+ is required. Check with `swift --version`. | ||
|
|
||
| If you have multiple toolchains, SPM picks whatever `swift` is first in `$PATH`. You can also just set `DEVELOPER_DIR` before building: | ||
|
|
||
| ```bash | ||
| DEVELOPER_DIR=/Applications/Xcode-latest.app/Contents/Developer make all | ||
| ``` | ||
|
|
||
| ## Permission errors during install | ||
|
|
||
| `make install` builds a `.pkg` and runs `sudo installer` to put binaries in `/usr/local`. If you don't have sudo or prefer a different location: | ||
|
|
||
| ```bash | ||
| DEST_DIR=~/.local/ SUDO= make install | ||
| ``` | ||
|
|
||
| Don't forget to add `~/.local/bin` to your `$PATH` afterwards. | ||
|
|
||
| See also [#1281](https://github.com/apple/container/issues/1281) for Homebrew-specific permission issues. | ||
|
|
||
| ## Network errors in integration tests | ||
|
|
||
| Integration tests spin up VMs that need outbound network access. Corporate proxies can interfere — try excluding the local ranges: | ||
|
|
||
| ```bash | ||
| export NO_PROXY="${NO_PROXY},192.168.0.0/16,fe80::/10" | ||
| export no_proxy="${no_proxy},192.168.0.0/16,fe80::/10" | ||
| make test integration | ||
| ``` | ||
|
|
||
| VPN can also cause issues, see [#1307](https://github.com/apple/container/issues/1307). | ||
|
|
||
| ## Kernel install hangs | ||
|
|
||
| The `install-kernel` target starts the container system and waits for the kernel to finish installing. If it times out: | ||
|
|
||
| 1. Stop the system: `bin/container system stop` | ||
| 2. Give launchd a few seconds to clean up | ||
| 3. Try again with a longer timeout: `bin/container --debug system start --timeout 120` | ||
| 4. Run `make install-kernel` again | ||
|
|
||
| Still stuck? Check for stale launchd services: | ||
|
|
||
| ```bash | ||
| launchctl list | grep com.apple.container | ||
| ``` | ||
|
|
||
| You can clean these up with `scripts/ensure-container-stopped.sh -a`. See [#1280](https://github.com/apple/container/issues/1280) and [#1306](https://github.com/apple/container/issues/1306) for related issues. | ||
|
|
||
| ## vmnet fails under ~/Documents or ~/Desktop | ||
|
|
||
| macOS 26 has a bug in the `vmnet` framework — network creation fails if the project or helper binaries sit under `~/Documents` or `~/Desktop`. Move the project somewhere else: | ||
|
|
||
| ```bash | ||
| mv ~/Documents/container ~/projects/container | ||
| ``` | ||
|
|
||
| Alternatively, `make install` puts binaries in `/usr/local` which isn't affected. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super helpful and thank you for starting on it! Take a look at #773, as it relates to the changes you made here.
Feel free to work on any other points in that issue, but due to scope, I think this PR is good as is and should serve as the initial setup of the section itself, with a couple of solutions (like you have). This also might live better in its own file and can instead be linked to in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just looked at #773 — makes sense to keep a dedicated troubleshooting doc. Want me to split it into a separate file and link it from BUILDING.md in this PR, or should I do that in a follow-up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the changes should be done in this PR. The idea is to follow the first step from the issue, but start on a much smaller scale, since this will serve as the baseline to follow in the future. Also, there will be a lot more issues to add and we don't the
Building.mdfile to become too large.What do you think about the steps below for a first iteration?
Building.md.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea — I moved the troubleshooting content into its own
TROUBLESHOOTING.mdand added a link fromBUILDING.md. Also cross-referenced a few related issues, where I could find them. Let me know if this is what you had in mind.