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

Issue #30592: Restore build in --disable-jemalloc mode. #30662

Merged
merged 1 commit into from
Jan 14, 2016

Conversation

simartin
Copy link
Contributor

Fixes #30592, a fallout of cd1848a

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@MagaTailor
Copy link

Could this patch be responsible for breaking make install? After a successful build which the patch enabled, make install started doing stage0 from scratch again.

@simartin
Copy link
Contributor Author

simartin commented Jan 1, 2016

Thanks @petevine for spotting this; I'm not 100% sure it's related however I'm testing a patch to verify and fix if it's indeed related.

@MagaTailor
Copy link

Yeah, probably a complete shot in the dark but seeing the additional #[cfg(stage0)] gave me the idea to ask.

EDIT:
The vanilla jemalloc'ed make install works correctly so that was it.

@aturon
Copy link
Member

aturon commented Jan 5, 2016

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned aturon Jan 5, 2016
@brson
Copy link
Contributor

brson commented Jan 5, 2016

Looks good. Can you please add comments to both of the cfg's explaining why they are doing what they are doing? Otherwise they will become mysteries (I can't even see why the second commit is needed so a comment will def help).

@simartin
Copy link
Contributor Author

Comments have been added as requested. I hope they're correct, as I'm not allocator specialist (I came up with this patch by finding the minimal working revert of cd1848a, that caused the issue in the first place).


// Don't inject an allocator in stage0 since we explicitly use alloc_system, jemalloc
// being possibly unavailable or disallowed
#![cfg_attr(not(stage0), needs_allocator)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the build should be able to complete even if this attribute is present (e.g. this crate always needs an allocator). Did you run into an error if it was present in stage0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the part where I'm not crystal clear what's happening; I had to reinstate this line to avoid the issue described in the issue, with make install starting from stage0 after a successful build

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah in that case the make install issue was likely unrelated and connected to some other series of events. I believe that if this is reverted back to as-it-was it should bootstrap A-OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree as I fail to reproduce now, but I've upgraded rustc in the meanwhile. @joerg-krause
I see you used the second commit in your tree, therefore I believe you encountered the "make install triggers stage 0" issue as well. If that's correct, does "make -d" give the reason why make starts back at stage 0? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I picked the second issue because it was comitted together with the first one. Furthermore, I am not sure when make install should not start at stage0. If I do a change in Rust, make install will always start at stage0, right?

@simartin
Copy link
Contributor Author

Ok, thanks. Let me remove the last commit, and let's confirm everything is still OK.

@MagaTailor
Copy link

I built an armv7 rustc earlier today and everything installed fine this time using just the first patch.

@alexcrichton
Copy link
Member

@bors: r+ c5da160

Thanks!

@bors
Copy link
Contributor

bors commented Jan 14, 2016

⌛ Testing commit c5da160 with merge e1f550e...

bors added a commit that referenced this pull request Jan 14, 2016
@bors bors merged commit c5da160 into rust-lang:master Jan 14, 2016
bors added a commit that referenced this pull request Jan 14, 2016
@simartin simartin deleted the issue_30592 branch January 14, 2016 11:40
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

Successfully merging this pull request may close these issues.

8 participants