Skip to content

user/helix: use env var for musl from https://docs.helix-editor.com/building-from-source.html#3878

Closed
zacharyburnett wants to merge 2 commits into
chimera-linux:masterfrom
zacharyburnett:update/helix
Closed

user/helix: use env var for musl from https://docs.helix-editor.com/building-from-source.html#3878
zacharyburnett wants to merge 2 commits into
chimera-linux:masterfrom
zacharyburnett:update/helix

Conversation

@zacharyburnett
Copy link
Copy Markdown
Contributor

@zacharyburnett zacharyburnett commented Apr 7, 2025

Description

when attempting hx --grammar build, the following error occurs:

error occurred in cc-rs: unknown target `x86_64-chimera-linux-musl`.

NOTE: `cc-rs` only supports a fixed set of targets when not in a build script.
- If adding a new target, you will need to fork of `cc-rs` until the target
  has landed on nightly and the auto-generated list has been updated. See also
  the `rustc` dev guide on adding a new target:
  https://rustc-dev-guide.rust-lang.org/building/new-target.html
- If using a custom target, prefer to upstream it to `rustc` if possible,
  otherwise open an issue with `cc-rs`:
  https://github.com/rust-lang/cc-rs/issues/new

The docs say to use the following env var when building:

RUSTFLAGS="-C target-feature=-crt-static"

Checklist

Before this pull request is reviewed, certain conditions must be met.

The following must be true for all changes:

The following must be true for template/package changes:

  • I have read Packaging.md
  • I have built and tested my changes on my machine

The following must be true for new package submissions:

  • I will take responsibility for my template and keep it up to date

@zacharyburnett zacharyburnett marked this pull request as draft April 7, 2025 16:33
@zacharyburnett zacharyburnett changed the title use env var from https://docs.helix-editor.com/building-from-source.html user/helix: use env var for musl from https://docs.helix-editor.com/building-from-source.html Apr 7, 2025
@zacharyburnett zacharyburnett marked this pull request as ready for review April 7, 2025 16:44
@zacharyburnett zacharyburnett marked this pull request as draft April 7, 2025 16:54
@zacharyburnett
Copy link
Copy Markdown
Contributor Author

oof, the package builds on my machine but hx --grammar build still doesn't work, I think I need to put the env var in a different place

@q66
Copy link
Copy Markdown
Member

q66 commented Apr 7, 2025

i'm not sure what you are trying to achieve here but this is completely unrelated and irrelevant, all chimera targets are shared crt by default

what you are running into is this rust-lang/cc-rs#1407 but that's not something a change in helix build will fix

@q66 q66 closed this Apr 7, 2025
@zacharyburnett zacharyburnett deleted the update/helix branch April 7, 2025 17:20
@zacharyburnett
Copy link
Copy Markdown
Contributor Author

zacharyburnett commented Apr 7, 2025

ok, as a workaround in case anyone else finds this, I built helix from source, ran hx --grammar fetch && hx --grammar build, and then copied the runtime/ dir to ~/.config/helix/runtime/, and the grammars are now functioning for the cports package.

@q66
Copy link
Copy Markdown
Member

q66 commented Apr 7, 2025

it'll probably fix itself when everything updates their lockfiles to cc-v1.2.17 or newer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants