Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: rwlock: error: negative width in bit-field ‘<anonymous>’ #1

Closed
KumarAmitMehta opened this issue Dec 22, 2015 · 1 comment
Assignees

Comments

@KumarAmitMehta
Copy link
Owner

Build failures are seen. Logs below

snip from build log

make -C /lib/modules/3.18.7-200.fc21.x86_64/build M=pwd clean *
make[1]: Entering directory '/usr/src/kernels/3.18.7-200.fc21.x86_64'
make[1]: Leaving directory '/usr/src/kernels/3.18.7-200.fc21.x86_64'
make -C /lib/modules/3.18.7-200.fc21.x86_64/build M=pwd modules
make[1]: Entering directory '/usr/src/kernels/3.18.7-200.fc21.x86_64'
CC [M] /home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.o
/home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.c:87:279: error: negative width in bit-field ‘’
__ATTR(id, 0666, id_show, id_store);
^
/home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.c:93:169: error: negative width in bit-field ‘’
__ATTR(foo, S_IWUSR|S_IRGRP|S_IROTH, foo_show, foo_store);
^
scripts/Makefile.build:263: recipe for target '/home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.o' failed
make[2]: *
* [/home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.o] Error 1
Makefile:1385: recipe for target 'module/home/amit/Documents/devel/three-O-clock-blues/rwlock' failed
make[1]: *** [module/home/amit/Documents/devel/three-O-clock-blues/rwlock] Error 2
make[1]: Leaving directory '/usr/src/kernels/3.18.7-200.fc21.x86_64'
Makefile:6: recipe for target 'modules' failed
make: *** [modules] Error 2
*

Environment

$ uname -a
Linux discworld 3.18.7-200.fc21.x86_64 #1 SMP Wed Feb 11 21:53:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/fedora-release
Fedora release 21 (Twenty One)

@KumarAmitMehta KumarAmitMehta self-assigned this Dec 22, 2015
KumarAmitMehta added a commit that referenced this issue Dec 23, 2015
Permission check changes went into kernel that broke those
kernel modules (rwlock and others) and hence updating the
corresponding changes in my modules. Summary of kernel
changes [1]
[1] https://lkml.org/lkml/2014/3/14/363

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
@KumarAmitMehta
Copy link
Owner Author

With commit #f05d928, this issue is fixed now.

Successful build logs below:

[amit@discworld rwlock]$ make
make -C /lib/modules/3.18.7-200.fc21.x86_64/build M=pwd modules
make[1]: Entering directory '/usr/src/kernels/3.18.7-200.fc21.x86_64'
CC [M] /home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.mod.o
LD [M] /home/amit/Documents/devel/three-O-clock-blues/rwlock/rwlock.ko
make[1]: Leaving directory '/usr/src/kernels/3.18.7-200.fc21.x86_64'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant