error[E0308]: mismatched types

James jam at tigger.ws
Mon Feb 21 12:03:41 UTC 2022



> On 19 Feb 2022, at 11:06 pm, Nathan Stratton via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> Trying to build gstreamer from git tags/1.20.0 and am running into the following error, is there a way to just disable gsttextwap? 
> 
>    Compiling gstreamer-base v0.19.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692 <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692>)
>    Compiling gstreamer-rtp v0.19.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692 <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692>)
>    Compiling gstreamer-video v0.19.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692 <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692>)
>    Compiling gstreamer-audio v0.19.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692 <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692>)
>    Compiling gstreamer-net v0.19.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692 <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#b451f692>)
> error[E0308]: mismatched types
>    --> text/wrap/src/gsttextwrap/imp.rs:414:13
>     |
> 413 |         match query.view_mut() {
>     |               ---------------- this expression has type `QueryViewMut<'_>`
> 414 |             QueryView::Latency(ref mut q) => {
>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> For more information about this error, try `rustc --explain E0308`.
> error: could not compile `gst-plugin-textwrap` due to previous error
> warning: build failed, waiting for other jobs to finish...
> error[E0599]: no method named `get` found for reference `&gstreamer::event::Seek<&EventRef>` in the current scope
>    --> text/json/src/jsongstparse/imp.rs:694:71
>     |
> 694 |         let (rate, flags, start_type, start, stop_type, stop) = event.get();
>     |                                                                       ^^^ method not found in `&gstreamer::event::Seek<&EventRef>`
> 
> error[E0599]: no method named `seqnum` found for reference `&gstreamer::event::Seek<&EventRef>` in the current scope
>    --> text/json/src/jsongstparse/imp.rs:722:33
>     |
> 722 |         let seek_seqnum = event.seqnum();
>     |                                 ^^^^^^ method not found in `&gstreamer::event::Seek<&EventRef>`
> 
> error[E0308]: mismatched types
>    --> video/flavors/src/flvdemux/imp.rs:412:13
>     |
> 411 |         match query.view_mut() {
>     |               ---------------- this expression has type `QueryViewMut<'_>`
> 412 |             QueryView::Position(ref mut q) => {
>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> error[E0308]: mismatched types
>    --> video/flavors/src/flvdemux/imp.rs:431:13
>     |
> 411 |         match query.view_mut() {
>     |               ---------------- this expression has type `QueryViewMut<'_>`
> ...
> 431 |             QueryView::Duration(ref mut q) => {
>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> error[E0308]: mismatched types
>    --> text/json/src/jsongstparse/imp.rs:786:53
>     |
> 786 |             EventView::Seek(e) => self.perform_seek(&e, element),
>     |                                                     ^^ expected struct `gstreamer::event::Seek`, found reference
>     |
>     = note: expected reference `&gstreamer::event::Seek<&EventRef>`
>                found reference `&&gstreamer::event::Seek`
> 
> error[E0308]: mismatched types
>    --> text/json/src/jsongstparse/imp.rs:802:13
>     |
> 801 |         match query.view_mut() {
>     |               ---------------- this expression has type `QueryViewMut<'_>`
> 802 |             QueryView::Seeking(mut q) => {
>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> error[E0308]: mismatched types
>    --> text/json/src/jsongstparse/imp.rs:822:13
>     |
> 801 |         match query.view_mut() {
>     |               ---------------- this expression has type `QueryViewMut<'_>`
> ...
> 822 |             QueryView::Position(ref mut q) => {
>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> error[E0308]: mismatched types
>    --> text/json/src/jsongstparse/imp.rs:832:13
>     |
> 801 |         match query.view_mut() {
>     |               ---------------- this expression has type `QueryViewMut<'_>`
> ...
> 832 |             QueryView::Duration(ref mut q) => {
>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> error[E0308]: mismatched types
>     --> net/reqwest/src/reqwesthttpsrc/imp.rs:1083:13
>      |
> 1082 |         match query.view_mut() {
>      |               ---------------- this expression has type `QueryViewMut<'_>`
> 1083 |             QueryView::Scheduling(ref mut q) => {
>      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> Some errors have detailed explanations: E0308, E0599.
> For more information about an error, try `rustc --explain E0308`.
> error[E0308]: mismatched types
>    --> utils/uriplaylistbin/src/uriplaylistbin/imp.rs:830:72
>     |
> 830 |                 if let Err(e) = self.handle_stream_collection(element, stream_collection_msg) {
>     |                                                                        ^^^^^^^^^^^^^^^^^^^^^ expected struct `gstreamer::message::StreamCollection`, found reference
>     |
>     = note: expected struct `gstreamer::message::StreamCollection`
>             found reference `&gstreamer::message::StreamCollection`
> 
> error[E0308]: mismatched types
>    --> utils/uriplaylistbin/src/uriplaylistbin/imp.rs:837:58
>     |
> 837 |                 if !self.handle_stream_selected(element, stream_selected) {
>     |                                                          ^^^^^^^^^^^^^^^ expected struct `gstreamer::message::StreamsSelected`, found reference
>     |
>     = note: expected struct `gstreamer::message::StreamsSelected`
>             found reference `&gstreamer::message::StreamsSelected`
> 
> error[E0308]: mismatched types
>     --> audio/audiofx/src/audioloudnorm/imp.rs:1696:13
>      |
> 1695 |         match query.view_mut() {
>      |               ---------------- this expression has type `QueryViewMut<'_>`
> 1696 |             QueryView::Latency(ref mut q) => {
>      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `QueryViewMut`, found enum `QueryView`
> 
> error[E0308]: mismatched types
>    --> audio/audiofx/src/audiornnoise/imp.rs:355:20
>     |
> 355 |             if let gst::QueryView::Latency(ref mut q) = query.view_mut() {
>     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ---------------- this expression has type `QueryViewMut<'_>`
>     |                    |
>     |                    expected enum `QueryViewMut`, found enum `QueryView`
> 
> Error: CliError { error: Some(build failed), exit_code: 101 }

Nathan I aways find feedback helpful. Here's my $0.02

I built 1.20.0 yesterday for intel x86_64 where it completed without error. I built with 
meson -Dgpl=enabled build --prefix=/usr/local
as per the docs but it did NOT build x264enc. 
Repeating with 1.18.0 and everything worked.
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220221/b3e6a46c/attachment.htm>


More information about the gstreamer-devel mailing list