Jemalloc 4.0.3 configure script breaks building inside a different git repository.

Salvatore Sanfilippo antirez at gmail.com
Wed Oct 7 00:09:54 PDT 2015


Hello,

I was trying to upgrade Redis jemalloc version from 3.6 to 4.0. Redis
uses its own private copy of jemalloc. Our copy is not modified but we
have all our dependencies inside /dep so that a given version of Redis
has a very specific behavior and does not change depending on what the
user happens to have installed in its system.

So this means that jemalloc, in the case of Redis, happens to be
inside a directory of a different Git repository (the Redis one).

The new Jemalloc 4.0 configure script replaces the VERSION file
without doing a sane check that previous versions did, that is:

if test -d "${srcroot}.git" ; then ...

So even if the Jemalloc root directory does not include a git
repository, but jemalloc just happens to be contained into another git
repository, the new configure script will attempt to generate a
VERSION file. As a result it will generate a bogus version file
matching some commit that happens to contain the specified pattern
[0-9].[0-9].[0-9].

This in turn means that testing for Jemalloc versions features will break.

In the specific case of Redis I'll just modify the configure script,
but in general would be good if jemalloc was able to build cleanly
when embedded into a different Git repository.

Thanks for all the work that went into the 4.0 release, we hope Redis
users will benefit from this ASAP. Btw for us the ability to configure
size classes from the configure script was a good change.

Cheers,
Salvatore

-- 
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com

"If a system is to have conceptual integrity, someone must control the
concepts."
       — Fred Brooks, "The Mythical Man-Month", 1975.


More information about the jemalloc-discuss mailing list