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

Build fails when there are spaces in the path to the project #320

Closed
weiznich opened this issue Oct 24, 2016 · 4 comments
Closed

Build fails when there are spaces in the path to the project #320

weiznich opened this issue Oct 24, 2016 · 4 comments

Comments

@weiznich
Copy link
Contributor

When using ring as dependency of a rust project the build is failing if the path to the project contains a white space, for example /tmp/ring\ build\ fail.

Output:

root@215b2bafd8c8:/tmp/ring build fail# cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling ring v0.4.3
   Compiling untrusted v0.3.1
   Compiling lazy_static v0.2.1
error: failed to run custom build command for `ring v0.4.3`
process didn't exit successfully: `/tmp/ring build fail/target/debug/build/ring-540e5df33a7f7e62/build-script-build` (exit code: 101)
--- stdout
HOSTNAME: 215b2bafd8c8
TERM: xterm
OLDPWD: /tmp
USER: root
PATH: /root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin:/root/.multirust/toolchains/nightly-2016-10-18-x86_64-unknown-linux-gnu/bin
PWD: /tmp/ring build fail
SHLVL: 1
HOME: /root
_: /root/.cargo/bin/cargo
LD_LIBRARY_PATH: /tmp/ring build fail/target/debug/deps:/root/.multirust/toolchains/nightly-2016-10-18-x86_64-unknown-linux-gnu/lib
CARGO_HOME: /root/.cargo
RUST_RECURSION_COUNT: 1
RUSTUP_TOOLCHAIN: nightly-2016-10-18-x86_64-unknown-linux-gnu
RUSTUP_HOME: /root/.multirust
SSL_CERT_FILE: /usr/lib/ssl/certs/ca-certificates.crt
SSL_CERT_DIR: /usr/lib/ssl/certs
CARGO_FEATURE_DEFAULT: 1
RUSTC: rustc
CARGO_PKG_VERSION_MAJOR: 0
DEBUG: true
CARGO_FEATURE_DEV_URANDOM_FALLBACK: 1
RUSTDOC: rustdoc
CARGO_PKG_HOMEPAGE: 
CARGO_MANIFEST_DIR: /root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.4.3
CARGO_PKG_AUTHORS: Brian Smith <brian@briansmith.org>
TARGET: x86_64-unknown-linux-gnu
PROFILE: debug
CARGO_PKG_NAME: ring
NUM_JOBS: 4
CARGO_FEATURE_USE_HEAP: 1
CARGO_PKG_VERSION: 0.4.3
HOST: x86_64-unknown-linux-gnu
CARGO_PKG_VERSION_MINOR: 4
OPT_LEVEL: 0
CARGO_PKG_DESCRIPTION: Safe, fast, small crypto using Rust.
CARGO_PKG_VERSION_PATCH: 3
OUT_DIR: /tmp/ring build fail/target/debug/build/ring-540e5df33a7f7e62/out
CARGO_PKG_VERSION_PRE: 
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/lib/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/aes/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/aes/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/chacha/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/cipher/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/curve25519/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/curve25519/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/ec/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/ec/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/modes/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/modes/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/poly1305/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/poly1305/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/rand/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/rsa/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/sha/asm/
mkdir -p fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/test/

--- stderr
mk/ring.mk:173: warning: overriding recipe for target '/tmp/ring'
mk/ring.mk:169: warning: ignoring old recipe for target '/tmp/ring'
mk/ring.mk:173: warning: overriding recipe for target 'build'
mk/ring.mk:169: warning: ignoring old recipe for target 'build'
mk/ring.mk:224: warning: overriding recipe for target '/tmp/ring'
mk/ring.mk:173: warning: ignoring old recipe for target '/tmp/ring'
mk/ring.mk:224: warning: overriding recipe for target 'build'
mk/ring.mk:173: warning: ignoring old recipe for target 'build'
mk/ring.mk:223: *** mixed implicit and normal rules: deprecated syntax
mk/bottom_of_makefile.mk:35: warning: overriding recipe for target '/tmp/ring'
mk/ring.mk:224: warning: ignoring old recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:35: warning: overriding recipe for target 'build'
mk/ring.mk:224: warning: ignoring old recipe for target 'build'
mk/bottom_of_makefile.mk:34: *** mixed implicit and normal rules: deprecated syntax
mk/bottom_of_makefile.mk:37: warning: overriding recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:35: warning: ignoring old recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:37: warning: overriding recipe for target 'build'
mk/bottom_of_makefile.mk:35: warning: ignoring old recipe for target 'build'
mk/bottom_of_makefile.mk:36: *** mixed implicit and normal rules: deprecated syntax
mk/bottom_of_makefile.mk:37: warning: overriding recipe for target 'fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/%.o'
mk/bottom_of_makefile.mk:35: warning: ignoring old recipe for target 'fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/%.o'
mk/bottom_of_makefile.mk:39: warning: overriding recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:37: warning: ignoring old recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:39: warning: overriding recipe for target 'build'
mk/bottom_of_makefile.mk:37: warning: ignoring old recipe for target 'build'
mk/bottom_of_makefile.mk:38: *** mixed implicit and normal rules: deprecated syntax
mk/bottom_of_makefile.mk:39: warning: overriding recipe for target 'fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/%.o'
mk/bottom_of_makefile.mk:37: warning: ignoring old recipe for target 'fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/%.o'
mk/bottom_of_makefile.mk:41: warning: overriding recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:39: warning: ignoring old recipe for target '/tmp/ring'
mk/bottom_of_makefile.mk:41: warning: overriding recipe for target 'build'
mk/bottom_of_makefile.mk:39: warning: ignoring old recipe for target 'build'
mk/bottom_of_makefile.mk:40: *** mixed implicit and normal rules: deprecated syntax
mk/bottom_of_makefile.mk:41: warning: overriding recipe for target 'fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/%.o'
mk/bottom_of_makefile.mk:39: warning: ignoring old recipe for target 'fail/target/debug/build/ring-540e5df33a7f7e62/out/obj/%.o'
make: *** No rule to make target '%.cc', needed by '/tmp/ring'.  Stop.
thread 'main' panicked at 'make execution failed', /root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/ring-0.4.3/build.rs:211
note: Run with `RUST_BACKTRACE=1` for a backtrace.
@briansmith
Copy link
Owner

Thanks! Yes, for now spaces in the paths aren't supported, I guess. I would accept patches to fix this.

What version of GNU make are you using?

@briansmith briansmith changed the title Build is failing Build fails when there are spaces in the path to the project Oct 24, 2016
@weiznich
Copy link
Contributor Author

I've reproduced this with gnu make 4.0 and 4.1.
I propose to use only build.rs to build the dependencies to workaround this issue.
See my pull request.

@briansmith briansmith added this to the 0.7 milestone Nov 15, 2016
weiznich added a commit to weiznich/ring that referenced this issue Feb 16, 2017
* Fix briansmith#320

I agree to license my contributions to each file under the terms
given at the top of each file I changed.
@briansmith briansmith modified the milestones: 0.7, 0.7.n Feb 18, 2017
@briansmith
Copy link
Owner

@weiznich, You rewrote the entire build system to fix this bug. :) Is it fixed?

@weiznich
Copy link
Contributor Author

weiznich commented Mar 6, 2017

Is fixed by the rewrite of the build system.

@weiznich weiznich closed this as completed Mar 6, 2017
@briansmith briansmith modified the milestones: 0.7.n, 0.7.3 Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants