greatest-ape / OctaSine

Frequency modulation synthesizer plugin (VST2, CLAP). Runs on macOS, Windows and Linux.
https://www.octasine.com/
GNU Affero General Public License v3.0
634 stars 17 forks source link

Compilation error on Aarch64 #144

Closed SpotlightKid closed 1 year ago

SpotlightKid commented 1 year ago

Describe the bug

I get a compilation error when trying to compile OctaSine 0.8.3 on Linux Aarch64 (on a Raspberry 4). Version 0.8.2 compiled without errors.

What did you try to do

Steps to reproduce the behavior:

Build command:

 cargo xtask bundle octasine --release

Expected behavior

OctaSine VST2 and CLAP plugins are build, like on x86_64 arch.

Screenshots

n/a

Log file contents

[...]
   Compiling sleef-trig v0.1.0
error[E0308]: mismatched types
  --> octasine/src/plugin/clap/mod.rs:18:16
   |
18 |     init: Some(init),
   |           ---- ^^^^ expected `u8`, found `i8`
   |           |
   |           arguments to this enum variant are incorrect
   |
   = note: expected fn pointer `unsafe extern "C" fn(*const u8) -> _`
                 found fn item `extern "C" fn(*const i8) -> _ {clap::init}`
note: tuple variant defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/mod.rs:20:23
   |
20 |     get_factory: Some(entry_get_factory),
   |                  ---- ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |                  |
   |                  arguments to this enum variant are incorrect
   |
   = note: expected fn pointer `unsafe extern "C" fn(*const u8) -> _`
                 found fn item `unsafe extern "C" fn(*const i8) -> _ {entry_get_factory}`
note: tuple variant defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:15:36
   |
15 | pub const ID: *const i8 = unsafe { CStr::from_bytes_with_nul_unchecked(b"OctaSine\0").as_ptr() };
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
   |
   = note: expected raw pointer `*const i8`
              found raw pointer `*const u8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:16:34
   |
16 | const NAME: *const i8 = unsafe { CStr::from_bytes_with_nul_unchecked(b"OctaSine\0").as_ptr() };
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
   |
   = note: expected raw pointer `*const i8`
              found raw pointer `*const u8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:18:14
   |
18 |     unsafe { CStr::from_bytes_with_nul_unchecked(b"Joakim Frostegard\0").as_ptr() };
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
   |
   = note: expected raw pointer `*const i8`
              found raw pointer `*const u8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:20:14
   |
20 |     unsafe { CStr::from_bytes_with_nul_unchecked(b"https://octasine.com\0").as_ptr() };
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
   |
   = note: expected raw pointer `*const i8`
              found raw pointer `*const u8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:23:5
   |
23 |     CLAP_PLUGIN_FEATURE_INSTRUMENT.as_ptr(),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
   |
   = note: expected raw pointer `*const i8`
              found raw pointer `*const u8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:33:9
   |
33 |     id: ID,
   |         ^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:34:11
   |
34 |     name: NAME,
   |           ^^^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:35:13
   |
35 |     vendor: VENDOR,
   |             ^^^^^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:36:10
   |
36 |     url: URL,
   |          ^^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/descriptor.rs:41:15
   |
41 |     features: FEATURES.as_ptr(),
   |               ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |
   = note: expected raw pointer `*const *const u8`
              found raw pointer `*const *const i8`

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/ext/gui.rs:128:28
    |
128 |     is_api_supported: Some(is_api_supported),
    |                       ---- ^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |                       |
    |                       arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, *const u8, _) -> _`
                  found fn item `unsafe extern "C" fn(_, *const i8, _) -> _ {is_api_supported}`
note: tuple variant defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/ext/gui.rs:129:29
    |
129 |     get_preferred_api: Some(get_preferred_api),
    |                        ---- ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |                        |
    |                        arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, *mut *const u8, _) -> _`
                  found fn item `unsafe extern "C" fn(_, *mut *const i8, _) -> _ {get_preferred_api}`
note: tuple variant defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/ext/gui.rs:130:18
    |
130 |     create: Some(create),
    |             ---- ^^^^^^ expected `u8`, found `i8`
    |             |
    |             arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, *const u8, _) -> _`
                  found fn item `unsafe extern "C" fn(_, *const i8, _) -> _ {create}`
note: tuple variant defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/ext/params.rs:172:25
    |
172 |     value_to_text: Some(value_to_text),
    |                    ---- ^^^^^^^^^^^^^ expected `u8`, found `i8`
    |                    |
    |                    arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, _, _, *mut u8, _) -> _`
                  found fn item `unsafe extern "C" fn(_, _, _, *mut i8, _) -> _ {value_to_text}`
note: tuple variant defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/ext/params.rs:173:25
    |
173 |     text_to_value: Some(text_to_value),
    |                    ---- ^^^^^^^^^^^^^ expected `u8`, found `i8`
    |                    |
    |                    arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, _, *const u8, _) -> _`
                  found fn item `unsafe extern "C" fn(_, _, *const i8, _) -> _ {text_to_value}`
note: tuple variant defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/factory.rs:15:25
   |
15 |     create_plugin: Some(create_plugin),
   |                    ---- ^^^^^^^^^^^^^ expected `u8`, found `i8`
   |                    |
   |                    arguments to this enum variant are incorrect
   |
   = note: expected fn pointer `unsafe extern "C" fn(_, _, *const u8) -> _`
                 found fn item `unsafe extern "C" fn(_, _, *const i8) -> _ {create_plugin}`
note: tuple variant defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/ext/gui.rs:31:36
   |
31 |     !is_floating && CStr::from_ptr(api) == SUPPORTED_API
   |                     -------------- ^^^ expected `u8`, found `i8`
   |                     |
   |                     arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/ext/gui.rs:39:12
   |
39 |     *api = SUPPORTED_API.as_ptr();
   |     ----   ^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
   |     |
   |     expected due to the type of this binding
   |
   = note: expected raw pointer `*const i8`
              found raw pointer `*const u8`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/ext/gui.rs:50:38
   |
50 |     if is_floating || CStr::from_ptr(api) != SUPPORTED_API {
   |                       -------------- ^^^ expected `u8`, found `i8`
   |                       |
   |                       arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/ext/params.rs:46:19
   |
46 |             name: make_c_char_arr(&parameter.name),
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |
   = note: expected array `[u8; 256]`
              found array `[i8; _]`

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/ext/params.rs:47:21
   |
47 |             module: make_c_char_arr(&parameter.clap_path),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |
   = note: expected array `[u8; 1024]`
              found array `[i8; _]`

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/ext/params.rs:128:42
    |
128 |         if let Ok(text) = CStr::from_ptr(text).to_str() {
    |                           -------------- ^^^^ expected `u8`, found `i8`
    |                           |
    |                           arguments to this function are incorrect
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`
note: associated function defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/factory.rs:38:47
   |
38 |     if !plugin_id.is_null() && CStr::from_ptr(plugin_id) == CStr::from_ptr(super::descriptor::ID) {
   |                                -------------- ^^^^^^^^^ expected `u8`, found `i8`
   |                                |
   |                                arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/factory.rs:38:76
   |
38 |     if !plugin_id.is_null() && CStr::from_ptr(plugin_id) == CStr::from_ptr(super::descriptor::ID) {
   |                                                             -------------- ^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |                                                             |
   |                                                             arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/plugin.rs:87:37
   |
87 |                 get_extension: Some(Self::get_extension),
   |                                ---- ^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
   |                                |
   |                                arguments to this enum variant are incorrect
   |
   = note: expected fn pointer `unsafe extern "C" fn(_, *const u8) -> _`
                 found fn item `unsafe extern "C" fn(_, *const i8) -> _ {clap::plugin::OctaSine::get_extension}`
note: tuple variant defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types
   --> octasine/src/plugin/clap/plugin.rs:269:33
    |
269 |         let id = CStr::from_ptr(id);
    |                  -------------- ^^ expected `u8`, found `i8`
    |                  |
    |                  arguments to this function are incorrect
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`
note: associated function defined here
   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types
  --> octasine/src/plugin/clap/mod.rs:30:46
   |
30 |     let factory_id = unsafe { CStr::from_ptr(factory_id) };
   |                               -------------- ^^^^^^^^^^ expected `u8`, found `i8`
   |                               |
   |                               arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

For more information about this error, try `rustc --explain E0308`.
error: could not compile `octasine` due to 29 previous errors
Error: Could not build octasine

Software (please complete the following information):

Installed packages:

libxau-1.0.11-1  libxdmcp-1.1.4-1  xcb-proto-1.15.2-2  xorgproto-2022.2-1  libx11-1.8.4-1  libxcb-1.15-2  xcb-util-wm-0.4.2-1
default-cursors-2-1  libdrm-2.4.114-1  libedit-20210910_3.1-2  libnsl-2.0.0-2  libomxil-bellagio-0.9.3-4  libpciaccess-0.17-1  libunwind-1.6.2-2  libxdamage-1.1.6-1  libxext-1.3.5-1  libxfixes-6.0.0-2  libxrender-0.9.11-1  libxshmfence-1.3.2-1  libxxf86vm-1.1.5-1  llvm-libs-15.0.7-1  lm_sensors-1:3.6.0.r41.g31d1f125-2  mesa-22.3.4-1  vulkan-icd-loader-1.3.240-1  wayland-1.21.0-2  libglvnd-1.6.0-1  libxcursor-1.2.1-3  python-3.10.9-1  rust-1:1.67.1-1

Additional context

n/a

greatest-ape commented 1 year ago

Thanks!

Until I get this fixed, you can get the vst plugin working by building with:

cargo xtask bundle octasine --release --no-default-features --features "glow vst2"
SpotlightKid commented 1 year ago

That works but fails when running cargo test after that:

Compiling nih_plug_xtask v0.1.0 (https://github.com/robbert-vdh/nih-plug.git?rev=32957c2#32957c22)

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/mod.rs:18:16

   |

18 |     init: Some(init),

   |           ---- ^^^^ expected `u8`, found `i8`

   |           |

   |           arguments to this enum variant are incorrect

   |

   = note: expected fn pointer `unsafe extern "C" fn(*const u8) -> _`

                 found fn item `extern "C" fn(*const i8) -> _ {clap::init}`

note: tuple variant defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/mod.rs:20:23

   |

20 |     get_factory: Some(entry_get_factory),

   |                  ---- ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

   |                  |

   |                  arguments to this enum variant are incorrect

   |

   = note: expected fn pointer `unsafe extern "C" fn(*const u8) -> _`

                 found fn item `unsafe extern "C" fn(*const i8) -> _ {entry_get_factory}`

note: tuple variant defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:15:36

   |

15 | pub const ID: *const i8 = unsafe { CStr::from_bytes_with_nul_unchecked(b"OctaSine\0").as_ptr() };

   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`

   |

   = note: expected raw pointer `*const i8`

              found raw pointer `*const u8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:16:34

   |

16 | const NAME: *const i8 = unsafe { CStr::from_bytes_with_nul_unchecked(b"OctaSine\0").as_ptr() };

   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`

   |

   = note: expected raw pointer `*const i8`

              found raw pointer `*const u8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:18:14

   |

18 |     unsafe { CStr::from_bytes_with_nul_unchecked(b"Joakim Frostegard\0").as_ptr() };

   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`

   |

   = note: expected raw pointer `*const i8`

              found raw pointer `*const u8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:20:14

   |

20 |     unsafe { CStr::from_bytes_with_nul_unchecked(b"https://octasine.com\0").as_ptr() };

   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`

   |

   = note: expected raw pointer `*const i8`

              found raw pointer `*const u8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:23:5

   |

23 |     CLAP_PLUGIN_FEATURE_INSTRUMENT.as_ptr(),

   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`

   |

   = note: expected raw pointer `*const i8`

              found raw pointer `*const u8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:33:9

   |

33 |     id: ID,

   |         ^^ expected `u8`, found `i8`

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:34:11

   |

34 |     name: NAME,

   |           ^^^^ expected `u8`, found `i8`

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:35:13

   |

35 |     vendor: VENDOR,

   |             ^^^^^^ expected `u8`, found `i8`

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:36:10

   |

36 |     url: URL,

   |          ^^^ expected `u8`, found `i8`

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/descriptor.rs:41:15

   |

41 |     features: FEATURES.as_ptr(),

   |               ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

   |

   = note: expected raw pointer `*const *const u8`

              found raw pointer `*const *const i8`

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/ext/gui.rs:128:28

    |

128 |     is_api_supported: Some(is_api_supported),

    |                       ---- ^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

    |                       |

    |                       arguments to this enum variant are incorrect

    |

    = note: expected fn pointer `unsafe extern "C" fn(_, *const u8, _) -> _`

                  found fn item `unsafe extern "C" fn(_, *const i8, _) -> _ {is_api_supported}`

note: tuple variant defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/ext/gui.rs:129:29

    |

129 |     get_preferred_api: Some(get_preferred_api),

    |                        ---- ^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

    |                        |

    |                        arguments to this enum variant are incorrect

    |

    = note: expected fn pointer `unsafe extern "C" fn(_, *mut *const u8, _) -> _`

                  found fn item `unsafe extern "C" fn(_, *mut *const i8, _) -> _ {get_preferred_api}`

note: tuple variant defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/ext/gui.rs:130:18

    |

130 |     create: Some(create),

    |             ---- ^^^^^^ expected `u8`, found `i8`

    |             |

    |             arguments to this enum variant are incorrect

    |

    = note: expected fn pointer `unsafe extern "C" fn(_, *const u8, _) -> _`

                  found fn item `unsafe extern "C" fn(_, *const i8, _) -> _ {create}`

note: tuple variant defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/ext/params.rs:172:25

    |

172 |     value_to_text: Some(value_to_text),

    |                    ---- ^^^^^^^^^^^^^ expected `u8`, found `i8`

    |                    |

    |                    arguments to this enum variant are incorrect

    |

    = note: expected fn pointer `unsafe extern "C" fn(_, _, _, *mut u8, _) -> _`

                  found fn item `unsafe extern "C" fn(_, _, _, *mut i8, _) -> _ {value_to_text}`

note: tuple variant defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/ext/params.rs:173:25

    |

173 |     text_to_value: Some(text_to_value),

    |                    ---- ^^^^^^^^^^^^^ expected `u8`, found `i8`

    |                    |

    |                    arguments to this enum variant are incorrect

    |

    = note: expected fn pointer `unsafe extern "C" fn(_, _, *const u8, _) -> _`

                  found fn item `unsafe extern "C" fn(_, _, *const i8, _) -> _ {text_to_value}`

note: tuple variant defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/factory.rs:15:25

   |

15 |     create_plugin: Some(create_plugin),

   |                    ---- ^^^^^^^^^^^^^ expected `u8`, found `i8`

   |                    |

   |                    arguments to this enum variant are incorrect

   |

   = note: expected fn pointer `unsafe extern "C" fn(_, _, *const u8) -> _`

                 found fn item `unsafe extern "C" fn(_, _, *const i8) -> _ {create_plugin}`

note: tuple variant defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/ext/gui.rs:31:36

   |

31 |     !is_floating && CStr::from_ptr(api) == SUPPORTED_API

   |                     -------------- ^^^ expected `u8`, found `i8`

   |                     |

   |                     arguments to this function are incorrect

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

note: associated function defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/ext/gui.rs:39:12

   |

39 |     *api = SUPPORTED_API.as_ptr();

   |     ----   ^^^^^^^^^^^^^^^^^^^^^^ expected `i8`, found `u8`

   |     |

   |     expected due to the type of this binding

   |

   = note: expected raw pointer `*const i8`

              found raw pointer `*const u8`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/ext/gui.rs:50:38

   |

50 |     if is_floating || CStr::from_ptr(api) != SUPPORTED_API {

   |                       -------------- ^^^ expected `u8`, found `i8`

   |                       |

   |                       arguments to this function are incorrect

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

note: associated function defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/ext/params.rs:46:19

   |

46 |             name: make_c_char_arr(&parameter.name),

   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

   |

   = note: expected array `[u8; 256]`

              found array `[i8; _]`

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/ext/params.rs:47:21

   |

47 |             module: make_c_char_arr(&parameter.clap_path),

   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

   |

   = note: expected array `[u8; 1024]`

              found array `[i8; _]`

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/ext/params.rs:128:42

    |

128 |         if let Ok(text) = CStr::from_ptr(text).to_str() {

    |                           -------------- ^^^^ expected `u8`, found `i8`

    |                           |

    |                           arguments to this function are incorrect

    |

    = note: expected raw pointer `*const u8`

               found raw pointer `*const i8`

note: associated function defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/factory.rs:38:47

   |

38 |     if !plugin_id.is_null() && CStr::from_ptr(plugin_id) == CStr::from_ptr(super::descriptor::ID) {

   |                                -------------- ^^^^^^^^^ expected `u8`, found `i8`

   |                                |

   |                                arguments to this function are incorrect

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

note: associated function defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/factory.rs:38:76

   |

38 |     if !plugin_id.is_null() && CStr::from_ptr(plugin_id) == CStr::from_ptr(super::descriptor::ID) {

   |                                                             -------------- ^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

   |                                                             |

   |                                                             arguments to this function are incorrect

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

note: associated function defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/plugin.rs:87:37

   |

87 |                 get_extension: Some(Self::get_extension),

   |                                ---- ^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

   |                                |

   |                                arguments to this enum variant are incorrect

   |

   = note: expected fn pointer `unsafe extern "C" fn(_, *const u8) -> _`

                 found fn item `unsafe extern "C" fn(_, *const i8) -> _ {clap::plugin::OctaSine::get_extension}`

note: tuple variant defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/option.rs:526:5

error[E0308]: mismatched types

   --> octasine/src/plugin/clap/plugin.rs:269:33

    |

269 |         let id = CStr::from_ptr(id);

    |                  -------------- ^^ expected `u8`, found `i8`

    |                  |

    |                  arguments to this function are incorrect

    |

    = note: expected raw pointer `*const u8`

               found raw pointer `*const i8`

note: associated function defined here

   --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

error[E0308]: mismatched types

  --> octasine/src/plugin/clap/mod.rs:30:46

   |

30 |     let factory_id = unsafe { CStr::from_ptr(factory_id) };

   |                               -------------- ^^^^^^^^^^ expected `u8`, found `i8`

   |                               |

   |                               arguments to this function are incorrect

   |

   = note: expected raw pointer `*const u8`

              found raw pointer `*const i8`

note: associated function defined here

  --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ffi/c_str.rs:256:25

For more information about this error, try `rustc --explain E0308`.

error: could not compile `octasine` due to 29 previous errors

warning: build failed, waiting for other jobs to finish...
greatest-ape commented 1 year ago

Using the same feature flags as for the build command should work.

greatest-ape commented 1 year ago

@SpotlightKid Could you please try out if the latest commit works now?

SpotlightKid commented 1 year ago

Looking good: https://ci.cbix.de/osam-cologne/archlinux-proaudio/1166/2/3

greatest-ape commented 1 year ago

Great!