From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] lib_ring_buffer_align error bit-field '<anonymous>' width not an integer constant
Date: Mon, 3 Feb 2014 15:50:24 +0000 (UTC) [thread overview]
Message-ID: <2097060417.17951.1391442624499.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <CAO_Arvrp4GwhVr_c170hD3eQ8F77WSmsY4wsCOpg3Xdg23jjKw@mail.gmail.com>
----- Original Message -----
> From: "kumar s" <skumar.m226@gmail.com>
> To: lttng-dev at lists.lttng.org
> Sent: Tuesday, December 3, 2013 3:20:02 AM
> Subject: [lttng-dev] lib_ring_buffer_align error bit-field '<anonymous>'
> width not an integer constant
> Hello,
> When trying to build lttng modules i am getting this error. Cross compiler
> for mips and Arch = mips is used in makefile.
> Linux kernel version 2.6.32.27
> 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-
> make[1]: Entering directory
> `/home/shkumar/Development_Merge/NewOCT/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux'
> CC [M]
> /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-ring-buffer-client-discard.o
> In file included from
> /home/shkumar/lttng-tools/lttngmod/lttng-modules/wrapper/ringbuffer/config.h:1,
> from /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-tracer-core.h:35,
> from /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-tracer.h:39,
> from
> /home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-ring-buffer-client-discard.c:24:
> /home/shkumar/lttng-tools/lttngmod/lttng-modules/wrapper/ringbuffer/../../lib/ringbuffer/config.h:
> In function 'lib_ring_buffer_align':
> /home/shkumar/lttng-tools/lttngmod/lttng-modules/wrapper/ringbuffer/../../lib/ringbuffer/config.h:266:
> error: bit-field '<anonymous>' width not an integer constant
> make[2]: ***
> [/home/shkumar/lttng-tools/lttngmod/lttng-modules/lttng-ring-buffer-client-discard.o]
> Error 1
> make[1]: *** [_module_/home/shkumar/lttng-tools/lttngmod/lttng-modules] Error
> 2
> make[1]: Leaving directory
> `/home/shkumar/Development_Merge/NewOCT/OCTEON_SDK/octeon_sdk/OCTEON-SDK/linux/kernel_2.6/linux'
> make: *** [default] Error 2
> How do i fix this?
This is caused by the use of offset_align(), passing incorrect parameters, detected by the compiler:
see lttng-modules
lib/align.h:
#define offset_align(align_drift, alignment) \
({ \
BUILD_RUNTIME_BUG_ON((alignment) == 0 \
|| ((alignment) & ((alignment) - 1))); \
(((alignment) - (align_drift)) & ((alignment) - 1)); \
})
See also lttng-modules
lib/bug.h
So there are two things that are possible: either the compiler you use does not perform the
optimisations that are expected, and therefore triggers the BUILD_BUG_ON() without needing to,
or there really is an incorrect value passed to offset_align().
Make sure lttng-modules, your compiler toolchain, and your kernel are up to date.
Thanks,
Mathieu
> Skumar.
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140203/6115cb42/attachment.html>
next parent reply other threads:[~2014-02-03 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAO_Arvrp4GwhVr_c170hD3eQ8F77WSmsY4wsCOpg3Xdg23jjKw@mail.gmail.com>
2014-02-03 15:50 ` Mathieu Desnoyers [this message]
2014-02-04 10:13 ` kumar s
2014-02-04 14:52 ` Mathieu Desnoyers
[not found] ` <CAO_ArvrPPJZ4H_cLx4uFd=wd7XPuq=PDEU_RqU2=3k4Bjx5Czw@mail.gmail.com>
2014-02-07 4:38 ` [lttng-dev] Fwd: " kumar s
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2097060417.17951.1391442624499.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox