Open spacekookie opened 6 years ago
This crate does not have a direct dependency on clang. I believe that is coming from the combination of rust-bindgen and the Rust compiler. When I've run into the problem of rustc
not knowing where the clang libraries are located, I set the LIBCLANG_PATH
environment variable. When building this crate on FreeBSD, for instance, I set it to /usr/local/llvm-devel/lib
, which seems to be where the clang-devel
package installs the libs. If you have suggestions for how I could make this easier, I'd be happy to hear them.
Ah, so I manually set LIBCLANG_PATH
to /usr/lib/x86_64-linux/
to force clang to use the x86 variant that's required for it to run on my machine/ travis infrastructure. And that largely fixed the issue I've had above.
However now I have a new issue. It fails to compile...something...further down the line:
/usr/include/stdio.h:33:11: fatal error: 'stddef.h' file not found
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Any ideas?
To produce the Rust bindings for ImageMagick, this crate uses the build.rs
"feature" to invoke rust-bindgen. Something is looking for that header file, but I don't know what that would be. Your best bet is to add println! statements to the build.rs
at strategic locations; output from this code ends up in an output
file in the target
directory. Maybe print the values for the include path, or something along those lines. It's been a long time since I've touched this file, and it's changed a lot since then, so I don't know all the details any more.
I'm using a cargo-cross setup to compile a project that uses
magick-rust
in a docker container. But while the other-sys
crates can be built, magick-rust fails with this error:Not really sure what to do here? The library it needs is installed, even for armhf. But I think
magick-rust
doesn't realise this? Because it just skips the library it should link against :disappointed: