<p></p>
<p>Hi,</p>
<p>Has anyone successfully compiled Kmailio with gcov? I tried the following commands but these do not work</p>
<div class="highlight highlight-source-shell"><pre>make CFLAGS=<span class="pl-s"><span class="pl-pds">"</span>-fprofile-arcs -ftest-coverage<span class="pl-pds">"</span></span> LDFLAGS=<span class="pl-s"><span class="pl-pds">"</span>-fprofile-arcs -ftest-coverage<span class="pl-pds">"</span></span> cfg
make CFLAGS=<span class="pl-s"><span class="pl-pds">"</span>-fprofile-arcs -ftest-coverage<span class="pl-pds">"</span></span> LDFLAGS=<span class="pl-s"><span class="pl-pds">"</span>-fprofile-arcs -ftest-coverage<span class="pl-pds">"</span></span> all</pre></div>
<p>I received the following compilation errors</p>
<pre><code>...
corex_rpc.c:(.text+0x209a): undefined reference to `get_debug_facility'
corex_rpc.c:(.text+0x20d3): undefined reference to `log_level_info'
corex_rpc.c:(.text+0x2108): undefined reference to `_ksr_slog_func'
corex_rpc.c:(.text+0x2138): undefined reference to `log_stderr'
corex_rpc.c:(.text+0x2161): undefined reference to `log_color'
corex_rpc.c:(.text+0x218d): undefined reference to `dprint_color'
corex_rpc.c:(.text+0x2194): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x21a0): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x21c3): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x21cf): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x2214): undefined reference to `log_level_info'
corex_rpc.c:(.text+0x221c): undefined reference to `my_pid'
corex_rpc.c:(.text+0x2236): undefined reference to `process_no'
corex_rpc.c:(.text+0x2281): undefined reference to `log_color'
corex_rpc.c:(.text+0x22a5): undefined reference to `dprint_color_reset'
corex_rpc.c:(.text+0x22c3): undefined reference to `_km_log_func'
corex_rpc.c:(.text+0x22ca): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x22d6): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x22fa): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x2306): undefined reference to `log_prefix_val'
corex_rpc.c:(.text+0x2349): undefined reference to `log_level_info'
corex_rpc.c:(.text+0x2361): undefined reference to `log_level_info'
corex_rpc.c:(.text+0x2373): undefined reference to `get_debug_facility'
corex_rpc.c:(.text+0x23bd): undefined reference to `dprint_crit'
corex_rpc.c:(.text+0x23c6): undefined reference to `dprint_crit'
collect2: error: ld returned 1 exit status
../../Makefile.rules:191: recipe for target 'corex.so' failed
make[2]: *** [corex.so] Error 1
Makefile:511: recipe for target 'modules' failed
make[1]: *** [modules] Error 1
make[1]: Leaving directory '/home/ubuntu/experiments/kamailio-gcov/src'
</code></pre>
<p>I suspect that my CFLAGS and LDFLAGS have overwritten the ones configured by Kamailio. However, I haven't successfully fixed these errors. You help/suggestions would be really appreciated!</p>
<p>Thanks</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2551">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKANCP6PFEB2F4SUILSQCNNRANCNFSM4TWUUVQA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZLAMONYOVLTASLOO7TSQCNNRA5CNFSM4TWUUVQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LCQB6MA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2551",
"url": "https://github.com/kamailio/kamailio/issues/2551",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>