Mizer
Mizer copied to clipboard
Failed to run make build
Reproduction Steps
make build
Additional Information
cbingen failed,erros followed:
cbindgen --config ffi/cbindgen.toml --crate mizer-ui-ffi --output ffi.h --lang c
WARN: Can't find FFIDpadState. This usually means that this type was incompatible or not found.
flutter pub get
Input Headers: [./ffi.h]
[SEVERE] : Header ./ffi.h: Total errors/warnings: 1.
[SEVERE] : ./ffi.h:128:28: error: field has incomplete type 'struct FFIStructuredData' [Semantic Issue]
[WARNING]: No definition found for declaration - (Cursor) spelling: ConnectionsRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct ConnectionsRef, usr: c:@S@ConnectionsRef
OS: Ubuntu 24
Version: laster
This is on the latest main with cbindgen 0.27.0?
Can you please post the generated ffi.h file in crates/ui?
@maxjoehnk tks
cbindgen --version
output is
cbindgen 0.26.0
ffi.h contents followed:
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef enum FFIFixtureFaderControl {
Intensity = 0,
Shutter = 1,
ColorMixer = 2,
ColorWheel = 3,
Pan = 4,
Tilt = 5,
Focus = 6,
Zoom = 7,
Prism = 8,
Iris = 9,
Frost = 10,
Gobo = 11,
Generic = 12,
} FFIFixtureFaderControl;
typedef enum FFIStructuredDataType {
Text = 0,
Float = 1,
Int = 2,
Boolean = 3,
Array = 4,
Object = 5,
} FFIStructuredDataType;
typedef struct ConnectionsRef ConnectionsRef;
typedef struct FixturesRef FixturesRef;
typedef struct GamepadConnectionRef GamepadConnectionRef;
typedef struct LayoutRef LayoutRef;
typedef struct NodeHistory NodeHistory;
typedef struct NodesRef NodesRef;
typedef struct Programmer Programmer;
typedef struct Sequencer Sequencer;
typedef struct StatusApi StatusApi;
typedef struct TimecodeApi TimecodeApi;
typedef struct Transport Transport;
typedef struct FFIGamepadState {
FFIDpadState dpad;
double left_stick_x;
double left_stick_y;
uint8_t left_stick;
double right_stick_x;
double right_stick_y;
uint8_t right_stick;
double left_trigger;
uint8_t left_shoulder;
double right_trigger;
uint8_t right_shoulder;
uint8_t north;
uint8_t east;
uint8_t south;
uint8_t west;
uint8_t select;
uint8_t start;
uint8_t mode;
} FFIGamepadState;
typedef struct Array_u8 {
uintptr_t len;
const uint8_t *array;
} Array_u8;
typedef struct FFIFixtureState {
uint8_t has_brightness;
double brightness;
uint8_t has_color;
double color_red;
double color_green;
double color_blue;
} FFIFixtureState;
typedef struct Timecode {
uint64_t hours;
uint64_t minutes;
uint64_t seconds;
uint64_t frames;
uint8_t is_negative;
} Timecode;
typedef struct FFIControlColor {
uint8_t has_color;
double color_red;
double color_green;
double color_blue;
} FFIControlColor;
typedef struct Array_f64 {
uintptr_t len;
const double *array;
} Array_f64;
typedef struct Array_FFIStructuredData {
uintptr_t len;
const struct FFIStructuredData *array;
} Array_FFIStructuredData;
typedef struct FFIStructuredDataObjectEntry {
const char *key;
struct FFIStructuredData value;
} FFIStructuredDataObjectEntry;
typedef struct Array_FFIStructuredDataObjectEntry {
uintptr_t len;
const struct FFIStructuredDataObjectEntry *array;
} Array_FFIStructuredDataObjectEntry;
typedef union FFIStructuredDataValue {
const char *text;
double floating_point;
int64_t integer;
uint8_t boolean;
struct Array_FFIStructuredData array;
struct Array_FFIStructuredDataObjectEntry object;
} FFIStructuredDataValue;
typedef struct FFIStructuredData {
enum FFIStructuredDataType type;
union FFIStructuredDataValue value;
} FFIStructuredData;
typedef struct FFIColorValue {
double red;
double green;
double blue;
} FFIColorValue;
typedef struct FFINodePortMetadata {
const char *node_path;
const char *port_id;
uint8_t pushed_value;
} FFINodePortMetadata;
typedef struct Array_FFINodePortMetadata {
uintptr_t len;
const struct FFINodePortMetadata *array;
} Array_FFINodePortMetadata;
typedef struct FFIFixtureId {
uint32_t fixture_id;
uint32_t sub_fixture_id;
} FFIFixtureId;
typedef struct Array_FFIFixtureId {
uintptr_t len;
const struct FFIFixtureId *array;
} Array_FFIFixtureId;
typedef struct Array_u32 {
uintptr_t len;
const uint32_t *array;
} Array_u32;
typedef struct Array_Array_FFIFixtureId {
uintptr_t len;
const struct Array_FFIFixtureId *array;
} Array_Array_FFIFixtureId;
typedef struct FFIGenericValue {
const char *channel;
double value;
} FFIGenericValue;
typedef union FFIPresetId {
uint32_t intensity;
uint32_t shutter;
uint32_t color;
uint32_t position;
} FFIPresetId;
typedef union ProgrammerChannelValue {
double fader;
struct FFIColorValue color;
struct FFIGenericValue generic;
union FFIPresetId preset;
} ProgrammerChannelValue;
typedef struct FFIProgrammerChannel {
union ProgrammerChannelValue value;
uint8_t preset;
enum FFIFixtureFaderControl control;
struct Array_FFIFixtureId fixtures;
} FFIProgrammerChannel;
typedef struct Array_FFIProgrammerChannel {
uintptr_t len;
const struct FFIProgrammerChannel *array;
} Array_FFIProgrammerChannel;
typedef struct FFIEffectProgrammerState {
uint32_t effect_id;
double rate;
uint8_t has_offset;
double effect_offset;
} FFIEffectProgrammerState;
typedef struct Array_FFIEffectProgrammerState {
uintptr_t len;
const struct FFIEffectProgrammerState *array;
} Array_FFIEffectProgrammerState;
typedef struct FFIProgrammerState {
struct Array_FFIFixtureId active_fixtures;
struct Array_u32 active_groups;
struct Array_FFIFixtureId fixtures;
struct Array_Array_FFIFixtureId selection;
struct Array_FFIProgrammerChannel channels;
struct Array_FFIEffectProgrammerState effects;
uint8_t highlight;
uint32_t block_size;
uint32_t groups;
uint32_t wings;
uint8_t offline;
} FFIProgrammerState;
typedef struct SequenceState {
uint32_t sequence_id;
uint8_t active;
uint32_t current_cue_id;
double rate;
} SequenceState;
typedef struct Array_SequenceState {
uintptr_t len;
const struct SequenceState *array;
} Array_SequenceState;
struct FFIGamepadState read_gamepad_state(const struct GamepadConnectionRef *ptr);
struct Array_u8 read_cdj_state(const struct ConnectionsRef *ptr, const char *id);
struct FFIFixtureState read_fixture_state(const struct FixturesRef *ptr,
uint32_t fixture_id,
uint32_t sub_fixture_id);
void drop_fixture_pointer(const struct FixturesRef *ptr);
double read_fader_value(const struct LayoutRef *ptr, const char *path);
double read_dial_value(const struct LayoutRef *ptr, const char *path);
uint8_t read_button_value(const struct LayoutRef *ptr, const char *path);
const char *read_label_value(const struct LayoutRef *ptr, const char *path);
struct Timecode read_clock_value(const struct LayoutRef *ptr, const char *path);
struct FFIControlColor read_control_color(const struct LayoutRef *ptr, const char *path);
void drop_layout_pointer(const struct LayoutRef *ptr);
struct Array_f64 read_node_history(const struct NodeHistory *ptr);
struct FFIStructuredData read_node_data_preview(const struct NodeHistory *ptr);
struct FFIColorValue read_node_color_preview(const struct NodeHistory *ptr);
struct Timecode read_node_timecode_preview(const struct NodeHistory *ptr);
void drop_node_history_pointer(const struct NodeHistory *ptr);
struct Array_f64 read_node_multi_preview(const struct NodeHistory *ptr);
struct Array_FFINodePortMetadata read_node_port_metadata(const struct NodesRef *ptr);
void drop_nodes_pointer(const struct NodesRef *ptr);
struct FFIProgrammerState read_programmer_state(const struct Programmer *ptr);
void drop_programmer_pointer(const struct Programmer *ptr);
void drop_generic_channel(const struct Programmer *ptr, struct FFIGenericValue channel);
struct Array_SequenceState read_sequencer_state(const struct Sequencer *ptr);
void drop_sequencer_pointer(const struct Sequencer *ptr);
double read_fps(const struct StatusApi *ptr);
void drop_status_pointer(const struct StatusApi *ptr);
struct Timecode read_timecode_clock(const struct TimecodeApi *ptr, uint32_t timecode_id);
void drop_timecode_pointer(const struct TimecodeApi *ptr);
struct Timecode read_timecode(const struct Transport *ptr);
double read_current_beat(const struct Transport *ptr);
void drop_transport_pointer(const struct Transport *ptr);
I just tried to reproduce this issue in a (kinda) fresh Ubuntu VM (24.04).
While I do get the error you've got in the log the build still works as intended.
Did you see any further logs after the message?
This is what I see:
Logs
Built ffigen:ffigen. Running in Directory: '/home/max/Mizer/crates/ui' [WARNING]: Prefer adding Key '[description]' to your config. Input Headers: [./ffi.h] [SEVERE] : Header ./ffi.h: Total errors/warnings: 2. [SEVERE] : ./ffi.h:54:3: error: unknown type name 'FFIDpadState' [Semantic Issue] [SEVERE] : ./ffi.h:115:28: error: field has incomplete type 'struct FFIStructuredData' [Semantic Issue] [WARNING]: No definition found for declaration - (Cursor) spelling: ConnectionsRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct ConnectionsRef, usr: c:@S@ConnectionsRef [WARNING]: No definition found for declaration - (Cursor) spelling: ConnectionsRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct ConnectionsRef, usr: c:@S@ConnectionsRef [WARNING]: No definition found for declaration - (Cursor) spelling: FixturesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct FixturesRef, usr: c:@S@FixturesRef [WARNING]: No definition found for declaration - (Cursor) spelling: FixturesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct FixturesRef, usr: c:@S@FixturesRef [WARNING]: No definition found for declaration - (Cursor) spelling: GamepadConnectionRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct GamepadConnectionRef, usr: c:@S@GamepadConnectionRef [WARNING]: No definition found for declaration - (Cursor) spelling: GamepadConnectionRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct GamepadConnectionRef, usr: c:@S@GamepadConnectionRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodesRef, usr: c:@S@NodesRef [WARNING]: No definition found for declaration - (Cursor) spelling: NodesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodesRef, usr: c:@S@NodesRef [WARNING]: No definition found for declaration - (Cursor) spelling: Programmer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Programmer, usr: c:@S@Programmer [WARNING]: No definition found for declaration - (Cursor) spelling: Programmer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Programmer, usr: c:@S@Programmer [WARNING]: No definition found for declaration - (Cursor) spelling: Sequencer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Sequencer, usr: c:@S@Sequencer [WARNING]: No definition found for declaration - (Cursor) spelling: Sequencer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Sequencer, usr: c:@S@Sequencer [WARNING]: No definition found for declaration - (Cursor) spelling: StatusApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct StatusApi, usr: c:@S@StatusApi [WARNING]: No definition found for declaration - (Cursor) spelling: StatusApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct StatusApi, usr: c:@S@StatusApi [WARNING]: No definition found for declaration - (Cursor) spelling: TimecodeApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct TimecodeApi, usr: c:@S@TimecodeApi [WARNING]: No definition found for declaration - (Cursor) spelling: TimecodeApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct TimecodeApi, usr: c:@S@TimecodeApi [WARNING]: No definition found for declaration - (Cursor) spelling: Transport, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Transport, usr: c:@S@Transport [WARNING]: No definition found for declaration - (Cursor) spelling: Transport, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Transport, usr: c:@S@Transport [WARNING]: No definition found for declaration - (Cursor) spelling: GamepadConnectionRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct GamepadConnectionRef, usr: c:@S@GamepadConnectionRef [WARNING]: No definition found for declaration - (Cursor) spelling: ConnectionsRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct ConnectionsRef, usr: c:@S@ConnectionsRef [WARNING]: No definition found for declaration - (Cursor) spelling: FixturesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct FixturesRef, usr: c:@S@FixturesRef [WARNING]: No definition found for declaration - (Cursor) spelling: FixturesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct FixturesRef, usr: c:@S@FixturesRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: LayoutRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct LayoutRef, usr: c:@S@LayoutRef [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodeHistory, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodeHistory, usr: c:@S@NodeHistory [WARNING]: No definition found for declaration - (Cursor) spelling: NodesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodesRef, usr: c:@S@NodesRef [WARNING]: No definition found for declaration - (Cursor) spelling: NodesRef, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct NodesRef, usr: c:@S@NodesRef [WARNING]: No definition found for declaration - (Cursor) spelling: Programmer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Programmer, usr: c:@S@Programmer [WARNING]: No definition found for declaration - (Cursor) spelling: Programmer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Programmer, usr: c:@S@Programmer [WARNING]: No definition found for declaration - (Cursor) spelling: Programmer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Programmer, usr: c:@S@Programmer [WARNING]: No definition found for declaration - (Cursor) spelling: Sequencer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Sequencer, usr: c:@S@Sequencer [WARNING]: No definition found for declaration - (Cursor) spelling: Sequencer, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Sequencer, usr: c:@S@Sequencer [WARNING]: No definition found for declaration - (Cursor) spelling: StatusApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct StatusApi, usr: c:@S@StatusApi [WARNING]: No definition found for declaration - (Cursor) spelling: StatusApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct StatusApi, usr: c:@S@StatusApi [WARNING]: No definition found for declaration - (Cursor) spelling: TimecodeApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct TimecodeApi, usr: c:@S@TimecodeApi [WARNING]: No definition found for declaration - (Cursor) spelling: TimecodeApi, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct TimecodeApi, usr: c:@S@TimecodeApi [WARNING]: No definition found for declaration - (Cursor) spelling: Transport, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Transport, usr: c:@S@Transport [WARNING]: No definition found for declaration - (Cursor) spelling: Transport, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Transport, usr: c:@S@Transport [WARNING]: No definition found for declaration - (Cursor) spelling: Transport, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct Transport, usr: c:@S@Transport Finished, Bindings generated in /home/max/Mizer/crates/ui/./lib/api/plugin/ffi/bindings.dart
Afterwards the cargo build process just continues.