tcmalloc in Tor FreeBSD port

Kevin Oberman kob6558 at
Fri Aug 10 19:44:55 UTC 2012

On Fri, Aug 10, 2012 at 10:34 AM, Chris Rees <crees at> wrote:
> Forwarding to tor-dev mailing list; this is their problem.
> On 10 August 2012 18:15, Kevin Oberman <kob6558 at> wrote:
>> On Fri, Aug 10, 2012 at 8:02 AM, Jordi Espasa Clofent
>> <jespasac at> wrote:
>>> Hi all,
>>> Please, read the follow thread in tor-dev to be in the loop:
>>> I tried to contact the mantainer according to Makefile and Freshports, but I
>>> didn't receive any answer. So I guess this mail-list is probably the most
>>> accurate place to ask.
>> First, bf is typically pretty active, so he (she?) must be away or you
>> would have heard from him (her?)
> He :)
>> Looks like this broke when the port was converted to use OPTIONSNG
>> about two months ago. I am not a make wizard or even close to it, but
>> the options code is clearly not doing what it's supposed to be doing.
>> You can probably roll the Makefile back to r297464, edit the
>> DISTVERSION to "DISTVERSION=", remove the
>> " \" line, keep the rest of the
>> existing port, and build it.
>> If I get a few minutes, I will see if I can figure out why the options
>> are not working after the change to OPTIONSNG. I have a port htat I
>> really need to convert to OPTIONSNG, so maybe I'll get that done, too.
> Brendan's code in the port is perfectly fine.
> The is where the problem lies;
> if test x$tcmalloc = xyes ; then
>    using_custom_malloc=yes
> fi
> if test $using_custom_malloc = no ; then
>    AC_CHECK_FUNCS(mallinfo malloc_good_size malloc_usable_size)
> fi
> ^^^ this stanza is included before $tcmalloc is set; examine where it
> is set in configure further down;
> # Check whether --with-tcmalloc was given.
> if test "${with_tcmalloc+set}" = set; then :
>   withval=$with_tcmalloc;  tcmalloc=yes
> else
>    tcmalloc=no
> fi
> Oops!
> The result is that using_custom_malloc will never be set to yes, and
> tcmalloc will probably never be used.
> Chris

Thanks, Chris. After spending some time staring at the Makefile, it
looked like the OPTIONS stuff was all correct and it is pretty
trivial, too, so I was getting ready to look at the configure stuff in
tor, but you beat me to it. Just saved me at very least  several
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at

More information about the freebsd-ports mailing list