-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
NikVolf
commented
Feb 18, 2016
This would fix this crate for recent nightlies, but break it for older nightlies and stable/beta. We probably need a build script that parses |
why not just |
Because then you leave it to users to figure out when they need to enable it or not. And it’s not just nightly: Servo for example is using an older nigthly that doesn’t have this change yet. And in a few weeks this change is gonna reach beta and then stable. |
remove je_
nightly/stable config
CC @alexcrichton @brson for heads-up on breakage from rust-lang/rust@e3b414d |
To be fair, we’re using |
parse rustc version
quininer fixes
@SimonSapin How it looks now? |
lgtm after squash |
This is a good start, thanks! I think we also want to check the commit date in order to support older 1.8 nightlies (such as the one Servo is using at the moment) I’m looking into this now. Also, do we need 3 names rather than 2? je_mallocx / malloc_usable_size / je_malloc_usable_size |
On further thought, this seems very fragile. Maybe we’d be better of doing what @NikVolf initially proposed in a semver-breaking version of Many libraries implementing the |
Also, from the rustc offending commit, it seems that the |
@SimonSapin @ecoal95 |
@SimonSapin I use Rust night, |
@SimonSapin currently no, we switched to beta |
So, from rust-lang/rust@e3b414d it looks like |
@SimonSapin My fault, fix it here |
Interesting breakage. I've never considered the jemalloc symbols part of our interface. Here's an issue about it, though it seems unlikely Rust will revert it. |
@brson FWIW I agree that using Eventually, I’d like |
Fix linking on Rust versions that unprefix jemalloc Fixes #43, fixes #44. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/heapsize/46) <!-- Reviewable:end -->
Fix linking on Rust versions that unprefix jemalloc Fixes #43, fixes #44. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/heapsize/46) <!-- Reviewable:end -->
☔ The latest upstream changes (presumably #46) made this pull request unmergeable. Please resolve the merge conflicts. |
So now I'm getting this error on ARM: Compiling heapsize v0.3.3 (file:///tmp/heapsize)
Running `/tmp/parity-master/target/release/build/heapsize-80af5a4fdd6377bd/build-script-build`
failed to run custom build command for `heapsize v0.3.3 (file:///tmp/heapsize)`
Process didn't exit successfully: `/tmp/parity-master/target/release/build/heapsize-80af5a4fdd6377bd/build-script-build` (exit code: 101)
--- stderr
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:330
stack backtrace:
1: 0xb6fc0c13 - sys::backtrace::tracing::imp::write::h7a915cce7da704dazyu
2: 0xb6fc4b8f - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.43638
3: 0xb6fc471b - panicking::default_handler::hbc4727249312e5e2Ofz
4: 0xb6fb52f3 - sys_common::unwind::begin_unwind_inner::h62426d48343caeb7Smt
5: 0xb6fb5827 - sys_common::unwind::begin_unwind_fmt::hc0d86094a2fefe4eYlt
6: 0xb6fc0263 - rust_begin_unwind
7: 0xb6fcee3f - panicking::panic_fmt::h8e92de25aabc69726YL
8: 0xb6fcf177 - panicking::panic::h5fd81d80ff589a0dDXL
9: 0xb6f76457 - option::Option<T>::unwrap::h3581985636882006382
at src/libcore/macros.rs:21
10: 0xb6f71597 - main::ha91966c46cd08253iaa
at /tmp/heapsize/build.rs:13
11: 0xb6fc42e3 - sys_common::unwind::try::try_fn::h2032953291300600666 whereas before it was getting to the link stage. Rustc nightly is dated Feb 22nd.
|
What's the precise output of |
Updated. Building from a source snapshot instead of a git clone looks like this. |
@petevine What’s Looks like tarball source build don’t hold enough information to know if they have unprefixed jemalloc or not. We tweak the build script so that it’s assumed unprefixed on 1.8.0. (So it will guess incorrectly for 1.8.0 sources from before 2016-02-14 rather than after.) |
That would be just the first line |
Did that, still no good. |
Ok, I’m make a tarball-source build tomorrow. |
Is it on crates.io yet? |
@petevine https://crates.io/crates/heapsize/0.3.3 includes #46, but #49 is not merged yet. |
Ok, it works. |
Fix build script when the rustc commit date is unknown. Hopefully fixes #44 (comment). <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/heapsize/49) <!-- Reviewable:end -->