Jose Alburquerque
2005-Jul-05 23:50 UTC
[CentOS] Compiling kernel 2.6.12.2 with gcc-3.4.3-22.1
Hi. I just have a quick question that maybe some of you might know. I'm thinking of compiling a new kernel (kernel 2.6.12.2) for my system which is running CentOS 4 (updated to 4.1 using yum). I downloaded the kernel tarball and read in the docs that for stability gcc 2.95.x (x>=3) might be best to compile the new kernel. With an "rpm -q gcc" command I see that I have gcc-3.4.3-22.1 installed on my box. Can anyone tell me if the kernel I'm trying to compile will compile fine using the version I have installed? Should I "downgrade" my gcc to 2.95 to compile this kernel? The reason I'm trying to compile an new kernel is that my system uses a LSI Logic/Symbios Logic 53c875 SCSI controller (information obtained from "System Tools/Hardware Browser" menu in GNOME) and I keep getting a bunch of errors like the following in my system logs: sym0:0:0:phase change 6-7 11 at 12856b84 resid=2. I read somewhere that by compiling a new kernel (2.6.11, I think), this problem might go away and I wanted my system to run as efficiently so decided to compile a new kernel. Am I doing the right thing? Thanks! Sincerely Jose
Aleksandar Milivojevic
2005-Jul-06 03:19 UTC
[CentOS] Compiling kernel 2.6.12.2 with gcc-3.4.3-22.1
Jose Alburquerque wrote:> Hi. I just have a quick question that maybe some of you might know. > I'm thinking of compiling a new kernel (kernel 2.6.12.2) for my system > which is running CentOS 4 (updated to 4.1 using yum). I downloaded the > kernel tarball and read in the docs that for stability gcc 2.95.x (x>=3) > might be best to compile the new kernel. With an "rpm -q gcc" command I > see that I have gcc-3.4.3-22.1 installed on my box. Can anyone tell me > if the kernel I'm trying to compile will compile fine using the version > I have installed? Should I "downgrade" my gcc to 2.95 to compile this > kernel? > > The reason I'm trying to compile an new kernel is that my system uses a > LSI Logic/Symbios Logic 53c875 SCSI controller (information obtained > from "System Tools/Hardware Browser" menu in GNOME) and I keep getting a > bunch of errors like the following in my system logs: > > sym0:0:0:phase change 6-7 11 at 12856b84 resid=2. > > I read somewhere that by compiling a new kernel (2.6.11, I think), this > problem might go away and I wanted my system to run as efficiently so > decided to compile a new kernel. Am I doing the right thing? Thanks!The recomendation for the compiler is rather old, from the times linux kernel developers and gcc compiler developers had somewhat conflictig views on some features of C programming language. Don't remember exactly what it was about, but discussion between them looked rather childish. As far as I know, this is not an issue anymore, the new kernel should compile and run just fine even if you use 3.4.x gcc. I don't think anybody is using gcc 2.xx anymore, and the very kernel you are now running is compiled with gcc 3.4.x.
Bryan J. Smith <b.j.smith@ieee.org>
2005-Jul-06 15:08 UTC
[CentOS] Re: Compiling kernel 2.6.12.2 with gcc-3.4.3-22.1
From: Jose Alburquerque <jaalburquerque at cox.net>> Sorry, I'm not very experienced and didn't know exactly where to turn > to compile a new kernel.Well hold on. ;-> If there is one area where Fedora Core (FC) and Red Hat Enterprise Linux (RHEL) _really_ differ, it's the kernel. So you _might_ run into issues with rebuilding that on RHEL/CentOS 4, especially since Fedora Development is currently targeting FC 5 -- 2 revisions (~12 months) ahead of where RHEL/CentOS 4 is at. That's why I was wondering if there is a "Development" kernel more for RHEL/CentOS than Fedora Development. I have used the Fedora Development kernels on RHEL/CentOS in the past, but typically only on desktops or systems under test.> Thanks for the link! I'd much rather have an rpm than compiling > directly from source!Well, it's really more than just that. It's all the patches and other fixes Red Hat adds. As much as Red Hat is trying to use the vanilla kernel in Fedora Core as of kernel 2.6, there are still a number of patches, tweaks, etc... that still go in. If I need to modify anything, unpackage the RPMBUILD/SPEC environment, create a formal patch and "rpmbuild -bb kernel-2.6.spec" directly. But I typically and rarely have to do that, and it's a matter of "rpmbuild --rebuild --target=i686|x86_64 kernel-2.6*.src.rpm" directly. -- Bryan J. Smith mailto:b.j.smith at ieee.org