Skip to content

Build fails on OS X when google/malloc_extension.h exists but -ltcmalloc doesn't #143

@adamnovak

Description

@adamnovak

I am running OS X 10.13, with gperftools 2.5 installed via Macports (as a dependency for something else), and building with GCC 7 installed via Macports.

The sparsehash ./configure script decides to try and link against tcmalloc, because it sees /opt/local/include/google/malloc_extension.h. But the linker fails to find -ltcmalloc, because it is in /opt/local/lib/libtcmalloc.a and similar, and it is only searching in /opt/local/lib/gcc7/ and not /opt/local/lib.

The configure script needs to make sure that linking actually succeeds before deciding to actually use tcmalloc, or I need a configure script option to override the check and refrain from using tcmalloc even when it is installed.

Is there a suggested workaround for convincing sparsehash to ignore the installed tcmalloc?

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