can''t recompile kernel 2.6.32-71.29.1.el6.x86_64

General support questions
Post Reply
raphk
Posts: 7
Joined: 2011/07/24 21:00:07

can''t recompile kernel 2.6.32-71.29.1.el6.x86_64

Post by raphk » 2011/07/25 20:12:29

Trying to apply patches to the current kernel and recompile, however it fails on:
[code]

CC [M] crypto/xor.o
CC block/elevator.o
CC block/blk-core.o
CC block/blk-tag.o
CC block/blk-sysfs.o
CC block/blk-barrier.o
CC block/blk-settings.o
CC block/blk-ioc.o
CC block/blk-map.o
cc1: warnings being treated as errors
block/blk-map.c: In function â__blk_rq_map_kern_sgâ:
block/blk-map.c:397: error: âresâ may be used uninitialized in this function
make[1]: *** [block/blk-map.o] Error 1
make: *** [block] Error 2
[/code]

Steps to recompile:
Prepare..
[code]
# yum install rpm-build redhat-rpm-config unifdef
# su - user
# cd
# mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# echo '%_topdir %(echo $HOME)/rpmbuild' > .rpmmacros
# rpm -ihttp://mirror.centos.org/centos/6/updates/SRPMS/kernel-2.6.32-71.29.1.el6.src.rpm
# cd ~/rpmbuild/SPECS
# rpmbuild -bp --target=`uname -m` kernel.spec 2> prep-err.log | tee prep-out.log
[/code]
then i copy my kernel source to /usr/src/kernels
[code]
#cp -Rf /home/raph/kernel/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64 /usr/src/kernels/
[/code]
I apply my patches, in this case it's for SCST, then try copy my current 2.6.32-71-29.1 running .config
[code]
#cp /boot/config-`uname -r` ./.config
[/code]

now here comes the failure.. trying to make
[code]
make && make modules
.........
CC [M] crypto/xor.o
CC block/elevator.o
CC block/blk-core.o
CC block/blk-tag.o
CC block/blk-sysfs.o
CC block/blk-barrier.o
CC block/blk-settings.o
CC block/blk-ioc.o
CC block/blk-map.o
cc1: warnings being treated as errors
block/blk-map.c: In function â__blk_rq_map_kern_sgâ:
block/blk-map.c:397: error: âresâ may be used uninitialized in this function
make[1]: *** [block/blk-map.o] Error 1
make: *** [block] Error 2
[/code]

I get the same error if I DONT apply the SCST kernel patches .. any ideas? has anyone successfully re-compiled this kernel for centos? thanks so much in advanced!

gmcc78
Posts: 1
Joined: 2011/07/28 14:19:27

Re: can''t recompile kernel 2.6.32-71.29.1.el6.x86_64

Post by gmcc78 » 2011/07/28 14:25:15

I set res to -EINVAL:

int res = -EINVAL;

since it is possible to return from __blk_rq_map_kern_sg without ever touching res.
I was going to set it to 0, but that might mean success. didn't look into it much though.

raphk
Posts: 7
Joined: 2011/07/24 21:00:07

Re: can''t recompile kernel 2.6.32-71.29.1.el6.x86_64

Post by raphk » 2011/07/28 16:48:59

[quote]
gmcc78 wrote:
I set res to -EINVAL:

int res = -EINVAL;

since it is possible to return from __blk_rq_map_kern_sg without ever touching res.
I was going to set it to 0, but that might mean success. didn't look into it much though.[/quote]

Thanks for your reply - still trying to figure this out (aka stumped). Not to sound silly here but I have no idea what you're talking about.. are there make arguments to add? or specific file to modify to "set res to -EIVAL:".
thanks again!

mvrk
Posts: 7
Joined: 2008/02/04 14:08:44

Re: can''t recompile kernel 2.6.32-71.29.1.el6.x86_64

Post by mvrk » 2011/08/03 12:49:55

I had the same problem, and changing the
int res;
to
int res = -EINVAL;
in the scst_exec_req_fifo-2.6.32.patch fixes the problem.

But now i have another error, that comes from applying the put_page_callback-2.6.32.patch :

/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64/usr/include/linux/net.h:23: included file 'linux/mm.h' is not exported
make[3]: *** [/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64/usr/include/linux/.check] Error 123
make[2]: *** [linux] Error 2
make[1]: *** [headers_check] Error 2
make: *** [vmlinux] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.GR3tgG (%build)

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

can''t recompile kernel 2.6.32-71.29.1.el6.x86_64

Post by pschaff » 2011/08/03 13:06:06

[b]mvrk[/b] please review the recommended reading to understand why you should not hijack threads as you have done. Please start a new Topic for your issue to get the attention you need, providing a link to this one if required for context.

Post Reply