These are chat archives for rust-lang/rust
myfreefunction, where I use some placeholder type for the inner value. If I try that in a real environment it seems to work that way...)
ReturnPtrtype. After that I don't need to mess with constructing the right box there, because I can just call
myfreefunction with calling that attached function pointer with a "wrong" type is sound?
drasko@Marx:~/rust/uedge$ cargo install cargo-edit Updating registry `https://github.com/rust-lang/crates.io-index` Installing cargo-edit v0.3.1 Downloading env_proxy v0.2.0 Downloading pad v0.1.5 Downloading serde v1.0.91 Downloading error-chain v0.12.0 Downloading cargo_metadata v0.6.4 Downloading serde_json v1.0.39 Downloading semver v0.9.0 Downloading toml_edit v0.1.3 error: failed to compile `cargo-edit v0.3.1`, intermediate artifacts can be found at `/tmp/cargo-installj2DY6X` Caused by: unable to get packages from source Caused by: failed to parse manifest at `/home/drasko/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt-1.1.0/Cargo.toml` Caused by: editions are unstable Caused by: feature `edition` is required this Cargo does not support nightly features, but if you switch to nightly channel you can add `cargo-features = ["edition"]` to enable this feature
STAGING_DIR=~/openwrt/staging_dir cargo build --target mips-unknown-linux-musl --release -vvv
bspeiceIf this is a one-off issue, maybe change the
CCenvironment variable? Otherwise, there's not much to be done besides changing the
build.rsscript for the underlying
syscrate, as that's what's actually driving
CARGO_CFG_OPENSSL_SEARCH_PATH=/home/drasko/openwrt/staging_dir/target-mips_24kc_musl/usr CMAKE_TOOLCHAIN_FILE=/home/drasko/rust/uedge/toolchain.mips.cmake STAGING_DIR=~/openwrt/staging_dir cargo build --target mips-unknown-linux-musl --release -vvv
bspeiceRight, my recommendation is to add those variables to the .cargo/config file instead of setting them when calling cargo.
bspeiceWhat's likely going on is that cargo is clearing out the environment variables to make builds more stable.
~/.cargo/configor in the
bspeice In the mean time, if you modify that file to be:
CARGO_CFG_OPENSSL_SEARCH_PATH=/home/drasko/openwrt/staging_dir/target-mips_24kc_musl/usr CMAKE_TOOLCHAIN_FILE=/home/drasko/rust/uedge/toolchain.mips.cmake STAGING_DIR=~/openwrt/staging_dir
bspeiceRight, but put it in
./.cargo/config, rather than on the command line.
bspeiceThe theory is that Cargo is modifying the environment before invoking anything.
drasko@Marx:~/rust/uedge$ cargo build --target mips-unknown-linux-musl --release -vvv error: could not load Cargo configuration Caused by: could not parse TOML configuration in `/home/drasko/rust/uedge/.cargo/config` Caused by: could not parse input as TOML Caused by: unexpected character found: `/` at line 1
bspeiceStill working on that example run.
bspeiceAh, appears I led you down the wrong path, Cargo doesn't modify the environment.
bspeiceSo are the environment variables not showing up/being used incorrectly? It seems like Cargo isn't doing anything funny, those variables should be passed to the child processes. The only thing I can recommend otherwise would be to
export CMAKE_TOOLCHAIN_FILE=...for example to try and work around this.
bspeiceAh, now I understand. Because OPENSSL_SEARCH_PATH is a CMake define, not an environment variable I think you're correct, there's not a way to pass it in without changing the