Failed to compile rav1e which is dependence for tons of packages

  • Done
  • quality assurance status badge
Details
4 participants
  • 0xFA11BABE
  • Evgenii Lepikhin
  • Leo Famulari
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Evgenii Lepikhin
Severity
normal
E
E
Evgenii Lepikhin wrote on 28 Dec 2021 00:09
(address . bug-guix@gnu.org)
8735mdbq6h.fsf@corp.mail.ru
Hi there,

rav1e failed to compile with error:

starting phase `build'
Error: CliError { error: Some(failed to select a version for `clang-sys`.
... required by package `bindgen v0.58.1`
... which is depended on by `dav1d-sys v0.3.4`
... which is depended on by `rav1e v0.4.1 (/tmp/guix-build-rav1e-0.4.1.drv-0/rav1e-0.4.1)`
versions that meet the requirements `^1` are: 1.0.0

the package `clang-sys` links to the native library `clang`, but it conflicts with a previous package which links to `clang` as well:
package `clang-sys v0.29.3`
... which is depended on by `bindgen v0.54.1`
... which is depended on by `aom-sys v0.2.1`
... which is depended on by `rav1e v0.4.1 (/tmp/guix-build-rav1e-0.4.1.drv-0/rav1e-0.4.1)`

The issue caused by commit ad1e8a0906c. Possible fix:

Toggle diff (15 lines)
diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index e4cd01fadf..269bd991ab 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -208,7 +208,7 @@ (define-public rust-aom-sys-0.2
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
- (("rust-bindgen" ,rust-bindgen-0.54)
+ (("rust-bindgen" ,rust-bindgen-0.58)
("rust-metadeps" ,rust-metadeps-1))))
(native-inputs
(list pkg-config))


--
L
L
Leo Famulari wrote on 28 Dec 2021 02:20
(name . Evgenii Lepikhin via Bug reports for GNU Guix)(address . bug-guix@gnu.org)(address . 52837@debbugs.gnu.org)
YcpmYD2/rlMnTFdY@jasmine.lan
On Tue, Dec 28, 2021 at 02:09:42AM +0300, Evgenii Lepikhin via Bug reports for GNU Guix wrote:
Toggle quote (4 lines)
> Hi there,
>
> rav1e failed to compile with error:

Oof, thanks for the report. Looking into it now...
L
L
Leo Famulari wrote on 28 Dec 2021 02:32
(name . Evgenii Lepikhin via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
YcppPCzR9f2TLL3b@jasmine.lan
On Tue, Dec 28, 2021 at 02:09:42AM +0300, Evgenii Lepikhin via Bug reports for GNU Guix wrote:
Toggle quote (4 lines)
> Hi there,
>
> rav1e failed to compile with error:

Alright, for now I've reverted the commits that caused the problem.

Specifically, I reverted this range of commits:
5b1ec376239602725171d4523406801b684ee195^..13d3120095e4baa03594d095b0afe9febbb7cee0

IIUC, these were pushed together.

Nicolas, can you take a look at the suggested fix shown below?

Toggle quote (18 lines)
> The issue caused by commit ad1e8a0906c. Possible fix:
>
> diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
> index e4cd01fadf..269bd991ab 100644
> --- a/gnu/packages/crates-graphics.scm
> +++ b/gnu/packages/crates-graphics.scm
> @@ -208,7 +208,7 @@ (define-public rust-aom-sys-0.2
> (build-system cargo-build-system)
> (arguments
> `(#:cargo-inputs
> - (("rust-bindgen" ,rust-bindgen-0.54)
> + (("rust-bindgen" ,rust-bindgen-0.58)
> ("rust-metadeps" ,rust-metadeps-1))))
> (native-inputs
> (list pkg-config))
>
>
> --
0
0
0xFA11BABE wrote on 28 Dec 2021 04:04
Failed to compile rav1e which is dependence for tons of packages
(name . 52837@debbugs.gnu.org)(address . 52837@debbugs.gnu.org)
bX-itgkNxASsEOu2MtyUgNTfPUP_7DRNbt_P5VZjCog5vNkrT1y_WX7dTa538Zk7-5CRafvWl3zqsQrii9aOvZ3eY0Xvmf_wTika_D-IWWM=@protonmail.com
I got the same problem.

Toggle quote (18 lines)
> starting phase `build'
> Error: CliError { error: Some(failed to select a version for `clang-sys`.
> ... required by package `bindgen v0.58.1`
> ... which is depended on by `dav1d-sys v0.3.4`
> ... which is depended on by `rav1e v0.4.1 (/tmp/guix-build-rav1e-0.4.1.drv-0/rav1e-0.4.1)`
> versions that meet the requirements `^1` are: 1.0.0
>
> the package `clang-sys` links to the native library `clang`, but it conflicts with a previous package which links to `clang` as well:
> package `clang-sys v0.29.3`
> ... which is depended on by `bindgen v0.54.1`
> ... which is depended on by `aom-sys v0.2.1`
> ... which is depended on by `rav1e v0.4.1 (/tmp/guix-build-rav1e-0.4.1.drv-0/rav1e-0.4.1)`
>
> failed to select a version for `clang-sys` which could resolve this conflict), exit_code: 101 }
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "cargo" arguments: ("cinstall" "--release" "--prefix=/gnu/store/83mfvccy0szp2v9v2qk8xf5wz867ndnx-rav1e-0.4.1") exit-status: 1 term-signal: #f stop-signal: #f>
> phase `build' failed after 0.7 seconds
> command "cargo" "cinstall" "--release" "--prefix=/gnu/store/83mfvccy0szp2v9v2qk8xf5wz867ndnx-rav1e-0.4.1" failed with status 1
Attachment: file
E
N
N
Nicolas Goaziou wrote on 28 Dec 2021 14:46
Re: bug#52837: Failed to compile rav1e which is dependence for tons of packages
(name . Leo Famulari)(address . leo@famulari.name)(address . 52837@debbugs.gnu.org)
878rw4allc.fsf@nicolasgoaziou.fr
Hello,

Leo Famulari <leo@famulari.name> writes:

Toggle quote (10 lines)
> On Tue, Dec 28, 2021 at 02:09:42AM +0300, Evgenii Lepikhin via Bug reports for GNU Guix wrote:
>> Hi there,
>>
>> rav1e failed to compile with error:
>
> Alright, for now I've reverted the commits that caused the problem.
>
> Specifically, I reverted this range of commits:
> 5b1ec376239602725171d4523406801b684ee195^..13d3120095e4baa03594d095b0afe9febbb7cee0

Thank you.

You reverted 100+ commits but only one of them is problematic. Could you
unrevert them barring ad1e8a0906cca4f5c2fd18534a935a375161e608?

Toggle quote (4 lines)
> IIUC, these were pushed together.
>
> Nicolas, can you take a look at the suggested fix shown below?

IIUC, a safe solution would be to exceptionally provide both
rust-dav1d-sys 0.3.2 (for rav1e) and 0.3.4 (for nushell), the latter
being called rust-dav1d-sys-0.3.

With this we do not have to bother updating rav1e yet.

WDYT?


Regards,
--
Nicolas Goaziou
L
L
Leo Famulari wrote on 28 Dec 2021 20:35
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 52837@debbugs.gnu.org)
Yctm7dV44R2gZm65@jasmine.lan
On Tue, Dec 28, 2021 at 02:46:23PM +0100, Nicolas Goaziou wrote:
Toggle quote (3 lines)
> You reverted 100+ commits but only one of them is problematic. Could you
> unrevert them barring ad1e8a0906cca4f5c2fd18534a935a375161e608?

I did so like this:

`git cherry-pick 5b1ec376239602725171d4523406801b684ee195^..13d3120095e4baa03594d095b0afe9febbb7cee0 && \
git revert ad1e8a0906cca4f5c2fd18534a935a375161e608`

Then, rav1e (and FFmpeg) built successfully.

So, I pushed as 9309b488ca4ceef4fcc9283546e3b05c57b16ca8.

Toggle quote (8 lines)
> IIUC, a safe solution would be to exceptionally provide both
> rust-dav1d-sys 0.3.2 (for rav1e) and 0.3.4 (for nushell), the latter
> being called rust-dav1d-sys-0.3.
>
> With this we do not have to bother updating rav1e yet.
>
> WDYT?

Sounds like a plan. Are you able to do it?
L
L
Leo Famulari wrote on 28 Dec 2021 20:41
Re: bug#52837: We need deeper research
(name . Evgenii Lepikhin via Bug reports for GNU Guix)(address . bug-guix@gnu.org)(address . 52837@debbugs.gnu.org)
YctoZjpIiLktIU6a@jasmine.lan
On Tue, Dec 28, 2021 at 09:01:07AM +0300, Evgenii Lepikhin via Bug reports for GNU Guix wrote:
Toggle quote (6 lines)
> Hi,
>
> Suggested fix is insufficient because dependency on version is hard coded in the crate: https://github.com/rust-av/aom-rs/blob/ea9a45d6ec7bfd2cd0d6f9f43268d9e379bba168/aom-sys/Cargo.toml#L18
>
> We need to update both rust-aom-sys to == 0.3.0 and rav1e to >= 0.5.0.

Okay, that's good to know. I hope that somebody will try it and report
back.
N
N
Nicolas Goaziou wrote on 28 Dec 2021 21:31
Re: bug#52837: Failed to compile rav1e which is dependence for tons of packages
(name . Leo Famulari)(address . leo@famulari.name)(address . 52837@debbugs.gnu.org)
87wnjo8oa0.fsf@nicolasgoaziou.fr
Hello,

Leo Famulari <leo@famulari.name> writes:

Toggle quote (2 lines)
> So, I pushed as 9309b488ca4ceef4fcc9283546e3b05c57b16ca8.

Thanks!
Toggle quote (11 lines)
>
>> IIUC, a safe solution would be to exceptionally provide both
>> rust-dav1d-sys 0.3.2 (for rav1e) and 0.3.4 (for nushell), the latter
>> being called rust-dav1d-sys-0.3.
>>
>> With this we do not have to bother updating rav1e yet.
>>
>> WDYT?
>
> Sounds like a plan. Are you able to do it?

This is now done on master. AFAICT both nushell and rav1e build. I'll
let the OP confirm the issue is fixed and close the bug report.

Regards,
--
Nicolas Goaziou
L
L
Leo Famulari wrote on 28 Dec 2021 22:29
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 52837@debbugs.gnu.org)
YcuBynx+jqSSnXfs@jasmine.lan
On Tue, Dec 28, 2021 at 09:31:19PM +0100, Nicolas Goaziou wrote:
Toggle quote (3 lines)
> This is now done on master. AFAICT both nushell and rav1e build. I'll
> let the OP confirm the issue is fixed and close the bug report.

Thanks!

I noticed that Guix complained about "possibly undefined variables" for
llvm and clang and rust-dav1d-sys-0.3.2 failed to build, so I pushed a
commit that imports the LLVM module in (gnu package video).

At first I was confused because rav1e still built, but our Rust
packaging doesn't require dependencies to build.
E
E
Evgenii Lepikhin wrote on 29 Dec 2021 09:42
Re: bug#52837: We need deeper research
(name . Leo Famulari)(address . leo@famulari.name)(address . 52837@debbugs.gnu.org)
87wnjnztrw.fsf@corp.mail.ru
On 2021-12-28 14:41, Leo Famulari wrote:

Toggle quote (5 lines)
>> We need to update both rust-aom-sys to == 0.3.0 and rav1e to >= 0.5.0.
>
> Okay, that's good to know. I hope that somebody will try it and report
> back.

Now it is fixed.

Thank you.


--
QA automation teamlead at Mail.ru.
N
N
Nicolas Goaziou wrote on 29 Dec 2021 14:57
(name . Evgenii Lepikhin via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
87lf038qeu.fsf@nicolasgoaziou.fr
Hello,

Evgenii Lepikhin via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

Toggle quote (2 lines)
> Now it is fixed.

Closing it, then. Thanks for the feedback.

Regards,
--
Nicolas Goaziou
?