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

Building failed with error: "Failed to execute C compiler" #773

Closed
Serif-7 opened this issue Sep 21, 2021 · 3 comments
Closed

Building failed with error: "Failed to execute C compiler" #773

Serif-7 opened this issue Sep 21, 2021 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@Serif-7
Copy link

Serif-7 commented Sep 21, 2021

Reproduction steps

Environment

  • Platform: Fedora 34
  • Helix version: v0.4.1

Bug:

  Caused by:
      No such file or directory (os error 2)', helix-syntax/build.rs:172:36
  thread '<unnamed>' 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: `28`', helix-syntax/build.rs:201:5

The first error was repeated in my terminal several times. The error on the bottom was not. gcc is installed and on my PATH. #642 had the same error, and it was fixed by installing gcc.

The issue seems to be at least related to the build_library().unwrap() function called in `helix-syntax/build.rs', but I don't know enough Rust to debug it.

Any help appreciated, would love to contribute.

@Serif-7 Serif-7 added the C-bug Category: This is a bug label Sep 21, 2021
@IceDragon200
Copy link
Contributor

You may want to install a C++ compiler as well (g++ in your case), the error message is misleading, it may use a C or C++ compiler, but the error message always says C.

@JKAnderson409
Copy link

I'm also on Fedora 34. I was able to solve this with

sudo dnf group install "C Development Tools and Libraries"

I'm running Fedora 34 Silverblue so I try out new software in a container. This type of headache could be solved by documenting the build dependencies.

@Serif-7
Copy link
Author

Serif-7 commented Sep 22, 2021

@JKAnderson409 's answer fixed my issue. Thank you. Would be nice if the README was updated to account for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants