Hi Everyone,

I configuredl ike this:

./configure \
--enable-autogen \
--prefix=/usr/local \
--with-jemalloc-prefix="" \
--with-private-namespace="" \
--enable-prof \
--enable-prof-libunwind \
 --with-static-libunwind=/usr/lib/x86_64-linux-gnu/libunwind-x86_64.a \
--enable-dss \
--enable-xmalloc

compiling an own program with malloc_stats_print works fine.

However, upon configuring rsyslog i get:

checking for malloc_stats_print in -ljemalloc... no
configure: error: in `/home/reinoud/rsyslog-8.4.0':
configure: error: jemalloc library is missing

Ok, writing an own program to test:

#include<stdio.h>
#include<jemalloc/jemalloc.h>

int main(void)
{
    char *victor = NULL;

    victor = (char *)malloc(100*sizeof(char));
    if (victor == NULL)
    {
        return(-1);
    }
    printf("Pointer to victor is %p\n", victor);
    // Dump allocator statistics to stderr.
    malloc_stats_print(NULL, NULL, NULL);
    if (victor != NULL)
    {
        free(victor);
        victor = NULL;
    }
    return(0);
}

 compile with:
 gcc -Wall -g -o test_ test_.c -ljemalloc -lunwind

reinoud@Mipam:~/rsyslog-8.4.0$ ./test_
Pointer to victor is 0x7f4cc9810080
___ Begin jemalloc statistics ___
Version: 3.6.0-0-g46c0af68bd248b04df75e4f92d5fb804c3d75340
Assertions disabled
Run-time option settings:
  opt.abort: false
  opt.lg_chunk: 22
  opt.dss: "secondary"
  opt.narenas: 16
  opt.lg_dirty_mult: 3
  opt.stats_print: false
  opt.junk: false
  opt.quarantine: 0
  opt.redzone: false
  opt.zero: false
  opt.xmalloc: false
  opt.tcache: true
  opt.lg_tcache_max: 15
  opt.prof: false
  opt.prof_prefix: "jeprof"
  opt.prof_active: true
  opt.lg_prof_sample: 19
  opt.prof_accum: false
  opt.lg_prof_interval: -1
  opt.prof_gdump: false
  opt.prof_final: true
  opt.prof_leak: false
CPUs: 4
Arenas: 16
Pointer size: 8
Quantum size: 16
Page size: 4096
Min active:dirty page ratio per arena: 8:1
Maximum thread-cached size class: 32768
Chunk size: 4194304 (2^22)
Allocated: 40832, active: 40960, mapped: 8388608
Current active ceiling: 4194304
chunks: nchunks   highchunks    curchunks
              2            2            2
huge: nmalloc      ndalloc    allocated
            0            0            0

arenas[0]:
assigned threads: 1
dss allocation precedence: secondary
dirty pages: 10:0 active:dirty, 0 sweeps, 0 madvises, 0 purged
            allocated      nmalloc      ndalloc    nrequests
small:           8064           72            0            0
large:          32768            1            0            1
total:          40832           73            0            1
active:         40960
mapped:       4194304
bins:     bin  size regs pgs    allocated      nmalloc      ndalloc
 nrequests       nfills     nflushes      newruns       reruns      curruns
[0..6]
            7   112   72   2         8064           72            0
   0            1            0            1            0            1
[8..27]
large:   size pages      nmalloc      ndalloc    nrequests      curruns
[7]
        32768     8            1            0            1            1
[1008]
--- End jemalloc statistics ---

hence, the function is there ........
Why does configure think it's not there?
Thanks,

Reinoud.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to