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

Fails to compile #1

Closed
phdoerfler opened this issue Jan 21, 2016 · 2 comments
Closed

Fails to compile #1

phdoerfler opened this issue Jan 21, 2016 · 2 comments

Comments

@phdoerfler
Copy link

Hi,

I get the following error when trying to compile imageproc:

$ cargo build
   Compiling imageproc v0.1.0 (file:///Users/phi/Documents/workspace/rust-imageproc)
failed to run custom build command for `imageproc v0.1.0 (file:///Users/phi/Documents/workspace/rust-imageproc)`
Process didn't exit successfully: `/Users/phi/Documents/workspace/rust-imageproc/target/debug/build/imageproc-f73ade026b903961/build-script-build` (exit code: 101)
--- stdout
running: "make" "-j4"

--- stderr
make: *** No targets specified and no makefile found.  Stop.
thread '<main>' panicked at 'assertion failed: t!(cmd . status (  )).success()', build.rs:15


I have written a sobel convolution kernel and would like to submit a pull request for this but I'd like to test it before I do that.

@phdoerfler
Copy link
Author

It seems I forgot to call

git submodule update --init

I do seem to have trouble compiling FreeImage itself now. I am on OS X and have FreeImage installed via the package manager (homebrew). Is there any way I can avoid the compilation of FreeImage and use the installed version instead?

@phdoerfler
Copy link
Author

An alternative solution is to replace these lines in build.rs:

    run(Command::new(make())
        .arg("-j4")
        .current_dir("3rdparty/FreeImage"));
    run(Command::new("cp")
        .arg("3rdparty/FreeImage/Dist/libfreeimage.a")
        .arg(format!("{}/", out_dir)));

with these:

    run(Command::new("cp")
        .arg("/usr/local/Cellar/freeimage/3.17.0/lib/libfreeimage.a")
        .arg(format!("{}/", out_dir)));

depending on where freeimage is installed locally. This is the location homebrew installed it in.

With this change I was able to get imageproc to compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant