mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-23 07:55:20 +00:00
Fixes https://github.com/zed-industries/zed/issues/24880
# Objective
"Assisted/analysed by AI"
> The remote_server musl build failed with undefined references to
__isoc23_sscanf and __isoc23_strtol from aws-lc-sys because the default
C compiler used glibc headers while linking against musl libc. Setting
CC_<target>=musl-gcc ensures C dependencies compile with musl headers.
I have tested the fix, and it seems to have fixed the compilation issue
I faced on Fedora 44, without resorting to the [hack noted in
docs](https://zed.dev/docs/development/linux#installing-a-development-build).
Initially reported in this
[issue](https://github.com/zed-industries/zed/issues/24880).
I'd want someone with expertise in the domain to take a look at this
fix, as from what I understand, the process in the doc is a hacky
workaround.
## Solution
Setting CC_<target>=musl-gcc ensures C dependencies compile with musl
headers.
## Testing
- Did you test these changes? If so, how?
<details><summary>Here's my steps to repro:</summary>
1. install [toolbox](https://github.com/containers/toolbox) (or
podman-toolbox)
(I used toolbox as it's easy to reuse the cloned repo, as the whole home
dir is mounted in the devcontainer)
Used the main branch - commit
|
||
|---|---|---|
| .. | ||
| danger | ||
| flatpak | ||
| lib | ||
| licenses | ||
| terms | ||
| update_top_ranking_issues | ||
| analyze_highlights.py | ||
| bootstrap | ||
| bootstrap.ps1 | ||
| build-docker | ||
| bump-extension-cli | ||
| bump-gpui-version | ||
| bump-nightly | ||
| bump-zed-version | ||
| bundle-freebsd | ||
| bundle-linux | ||
| bundle-mac | ||
| bundle-windows.ps1 | ||
| cargo | ||
| cargo-timing-info.js | ||
| check-keymaps | ||
| check-licenses | ||
| check-links | ||
| check-todos | ||
| cherry-pick | ||
| clear-target-dir-if-larger-than | ||
| clear-target-dir-if-larger-than.ps1 | ||
| clippy | ||
| clippy.ps1 | ||
| collab-flamegraph | ||
| community-pr-track-mapping.json | ||
| crate-dep-graph | ||
| create-draft-release | ||
| debug-cli | ||
| deploy-collab | ||
| determine-release-channel | ||
| determine-release-channel.ps1 | ||
| digital-ocean-db.sh | ||
| docs-strip-preview-callouts | ||
| docs-suggest | ||
| docs-suggest-publish | ||
| download-wasi-sdk | ||
| draft-release-notes | ||
| drop-test-dbs | ||
| exit-ci-if-dev-drive-is-full.ps1 | ||
| freebsd | ||
| generate-action-metadata | ||
| generate-licenses | ||
| generate-licenses-csv | ||
| generate-licenses.ps1 | ||
| generate-terms-rtf | ||
| get-crate-version | ||
| get-crate-version.ps1 | ||
| get-pull-requests-since | ||
| get-release-notes-since | ||
| get-released-version | ||
| github-assign-contributor-issue.py | ||
| github-check-new-issue-for-duplicates.py | ||
| github-clean-issue-types.py | ||
| github-community-pr-board.py | ||
| github-find-top-duplicated-bugs.py | ||
| github-guild-board.py | ||
| github-pr-status | ||
| github-track-duplicate-bot-effectiveness.py | ||
| histogram | ||
| import-themes | ||
| install-cmake | ||
| install-linux | ||
| install-rustup.ps1 | ||
| install.sh | ||
| kube-shell | ||
| linux | ||
| metal-debug | ||
| mitm-proxy.sh | ||
| new-crate | ||
| prettier | ||
| prompts | ||
| randomized-test-ci | ||
| randomized-test-minimize | ||
| remote-server | ||
| reset_db | ||
| run-background-agent-mvp-local | ||
| run-local-minio | ||
| run-unit-evals | ||
| seed-db | ||
| select-sentry-crash-candidates | ||
| sentry-fetch | ||
| setup-dev-driver.ps1 | ||
| setup-sccache | ||
| setup-sccache.ps1 | ||
| shellcheck-scripts | ||
| snap-build | ||
| snap-try | ||
| squawk | ||
| test-docs-suggest-batch | ||
| test-wsl-sandbox.ps1 | ||
| triage_project_sync.py | ||
| triage_watcher.jl | ||
| trigger-docs-build | ||
| trigger-release | ||
| uninstall.sh | ||
| update-json-schemas | ||
| upload-extension-cli | ||
| upload-nightly | ||
| upload-nightly.ps1 | ||
| verify-macos-document-icon | ||
| what-is-deployed | ||
| zed-local | ||