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

error: no #[default_lib_allocator] found but one is required; is libstd not linked? #48

Open
amanjeev opened this issue Feb 6, 2018 · 4 comments
Assignees
Labels

Comments

@amanjeev
Copy link
Member

amanjeev commented Feb 6, 2018

Running cargo test gives the following error.

   Doc-tests alarm_base
error: no #[default_lib_allocator] found but one is required; is libstd not linked?

Not sure if this is any important but even if it is a minor issue, I believe it is worth documenting here.

@amanjeev
Copy link
Member Author

amanjeev commented Feb 6, 2018

I believe since this library is a memory allocator itself, we do not need this but how to suppress this error?

@hawkw
Copy link
Member

hawkw commented Feb 6, 2018

I believe since this library is a memory allocator itself, we do not need this

That's correct.

how to suppress this error?

It looks like something in the alarm-base crate is inadvertently depending on allocation, i suspect only when running tests. I'll take a look!

@hawkw hawkw self-assigned this Feb 6, 2018
@hawkw hawkw added the bug label Feb 6, 2018
@hawkw hawkw added this to the allocators 1.0 milestone Feb 6, 2018
@hawkw
Copy link
Member

hawkw commented Feb 6, 2018

Hmm, looks like a similar issue (rust-lang/rust#46821) has been reported for the Rust standard library's alloc_system crate as well.

I'm fairly certain that this error message is spurious. Since the test task still appears to exit with 0, this shouldn't break our CI builds. I'll continue trying to figure out if there's an easy way to suppress this, but as we're not failing builds due to it, it's not super high priority. For the meantime I think it would be fine to add a note somewhere that if you see this error, don't worry about it.

@amanjeev
Copy link
Member Author

amanjeev commented Feb 6, 2018

How about adding a "Running test" section in README.md?

There is already Building ALARM section. https://github.com/sos-os/alarm/blob/master/README.md#building-alarm

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

No branches or pull requests

2 participants