Skip to content

Musl doesn't support init-exec tls #644

@gbaraldi

Description

@gbaraldi

Hi!. We are studying using mimalloc as the malloc for julia. While doing this, we found an error on musl, where if you statically link mimalloc to a shared library, then dlopen it. You get Error relocating /workspace/mimalloc/build/test.so: __errno_location: initial-exec TLS resolves to dynamic definition in /workspace/mimalloc/build/test.so.

While the issue is simple enough to solve in our case, just build it with -DMI_LOCAL_DYNAMIC_TLS=ON on musl, it would be more correct if the build system detected it was targeting musl and did that automatically.

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