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

🐛 Failed to compile on arch caused by onig_sys error #157

Closed
KevCui opened this issue Apr 29, 2020 · 12 comments
Closed

🐛 Failed to compile on arch caused by onig_sys error #157

KevCui opened this issue Apr 29, 2020 · 12 comments

Comments

@KevCui
Copy link

KevCui commented Apr 29, 2020

Run commandyay -S git-delta, compilation process failed:

   ...
   Compiling onig_sys v69.2.0
error: failed to run custom build command for `onig_sys v69.2.0`

Caused by:
  process didn't exit successfully: `/home/kev/.cache/yay/git-delta/src/delta-0.1.1/target/release/build/onig_sys-1144788a31764b6f/build-script-build` (exit code: 101)
--- stdout
cargo:warning=couldn't execute `llvm-config --prefix` (exit code: exit code: 127)
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable

--- stderr
thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib64/libclang.so.10 could not be opened: libLLVM-10.so: cannot open shared object file: No such file or directory"', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

==> ERROR: A failure occurred in build().
    Aborting...
Error making: git-delta

Same error occurs when running makepkg on latest commit 3423f36f144f29fbed68f1679b from master.

@KevCui
Copy link
Author

KevCui commented Apr 29, 2020

Installing git-delta-bin works well

@Kr1ss-XD
Copy link
Contributor

The git-delta package builds fine in a clean (Arch) chroot, which points to some kind of non-default setup on your end.
Just a guess, but could you please check if $LLVM_CONFIG_PATH is set in you build environment ?
If that's the case, please try to build with

LLVM_CONFIG_PATH= makepkg -csr

in a clean build folder.

Thx

@KevCui KevCui changed the title 🐛 Failed to compile on arch casued by onig_sys error 🐛 Failed to compile on arch caused by onig_sys error Apr 29, 2020
@KevCui
Copy link
Author

KevCui commented Apr 29, 2020

Hi @Kr1ss-XD,

I checked in my terminal and I don't have any environment set as LLVM_CONFIG_PATH.

LLVM_CONFIG_PATH= makepkg -csr runs in a clean build folder, unfortunately, the same error occurs.

@Kr1ss-XD
Copy link
Contributor

Well thx for checking nevertheless; I'm out of ideas then unfortunately. Hope you are okay with using the -bin package.

@KevCui
Copy link
Author

KevCui commented Apr 29, 2020

@Kr1ss-XD No worry, all good, binary works well :) thx

@Yanpas
Copy link

Yanpas commented Apr 29, 2020

Also can't build onig_sys:

Compiling onig_sys v69.2.0
error: unexpected closing delimiter: `]`
    --> /tmp/cargo-installrlGc0Y/release/build/onig_sys-38e69e1446b2bb1e/out/bindings.rs:1389:32
     |
1389 | #[derive(Copy, Clone)]; 2usize ] , }#[repr(C)]
     |                                ^ unexpected closing delimiter

error: aborting due to previous error

The following warnings were emitted during compilation:

warning: couldn't execute ` --prefix` (error: No such file or directory (os error 2))
warning: set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable

error: failed to compile `git-delta v0.1.1`, intermediate artifacts can be found at `/tmp/cargo-installrlGc0Y`

Caused by:
  could not compile `onig_sys`.

To learn more, run the command again with --verbose.

@Yanpas
Copy link

Yanpas commented Apr 29, 2020

Same without this env variable:

error: unexpected closing delimiter: `]`
    --> /tmp/cargo-installMmIgmT/release/build/onig_sys-38e69e1446b2bb1e/out/bindings.rs:1389:32
     |
1389 | #[derive(Copy, Clone)]; 2usize ] , }#[repr(C)]
     |                                ^ unexpected closing delimiter

error: aborting due to previous error

error: failed to compile `git-delta v0.1.1`, intermediate artifacts can be found at `/tmp/cargo-installMmIgmT`

Caused by:
  could not compile `onig_sys`.

To learn more, run the command again with --verbose.

@dandavison
Copy link
Owner

I think you're suffering from this: rust-onig/rust-onig#109. I see that it has affected several projects, but I'm afraid I don't have any technical insight into it.

I'm also sorry to say that I investigated downgrading onig_sys and found I was unable to due to the dependency graph (syntect requires the recent onig_sys, and delta requires a recent syntect).

So that's information but I'm not sure it helped!

@dandavison
Copy link
Owner

Is this still a problem? There has not been a new release of delta since 0.1.1 but for people who were having this problem when building from source I'd be interested to know if it is fixed in master.

@Yanpas
Copy link

Yanpas commented Jun 1, 2020

I've built delta, guess may be closed

@MarcoIeni
Copy link
Contributor

Today I installed this project on arch with yay -S git-delta. It worked fine :)

@dandavison
Copy link
Owner

OK, thanks everyone. I'll close for now.

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

No branches or pull requests

5 participants