Sample Header Ad - 728x90

Why can't autoconf find `libtcmalloc`?

0 votes
1 answer
1033 views
I'm trying to compile a complex numerical simulation software. After running autoconf and then ./configure ... (with some other flags), I see the following in the output:
checking for malloc in -ltcmalloc... no
configure: WARNING: No tcmalloc support available.
After looking in configure.in I found:
%zsh> grep 'tcmalloc' configure.in
    AC_CHECK_LIB(tcmalloc,malloc,,AC_MSG_WARN([No tcmalloc support available.]))
I have [gperftools](https://github.com/gperftools/gperftools) installed which should provide tcmalloc I think. I do have a few libraries that are called something like that:
%zsh> ldconfig -p|grep 'tcmalloc'
	libtcmalloc_minimal_debug.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_minimal_debug.so.4
	libtcmalloc_minimal_debug.so (libc6,x86-64) => /usr/lib/libtcmalloc_minimal_debug.so
	libtcmalloc_minimal.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_minimal.so.4
	libtcmalloc_minimal.so (libc6,x86-64) => /usr/lib/libtcmalloc_minimal.so
	libtcmalloc_debug.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_debug.so.4
	libtcmalloc_debug.so (libc6,x86-64) => /usr/lib/libtcmalloc_debug.so
	libtcmalloc_and_profiler.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_and_profiler.so.4
	libtcmalloc_and_profiler.so (libc6,x86-64) => /usr/lib/libtcmalloc_and_profiler.so
	libtcmalloc.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc.so.4
	libtcmalloc.so (libc6,x86-64) => /usr/lib/libtcmalloc.so
I tried adding libtcmalloc to the list in configure.in but I just get:
checking for tcmalloc in -llibtcmalloc... ./configure: line 11516: WARNING:: command not found
no
Is there a way to get autoconf's AC_CHECK_LIB to detect my tcmalloc library?
Asked by adigitoleo (129 rep)
Nov 25, 2021, 10:57 AM
Last activity: Nov 27, 2021, 01:30 AM