Closed SpotlightKid closed 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"
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(¶meter.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(¶meter.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...
Using the same feature flags as for the build command should work.
@SpotlightKid Could you please try out if the latest commit works now?
Great!
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:
Expected behavior
OctaSine VST2 and CLAP plugins are build, like on x86_64 arch.
Screenshots
n/a
Log file contents
Software (please complete the following information):
Installed packages:
Additional context
n/a