LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-17-2010, 02:26 AM   #1
rrmavani
LQ Newbie
 
Registered: Jan 2010
Location: India
Distribution: ReadHet 5.3
Posts: 3

Rep: Reputation: 0
Angry 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).
My kernel is - Linux 2.6.18-8.el5
b. Copied and extracted at /usr/src/linux-2.6.32.3/
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.
 
Old 01-17-2010, 05:29 AM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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)
Using built-in specs.
Target: x86_64-manbo-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib64 --with-bugurl=https://qa.mandriva.com/ --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --build=x86_64-manbo-linux-gnu --host=x86_64-manbo-linux-gnu --with-cpu=generic --with-system-zlib --enable-threads=posix --enable-shared --enable-objc-gc --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-gtk-cairo --disable-libjava-multilib --enable-ssp --disable-libssp --disable-werror --with-ppl --with-cloog --with-python-dir=/lib/python2.6/site-packages
Thread model: posix
gcc version 4.4.2 (GCC)
glenn@GamesBox:~$                                               (17-01 21:15)
Also, read the readme in the kernel sources, it should indicate what version of gcc your system requires to rebuild the that kernel.

<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
then all directives are made to make /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
hope this helps, regards Glenn

Last edited by GlennsPref; 01-17-2010 at 11:56 PM. Reason: edit, spelling
 
Old 01-17-2010, 05:36 AM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Oh, I forgot, I'm using kernel....
Code:
glenn@GamesBox:~$ uname -a                                          (17-01 21:15)
Linux GamesBox.GlennsPref.net 2.6.31.6-1mnb_GamesBox-v=2 #1 SMP PREEMPT Sat Jan 2 15:12:41 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
glenn@GamesBox:~$
you might find the updated packages (.rpm's) here


Last edited by GlennsPref; 01-17-2010 at 05:38 AM. Reason: http://rpm.pbone.net/
 
Old 01-17-2010, 06:35 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
.....
 
Old 01-17-2010, 11:07 AM   #5
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
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.
 
Old 01-17-2010, 11:53 PM   #6
rrmavani
LQ Newbie
 
Registered: Jan 2010
Location: India
Distribution: ReadHet 5.3
Posts: 3

Original Poster
Rep: Reputation: 0
Question 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
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)
The glib version is

Code:
[root@localhost linux-2.6.32.3]# rpm -qa 'glib*'
glib2-2.12.3-2.fc6
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
glib-java-0.2.6-3.fc6
glib2-devel-2.12.3-2.fc6
glibc-2.5-12
I have made the static link at /usr/src/linux too.

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.
 
Old 01-18-2010, 12:50 AM   #7
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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
 
Old 01-18-2010, 12:58 AM   #8
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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
 
Old 01-18-2010, 03:05 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 8 , @ GlennsPref
Quote:
http://www.linuxquestions.org/questi...ective-756114/
says to upgrade gcc to ver 4.3
No, it is not an upgrade, is an extra "compat" gcc-4.3

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.
.....
 
Old 01-18-2010, 03:34 AM   #10
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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

Last edited by GlennsPref; 01-18-2010 at 03:36 AM. Reason: edit
 
Old 01-18-2010, 07:10 AM   #11
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
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.
 
  


Reply

Tags
kernel, redhat, upgrade



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
upgrade kernel on redhat enterprise rel 3 update 4 pyroman59 Linux - Newbie 5 08-20-2009 10:53 AM
Redhat Enterprise 3 upgrade to Redhat 4... B14 Linux - Enterprise 5 03-01-2007 04:29 AM
Need up upgrade kernel from 2.4 to 2.6.x.x on Redhat Enterprise 3.0 bariswheel Linux - Enterprise 1 11-06-2006 05:54 AM
Upgrade to Redhat Enterprise ES? keysorsoze Red Hat 6 01-24-2006 06:27 PM
Upgrade Redhat Enterprise from 2.1 to 3.0 btweston Linux - Newbie 3 08-31-2004 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration