Skip to content
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

tree-sitter with musl target #1028

Closed
ath3 opened this issue Nov 8, 2021 · 15 comments
Closed

tree-sitter with musl target #1028

ath3 opened this issue Nov 8, 2021 · 15 comments
Labels
A-packaging Area: Packaging and bundling C-enhancement Category: Improvements

Comments

@ath3
Copy link
Contributor

ath3 commented Nov 8, 2021

When i build helix with --target=x86_64-unknown-linux-musl, tree-sitter related things dont seem to work.
There is no syntax highlight and textobject queries.
LSP seems to work.

Content of helix.log:

2021-11-08T23:30:37.722 helix_lsp::transport [ERROR] err <- "[ERROR project_model::workspace] cyclic deps: helix_view(CrateId(167)) -> helix_tui(CrateId(161)), alternative path: helix_tui(CrateId(161)) -> helix_view(CrateId(167))\n"

@archseer
Copy link
Member

archseer commented Nov 9, 2021

Try cargo clean & wipe runtime/grammars/*. It's possible the grammars didn't get recompiled with musl.

@ath3
Copy link
Contributor Author

ath3 commented Nov 9, 2021

I got the following error message now:

error: failed to run custom build command for helix-syntax v0.5.0 (/home/ath3/git/helix/helix-syntax)

Caused by:
process didn't exit successfully: /home/ath3/git/helix/target/debug/build/helix-syntax-a80d4d6fcd798bad/build-script-build (exit status: 101)
--- stdout
Build language elixir
Build language glsl
Build language protobuf
Build language cpp
Build language yaml
Build language agda
Build language cmake
Build language svelte
Build language css
Build language latex
Build language ledger
Build language go
Build language java
Build language lua
Build language julia
Build language toml
Build language nix
Build language zig
Build language bash
Build language c-sharp
Build language php
Build language json
Build language scala
Build language c
Build language javascript
Build language perl
Build language rust
Build language python
Build language vue
Build language ruby
Build language swift
Build language tsq
Build language html

--- stderr
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread 'thread '' panicked at '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', ', helix-syntax/build.rshelix-syntax/build.rs::172172::3636

thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'thread 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs' panicked at ':called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)172', :helix-syntax/build.rs36:
172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread '' panicked at 'called Result::unwrap() on an Err value: Failed to execute C compiler

Caused by:
No such file or directory (os error 2)', helix-syntax/build.rs:172:36
thread 'main' panicked at 'assertion failed: (left == right)
left: 0,
right: 33', helix-syntax/build.rs:201:5
warning: build failed, waiting for other jobs to finish...
error: build failed

@ath3
Copy link
Contributor Author

ath3 commented Nov 11, 2021

Can we label this as bug? Unless its working for other people of course.

@archseer
Copy link
Member

I think you're likely missing some environment variables so cc-rs can find the compiler.

@archseer
Copy link
Member

CC etc

@archseer
Copy link
Member

Possibly missing musl-gcc? rust-lang/cc-rs#105 (comment)

@jlneder
Copy link

jlneder commented Nov 17, 2021

I have a similar problem. I am using Void Linux with musl.
I removed the runtime/grammars folder, ran cargo clean, built helix with cargo install --path helix-term --target=x86_64-unknown-linux-musl and copied the runtime folder to ~/.config/helix/runtime.
Even when i use helix with three v as in hx -vvv rustfile.rs the log file in ~/.cache/helix/helix.log is still empty.
I have no syntax highlight and no LSP support.
I installed tree-sitter, but i guess maybe I'm missing some package or lsp server or something?

@ath3
Copy link
Contributor Author

ath3 commented Nov 17, 2021

Yeah, as it stands now, i cant use helix on our rhel8 work machine.
@archseer: would it be possible to offer musl builds for release versions?

@kirawi kirawi added A-packaging Area: Packaging and bundling C-enhancement Category: Improvements labels Nov 19, 2021
@pickfire
Copy link
Contributor

pickfire commented Nov 20, 2021

My pi (2b) uses musl too bad sadly I can't even build some of the dependencies (non-helix) there. If possible I could have tested it there.

@archseer
Copy link
Member

Looks like #1603 is building on musl

@pascalkuthe
Copy link
Member

Since helix is now packaged for alpine (see #1603 (comment)) which ships musl this seems resolved to me.

@archseer
Copy link
Member

Alpine patches their Rust distribution to pass the extra flag. It's still an issue but should be worked around by the end user. Maybe we could add it to the documentation

@pascalkuthe
Copy link
Member

I did leave #1603 open as I wasn't 100% sure if that was still the case. I don't think we need to separate issues for this.

However I was able to build and run the latest helix master just fine (including working tree sitter grammars) in the rust alpine linux docker image which installs rustc using rustup (so without any patches). I think rust-lang/rust#40113 fixed this.

@archseer
Copy link
Member

@pascalkuthe
Copy link
Member

Yeah I just noticed I messed up something I while testing. Sorry about that! I will add an FAQ entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

6 participants