<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">kumar s</b> <span dir="ltr"><<a href="mailto:skumar.m226@gmail.com">skumar.m226@gmail.com</a>></span><br>
Date: Fri, Feb 7, 2014 at 10:08 AM<br>Subject: Re: [lttng-dev] lib_ring_buffer_align error bit-field '<anonymous>' width not an integer constant<br>To: Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>><br>
<br><br><div dir="ltr"><div><div><div>Hi,<br><br></div>In bug.h, i removed the underlined lines and left only BUG_ON(condition). The modules got compiled without any errors, however are there any issues on removing the underlined lines.<br>
<br> */<br> #define BUILD_RUNTIME_BUG_ON(condition) \<br> do { \<br><u>- </u><span style><u> if (__builtin_constant_p(condition)) \<br>
- BUILD_BUG_ON(condition); \<br>- else </u> </span> \<br> BUG_ON(condition); \<br> } while (0)<br>
<br></div>thank you<br></div>Skumar<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 4, 2014 at 8:22 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"><div>You might want to request help from Cavium, since they are the one supporting<br>
</div><div>their toolchain.<br></div><div><br></div><div>It really seems to be a Cavium-specific issue.<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Mathieu<br></div><div><br></div><div><br></div><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>"Mathieu Desnoyers" <<a href="mailto:mathieu.desnoyers@efficios.com" target="_blank">mathieu.desnoyers@efficios.com</a>><br><b>Cc: </b><a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<b>Sent: </b>Tuesday, February 4, 2014 5:13:44 AM<br><b>Subject: </b>Re: [lttng-dev] lib_ring_buffer_align error bit-field '<anonymous>' width not an integer constant<div><div><br><div><br></div><div dir="ltr">
<div><div><div><div>Hi,<br><div><br></div></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><div><br></div></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><div><br></div><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><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><div><br></div></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><span style="color:#888888" color="#888888"><br></span></span></blockquote>
<span><span style="color:#888888" color="#888888"><div>
<br><div><br></div></div><div><br></div><div>-- <br></div><div><span></span>Mathieu Desnoyers<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><span></span><br></div>
</span></span></div></div></blockquote></div><br></div>
</div></div></blockquote><div><div><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></div></div></div></div></blockquote></div><br></div>
</div></div></div><br></div>