<div dir="ltr"><div><div><div><div>Hi,<br><br></div>The lttng module i use is the latest version, compiler toolchain cannot be upgraded since it is provided by Cavium, kernel version is 2.6.32.27. <br><br></div>Is there any change i need to do on lttng modules to build it?<br>
<br></div>Thank you<br></div>SKumar<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 9:20 PM, Mathieu Desnoyers <span dir="ltr"><<a href="mailto:mathieu.desnoyers@efficios.com" target="_blank">mathieu.desnoyers@efficios.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><hr><blockquote style="padding-left:5px;font-size:12pt;font-style:normal;margin-left:5px;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal;border-left:2px solid #1010ff">
<b>From: </b>"kumar s" <<a href="mailto:skumar.m226@gmail.com" target="_blank">skumar.m226@gmail.com</a>><br><b>To: </b><a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<b>Sent: </b>Tuesday, December 3, 2013 3:20:02 AM<br><b>Subject: </b>[lttng-dev] lib_ring_buffer_align error bit-field '<anonymous>' width not an integer constant<div><div class="h5"><br><div><br></div><div dir="ltr">
Hello,<div><br></div><div>When trying to build lttng modules i am getting this error. Cross compiler for mips and Arch = mips is used in makefile.</div><div><br></div><div>Linux kernel version 2.6.32.27</div><div><br></div>
<div><br></div><div><div>make -C /home/shkumar/Development_Merge/NewOCT/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux M=/home/shkumar/lttng-tools/lttngmod/lttng-modules modules ARCH=mips CROSS_COMPILE=mips64-octeon-linux-gnu-</div>
<div>make[1]: Entering directory `/home/shkumar/Development_Merge/NewOCT/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux'</div><div>  CC [M]  /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-ring-buffer-client-discard.o</div>
<div>In file included from /home/shkumar/lttng-tools/lttngmod/lttng-modules/wrapper/ringbuffer/config.h:1,</div><div>                 from /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-tracer-core.h:35,</div><div>

                 from /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-tracer.h:39,</div><div>                 from /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-ring-buffer-client-discard.c:24:</div><div>
/home/shkumar/lttng-tools/lttngmod/lttng-modules/wrapper/ringbuffer/../../lib/ringbuffer/config.h: In function 'lib_ring_buffer_align':</div><div>/home/shkumar/lttng-tools/lttngmod/lttng-modules/wrapper/ringbuffer/../../lib/ringbuffer/config.h:266: error: bit-field '<anonymous>' width not an integer constant</div>
<div>make[2]: *** [/home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-ring-buffer-client-discard.o] Error 1</div><div>make[1]: *** [_module_/home/shkumar/lttng-tools/lttngmod/lttng-modules] Error 2</div><div>make[1]: Leaving directory `/home/shkumar/Development_Merge/NewOCT/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux'</div>
<div>make: *** [default] Error 2</div></div><div><br></div><div>How do i fix this?</div></div></div></div></blockquote><div><br></div><div>This is caused by the use of offset_align(), passing incorrect parameters, detected by the compiler:<br>
</div><div><br></div><div>see lttng-modules<br></div><div><br></div><div>lib/align.h:<br></div><div><br></div><div>#define offset_align(align_drift, alignment)                                   \<br>        ({                                                                     \<br>
                BUILD_RUNTIME_BUG_ON((alignment) == 0                          \<br>                                   || ((alignment) & ((alignment) - 1)));      \<br>                (((alignment) - (align_drift)) & ((alignment) - 1));           \<br>
        })<br><br></div><div>See also lttng-modules<br></div><div>lib/bug.h<br></div><div><br></div><div>So there are two things that are possible: either the compiler you use does not perform the<br></div><div>optimisations that are expected, and therefore triggers the BUILD_BUG_ON() without needing to,</div>
<div>or there really is an incorrect value passed to offset_align().<br></div><div><br></div><div>Make sure lttng-modules, your compiler toolchain, and your kernel are up to date.<br></div><div><br></div><div>Thanks,<br></div>
<div><br></div><div>Mathieu<br></div><div><br></div><blockquote style="padding-left:5px;font-size:12pt;font-style:normal;margin-left:5px;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal;border-left:2px solid #1010ff">
<div dir="ltr"><div><br></div><div>Skumar.</div></div><br>_______________________________________________<br>lttng-dev mailing list<br><a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><span class="HOEnZb"><font color="#888888"><div>
<br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Mathieu Desnoyers<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><span name="x"></span><br></div>
</font></span></div></div></blockquote></div><br></div>