[Debian-med-packaging] Seeking CMake help for spades

Gert Wollny gw.fossdev at gmail.com
Sun Feb 21 13:44:47 UTC 2016


Hello, 

On Sun, 2016-02-21 at 12:58 +0000, Sascha Steinbiss wrote:
> Hi all,
> 
> I’m trying to make spades use Debian’s jemalloc, but CMake looks
> fairly magic to me and I suspect that for someone experienced that’s
> just a one-liner…
> I tried the attached patch but it didn’t help:
> 
> [ 73%] Building CXX object io/CMakeFiles/input.dir/logger_impl.cpp.o
> /build/spades-3.6.2+dfsg/src/io/logger_impl.cpp: In member function
> 'void logging::logger::log(logging::level, const char*, size_t, const
> char*, const char*)':
> /build/spades-3.6.2+dfsg/src/io/logger_impl.cpp:107:51: error:
> 'je_mallctl' was not declared in this scope
>    je_mallctl("stats.cactive", &cmem, &clen, NULL, 0);

Since the compiler doesn't complain about include files not found, this
is not a cmake issue. 

I've pushed a patch to the build git that defines JEMALLOC_NO_RENAME
before including jemalloc/jemalloc.h. 

I did test compiling, but didn't look whether linking actually works.
AFAICS the library actually exports the je_* names though.  

If this header is included in other places you might want to add this 
define to the command line via cmake [1].  

Best, 
Gert 

[1] https://cmake.org/cmake/help/v3.0/command/add_definitions.html







More information about the Debian-med-packaging mailing list