Skip to content

Seeing errors with pngquant 3.0.3 #278

Description

@Ayushi1296

Seeing this error since the last update to the latest tag:

[rust-builder 4/4] RUN git clone --recursive https://github.com/kornelski/pngquant.git     && cd pngquant     && git checkout 3.0.3     && cargo build --release     && mkdir -p /output     && cp target/release/pngquant /output/
#14 10.74 error[E0308]: mismatched types
#14 10.74    --> rust/bin.rs:206:44
#14 10.74     |
#14 10.74 206 |         unsafe { liq_set_log_callback(liq, log_callback, Default::default()); }
#14 10.74     |                  --------------------      ^^^^^^^^^^^^ expected `Option<...>`, found fn item
#14 10.74     |                  |
#14 10.74     |                  arguments to this function are incorrect
#14 10.74     |
#14 10.74     = note: expected enum `Option<for<'a> unsafe extern "C" fn(&'a imagequant_sys::liq_attr, *const i8, imagequant_sys::AnySyncSendPtr)>`
#14 10.74             found fn item `for<'a> unsafe extern "C" fn(&'a imagequant_sys::liq_attr, *const i8, imagequant_sys::AnySyncSendPtr) {log_callback}`
#14 10.74 note: function defined here
#14 10.74    --> lib/imagequant-sys/src/ffi.rs:217:26
#14 10.74     |
#14 10.74 217 | pub unsafe extern "C" fn liq_set_log_callback(attr: &mut liq_attr, callback: Option<liq_log_callback_function>, user_info: AnySyncS...
#14 10.74     |                          ^^^^^^^^^^^^^^^^^^^^
#14 10.74 help: try wrapping the expression in `Some`
#14 10.74     |
#14 10.74 206 |         unsafe { liq_set_log_callback(liq, Some(log_callback), Default::default()); }
#14 10.74     |                                            +++++            +
#14 10.74 
#14 10.75 For more information about this error, try `rustc --explain E0308`.
#14 10.75 error: could not compile `pngquant` (bin "pngquant") due to 1 previous error
#14 ERROR: process "/bin/sh -c git clone --recursive https://github.com/kornelski/pngquant.git     && cd pngquant     && git checkout 3.0.3     && cargo build --release     && mkdir -p /output     && cp target/release/pngquant /output/" did not complete successfully: exit code: 101

This breaks our CI/CD pipeline. Can anyone support here with this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions