Skip to content

This crate depends on libc, but doesn't declare that dependency #85

Closed
@petrochenkov

Description

@petrochenkov

It refers to atexit in particular.

Unless some other crate pulls libc accidentally you get a linking error like this when using this crate.

[INFO] [stdout]   = note: /usr/bin/ld: /opt/rustwide/target/debug/deps/liblibmimalloc_sys-1551225da21123ef.rlib(static.o): in function `mi_process_load':
[INFO] [stdout]           /opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/libmimalloc-sys-0.1.26/c_src/mimalloc/src/init.c:533: undefined reference to `atexit'
[INFO] [stdout]           collect2: error: ld returned 1 exit status

This was found when testing some linking order changes in rustc in rust-lang/rust#102832 (comment) (build failure - https://crater-reports.s3.amazonaws.com/pr-102832-1/try%230c94de7c1a8f4b82b92d562847c35f513f520c7a/reg/mimalloc-0.1.30/log.txt).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions