Kernel upgrade error - Redhat enterprise 5.3
Hello all,
I am very new to forum posting and also to Linux. I am currently trying to upgrade my kernel. I have followed following procedure. I am using RedHat a. Downloaded latest kernel from kernel.org (2.6.32.3). b. Copied and extracted at /usr/src/linux-2.6.32.3/My kernel is - Linux 2.6.18-8.el5 c. Created .config using make gconfig Till this it works fine. Problem starts now and I am searching the solution from last 2 days. When I move forward to next step ‘make’ the output is as follow. [root@localhost linux-2.6.32.3]# make CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-x86 HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc HOSTCC scripts/basic/hash CC kernel/bounds.s In file included from include/linux/compiler-gcc.h:86, from include/linux/compiler.h:40, from include/linux/stddef.h:4, from include/linux/posix_types.h:4, from include/linux/types.h:14, from include/linux/page-flags.h:8, from kernel/bounds.c:9: include/linux/compiler-gcc4.h:8:4: error: #error Your version of gcc miscompiles the __weak directive make[1]: *** [kernel/bounds.s] Error 1 make: *** [prepare0] Error 2 To solve this I have Tried following: a) I have tried to upgrade gcc by using CentOS distribution. I have installed following package to upgrade gcc libgomp-4.3.2-7.el5.i386.rpm --nodeps gcc43-4.3.2-7.el5.i386.rpm gcc43-c++-4.3.2-7.el5.i386.rpm The error remain same. No change. b) Searched the new kernel rpm for redhat but they are 2.6.18 only… am I missing any concept ? O Linux Gurus Please take me out of this. |
Hi, Welcome to LQ!
LQ has a fantastic search function that may save you time waiting for an answer to a popular question. With over 3 million posts to search it's possible the answer has been given. :) Please type in a cli (shell) gcc -v This wil give the installed version of gcc. If no responce try gcc -V (upper-case) My system... Code:
glenn@GamesBox:~$ gcc -v (17-01 21:14) <edit> also check the version of glibc, this lib plays an important part of the system recompilation. Glenn. </edit> Just a comment, going from 2.6.18.x to 2.6.32.x is a big jump/leap forward. It will probably work, but I would do make oldconfig before making anything else. That way the new kernel is configured to the installed kernel before you begin configuring the new sources. Generaly, I make a static link to the kernel sources with... Code:
ln -s /usr/src/linux-2.6.32.3 /usr/src/linux This you can script/macro, as once the link is made the commands are usually the same. Code:
cd /usr/src/linux && make oldconfig && make all && make modules_install && sudo make install |
Oh, I forgot, I'm using kernel....
Code:
glenn@GamesBox:~$ uname -a (17-01 21:15) Quote:
|
The latest kernel version for RH EL 5 is :
kernel-2.6.18-164.2.1.el5 .. which is what you get by an online update. And has some backported features from later kernels incuded. If you change it to 2.6.32.3 , you no longer have Redhat Enterprise ( 5.3 ). ..... I would not expect the 2.6.32.3 to compile on RH EL 5. A "latest" OS can do it, e.g. Fedora 12, if you want to experiment. Result : a '2.6.32.3' for Fedora 12 only. ..... |
Using kernels other then official ones for CentOS/RHEL is totally stupid thing to do, since you lose ALL of the advantages of CentOS/RHEL, mostly stability. That is why (almost) nobody does it, and you will have REALLY BIG trouble to find someone to help you with that.
I , personaly, think it as a blasphemy. Just use some newer distro, do not taint CentOS/RHEL. |
Will try another way - another doubts.
Thank You all,
As per GlennsPref, I have gone through the README with the kernel source. The minimum requirement of GCC is 3.2 and I have gcc version 4.1.1 20070105. Look the following output Code:
[root@localhost linux-2.6.32.3]# gcc -v Code:
[root@localhost linux-2.6.32.3]# rpm -qa 'glib*' I have run ‘make oldconfig’. It asked me a lots and lots of questions regarding the various kernel features. I have given default answers to those (taken around 1.5 hour). But at ‘make’ command the error is as it was, error is not solved. As per the suggestions from knudfl and DrLove73, I will try to upgrade kernel-2.6.18-164.2.1.el5 today and post the result here. First I will try SRPM from redhat. But I have search and gone through following links to understand backporting. http://www.linuxquestions.org/questi...2.6.22-586547/ http://www.redhat.com/security/updat...g/?sc_cid=3093 http://surriel.com/system/files/summ...e-and-hare.pdf It has confused me more. If I want to get all the drivers and security protection that is provided with latest kernel, what should I do? Is there any way to my current kernel version with the kernel from kernel.org or any other standards? I am a student and doing experiments to make my understanding strong. Guide If I am in wrong direction. Thanks a lot again. |
Hi, as you may be aware, I am not using CentOs. But....
Linux is Linux and you should be able to hack it to some degree. I use Mandriva for this reason. Kwan has a kernel build tute here, I used to use it when starting out as a newb. No offence! Here it is, on part of the page that lists the programs you need to successfully configure and compile a kernel. It's the 2.6 section, not the older 2.4 part. ;-) http://www.digitalhermit.com/linux/K...E-REQUIREMENTS I mention this because of your error. Another thing I thought may help, is to run all the commands as root, Just for the kernel compile "make" commands. As I have found recently, I need root access to configure a kernel, where previously I could do it as a ordinary user. While searching for suitable guides, I also came across this web-site, dated 2006, May still reveal some centos secrets. so don't tell anyone, just kidding! page 1 http://www.howtoforge.com/kernel_compilation_centos page 2 http://www.howtoforge.com/kernel_compilation_centos_p2 There is a logical reason for your error, so far we haven't found it. You should be able to compile and install any kernel you want, but it may not boot. see how you go, I have not read the centos pages listed above, but if you have any questions, just ask here. Regards Glenn |
Also found right here at LQ, same error!
knudfl contributes.... http://www.linuxquestions.org/questi...ective-756114/ says to upgrade gcc to ver 4.3 also mentioned here.... http://www.linux.com/community/forum...tid=18&id=2737 Could I remind you, LQ has a fantastic search function that may save you time waiting for an answer to a popular question. :) Cheers Glenn |
# 8 , @ GlennsPref
Quote:
Like in most other Linux's, you have the choice of having multible compilers installed. ( Mandriva(2010) : 4 different.) The gcc43* packages can be found in an archive. ( el 5.3 ). Todays gcc4* is : gcc44 , gcc44-c++ , providing 4.4.0 . # yum search gcc4 .. will show, what's available. ..... |
Thanks for the response, it looks like that is the solution.
would you agree? It does not address the conflicts that may occur once booted, but as the OP said, this is an experiment. <edit> and yes, I do remember Mandy has various versions, I have a few installed, but did not know enough about it to assume it was not only Mandriva. :) </edit> cheers Glenn |
If you need all modules and drivers enabled in CentOS kernel, then use kernels from centosplus repository.
CentOS kernels from base/os and updates repositories kernels are binary compatible with Red Hat compiled kernels since all kernel patches, bugfixes and any other changes are done in upstream (Red Hat) repositories, and only suggested by CentOS development team. Centosplus repository is different story. All modules/drivers are enabled, and certain bugfixes and patches are introduced into the build. In last 3 years of use of centosplus kernels, I haven't found problems that are not found in upstream kernel so I consider them very safe. Definitely more safe then the kernel you can build by your self. |
All times are GMT -5. The time now is 12:12 AM. |