Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: failed to run custom build command for 'libffi-sys v1.1.0' #5

Closed
ghost opened this issue Apr 6, 2021 · 3 comments
Closed

Error: failed to run custom build command for 'libffi-sys v1.1.0' #5

ghost opened this issue Apr 6, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@ghost
Copy link

ghost commented Apr 6, 2021

Hello,

I have recently tried to incorporate this crate into my project and get the following error when building:

error: failed to run custom build command for `libffi-sys v1.1.0`

Caused by:
  process didn't exit successfully: `/Users/john/Documents/picoscope/target/debug/build/libffi-sys-553610b39d60f72f/build-script-build` (exit code: 101)
  --- stderr
  autogen.sh: line 2: exec: autoreconf: not found
  thread 'main' panicked at 'Generating configure', /Users/john/.cargo/registry/src/github.com-1ecc6299db9ec823/libffi-sys-1.1.0/build/common.rs:8:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

I have also tried to add libffi = "1.0.0" and libffi-sys = "1.1.0" to my dependencies list with no luck.

For reference, I am building on macOS with the latest pico-sdk package downloaded from picotech.

Do you have any tips to get this to work? Thank you!

@timfish
Copy link
Owner

timfish commented Apr 6, 2021

The key bit from your error message is:

autoreconf: not found

Currently this Rust SDK uses libffi to work around the fact that some older Pico driver methods do not allow us to pass context with callbacks. libffi-sys links to the libffi C library and requires that you have native C build tools installed as well as automake, autoconf, etc.

To ensure you have C build tools installed, run this in the terminal and follow any prompts:

xcode-select --install

The easiest way to get the other tools installed on macOS is to install Homebrew and then run:

brew install autoconf automake libtool

I will add these instructions to the docs/readme!

@ghost
Copy link
Author

ghost commented Apr 6, 2021

Yep that fixed it. Thank you!

@ghost ghost closed this as completed Apr 6, 2021
@timfish timfish reopened this Apr 6, 2021
@timfish
Copy link
Owner

timfish commented Apr 6, 2021

I'm going to leave this open to remind me to update the docs!

@timfish timfish added the documentation Improvements or additions to documentation label Apr 8, 2021
timfish added a commit that referenced this issue Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant