Skip to content

Fail to compile #1

@paucazou

Description

@paucazou

Hello,
thanks for this library which I find pretty interesting because I considered writing it myself before finding yours !
I tried to compile a simple example project but building failed. This is the backtrace :

error: failed to run custom build command for `rtmidi v0.2.0`

Caused by:
  process didn't exit successfully: `/home/partage/.scripts/rust/rtmidi/target/debug/build/rtmidi-0c2e706d61bdb0f5/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-lib=rtmidi
  cargo:rerun-if-changed=wrapper.h
  cargo:rerun-if-env-changed=RTMIDI_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rustc-cfg=rtmidi_version="v4_0_0"

  --- stderr
  wrapper.h:3:10: fatal error: 'rtmidi_c.h' file not found
  wrapper.h:3:10: fatal error: 'rtmidi_c.h' file not found, err: true
  thread 'main' panicked at 'Unable to generate bindings: ()', /home/philippe/.cargo/registry/src/github.com-1ecc6299db9ec823/rtmidi-0.2.0/build.rs:41:10
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5
     1: core::panicking::panic_fmt
               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14
     2: core::result::unwrap_failed
               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/result.rs:1355:5
     3: core::result::Result<T,E>::expect
               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/result.rs:997:23
     4: build_script_build::main
               at ./build.rs:36:20
     5: core::ops::function::FnOnce::call_once
               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/ops/function.rs:227:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

My questions are:

  • is the C++ lib supposed to be compiled before compiling the wrapper?
  • where should be the C++ files (and the binary)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions