<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"kumar s" <skumar.m226@gmail.com><br><b>To: </b>lttng-dev@lists.lttng.org<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<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></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="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div><br></div><div>Skumar.</div></div><br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com<span name="x"></span><br></div></div></body></html>