LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 12-18-2005, 02:59 PM   #1
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Rep: Reputation: 30
Slackware's recent gcc upgrades


I compiled my own 2.6.13 kernel a while back and recently I upgraded my gcc packages from ggc-3.3.6 to gcc-3.4.5. Today I went to upgrade my Nvidia driver from 7676 to 8174, but it kept failing due to wrong kernel sources. This had me flustered for a while because I had upgraded to 7676 after I compiled my 2.6.13 kernel with no problems and I haven't touched my kernel since, but then I figured out that I was having problems upgrading my Nvidia driver because I compiled my kernel with the older gcc version. I downgraded to gcc-3.3.6 and upgraded my Nvidia driver with no problems.

My question is, are you supposed to recompile your kernel every time you upgrade your gcc version, especially if you want to be able to compile future drivers?

Also, I compiled the new Gaim 2.0 beta last night using using gcc-3.4.5 and the kernel sources built with gcc-3.3.6 and it compiled with no problems. Why was Gaim able to compile, but not the Nvidia driver?

Thanks in advance.

LocoMojo

Last edited by LocoMojo; 12-18-2005 at 03:02 PM.
 
Old 12-18-2005, 03:57 PM   #2
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
In my experience (at least with Alsa), any modules dependent on the kernel need to be compiled with the same GCC version as the kernel (e.g. you can't build Alsa with GCC 3.4 with a kernel built using 3.3). I believe the same applies to the nVidia drivers.

On the other hand, Gaim is not directly dependent on the kernel version, so does not have this problem.
 
Old 12-18-2005, 05:02 PM   #3
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Quote:
Originally Posted by LocoMojo
I compiled my own 2.6.13 kernel a while back and recently I upgraded my gcc packages from ggc-3.3.6 to gcc-3.4.5. Today I went to upgrade my Nvidia driver from 7676 to 8174, but it kept failing due to wrong kernel sources. This had me flustered for a while because I had upgraded to 7676 after I compiled my 2.6.13 kernel with no problems and I haven't touched my kernel since, but then I figured out that I was having problems upgrading my Nvidia driver because I compiled my kernel with the older gcc version. I downgraded to gcc-3.3.6 and upgraded my Nvidia driver with no problems.

My question is, are you supposed to recompile your kernel every time you upgrade your gcc version, especially if you want to be able to compile future drivers?
If the gcc upgrade is a minor upgrade, say from 3.3.6 to 3.3.x, you would've been OK. Since this is a major upgrade, from 3.3.x to 3.4.x, you will need to recompile your kernel using the newer gcc to compile anything that goes into the kernel, such as video drivers.
Quote:
Originally Posted by LocoMojo
Also, I compiled the new Gaim 2.0 beta last night using using gcc-3.4.5 and the kernel sources built with gcc-3.3.6 and it compiled with no problems. Why was Gaim able to compile, but not the Nvidia driver?
As cathectic stated, Gaim doesn't add anything to the kernel so it would compile fine. The only programs you will have problems with are those that make "hooks" (for lack of a better term) to the kernel or to kernel modules.

HTH,
MMYoung
 
Old 12-18-2005, 07:31 PM   #4
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Cathetic and MMYoung,

Thanks to the both of you for your replies.

Makes sense that you would need to recompile your kernel for modules that are inserted into the kernel itself, but not for software that isn't part of the kernel.

I went ahead and upgraded my kernel to 2.6.14.4. I compiled it using gcc-3.4.5 then I rebuilt my Nvidia module and it worked like a charm. I also had to recompile my pwc module (for my webcam) and that's working fine too. Funny though, I didn't have to recompile my Alsa driver, I only had to redo 'alsactl store' to save my settings and it is working fine.

I never knew that you had to recompile your kernel after major gcc upgrades...learn something new everyday.

Thanks for your help.

LocoMojo
 
Old 12-18-2005, 08:19 PM   #5
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Quote:
Originally Posted by LocoMojo
Funny though, I didn't have to recompile my Alsa driver, I only had to redo 'alsactl store' to save my settings and it is working fine.
That's because ALSA is part of the kernel, so when you recompile your kernel you recompiled your ALSA drivers as well.

Later,
MMYoung
 
Old 12-18-2005, 10:38 PM   #6
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by MMYoung
That's because ALSA is part of the kernel, so when you recompile your kernel you recompiled your ALSA drivers as well.
You're right because I remember seeing the modules in .config:

Quote:
~/build/linux-2.6.14.4$ less .config | grep -i snd_emu10k1
CONFIG_SND_EMU10K1=m
CONFIG_SND_EMU10K1X=m
But now I'm confused because I also have:

Quote:
/var/log/packages$ ls alsa*
alsa-driver-1.0.10_2.4.32-i486-1 alsa-lib-1.0.10-i486-1 alsa-oss-1.0.10-i486-1 alsa-utils-1.0.10-i486-1
So what's going on here? Are you saying that when I recompiled my kernel it used the sources in the above packages to create the modules?

If so, I just learned something else new today!

One thing though, probably a very dumb question, but how did the kernel compilation know where to find the alsa sources to build the modules? I didn't specify the path to the alsa sources nor is there anything about alsa in my env.

Pkgconfig?

LocoMojo scratches his head
 
Old 12-18-2005, 10:49 PM   #7
slackb0t
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 146

Rep: Reputation: 16
I upgraded to the new gcc using slapt-get.. i would like to go back to the older version b/c I don't won't to recompile the kernel etc... and I too did not realize that the upgrade would require a new kernel...

So what is the best and easiest way to go back??
 
Old 12-19-2005, 12:57 AM   #8
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by slackb0t
I upgraded to the new gcc using slapt-get.. i would like to go back to the older version b/c I don't won't to recompile the kernel etc... and I too did not realize that the upgrade would require a new kernel...

So what is the best and easiest way to go back??
I've never used slapt-get, but if you have the old gcc packages just open up the console then:

Quote:
cd to directory containing packages
su
<password>
upgradepkg gcc-<version>.tgz
This will remove the new gcc package and replace it it with the older package. Though you are using 'upgradepkg', you are really downgrading to a lower version of gcc.

Good luck.

LocoMojo
 
Old 12-19-2005, 05:06 AM   #9
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Quote:
Originally Posted by LocoMojo
So what's going on here? Are you saying that when I recompiled my kernel it used the sources in the above packages to create the modules?
Nope, the ALSA is now included with the kernel. The "generic" kernel packages that Slackware provides do not include ALSA so Pat provides an individual package for the drivers. If you will notice the ALSA driver package actually SPECIFIES the kernel version that it is for (2.4.32) and so those drivers will ONLY work with the 2.4.32 kernel.
Quote:
Originally Posted by LocoMojo
One thing though, probably a very dumb question, but how did the kernel compilation know where to find the alsa sources to build the modules? I didn't specify the path to the alsa sources nor is there anything about alsa in my env.
No such thing as a dumb question, unless it's the one that doesn't get asked, IMHO.

The ALSA source has been included with the kernel for a while now. When you built your new kernel it compiled the modules and installed them to /lib/modules/new.kernel.number/kernel/sound/cardname. The only time you have to compile ALSA drivers individually is if a new release comes out between kernel updates, and then just if you want to or not.

Later,
MMYoung
 
Old 12-19-2005, 08:39 AM   #10
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by MMYoung
Nope, the ALSA is now included with the kernel. The "generic" kernel packages that Slackware provides do not include ALSA so Pat provides an individual package for the drivers. If you will notice the ALSA driver package actually SPECIFIES the kernel version that it is for (2.4.32) and so those drivers will ONLY work with the 2.4.32 kernel.
Teach me to pay attention to the packages, will ya?

Here I was running 2.6.X kernels with an Alsa driver package meant for 2.4.X kernels thinking I was all that and a bag of chips, heh.

Quote:
No such thing as a dumb question, unless it's the one that doesn't get asked, IMHO.
Thanks! I was real close to sulking off feeling like a total idiot. Glad you're alright with dumb questions.

Quote:
The ALSA source has been included with the kernel for a while now. When you built your new kernel it compiled the modules and installed them to /lib/modules/new.kernel.number/kernel/sound/cardname. The only time you have to compile ALSA drivers individually is if a new release comes out between kernel updates, and then just if you want to or not.
Now what about the alsa-lib, alsa-utils, and alsa-oss packages? I still need those, right?

I wonder what else I have on my system that I don't need. I need to go over my installed packages again and get rid of the ones I'm not using. I'd also like to pare down my kernel (I already did, somewhat) to reduce the kernel size and unnecessary security holes, but it's difficult to know what I need and don't need.

Am I right in thinking that unused modules don't pose any security holes? I mean, if there's a security hole with X module, but I'm not using it, then there's no security problems with that particular module? Or as long as that module is sitting around it could be used maliciously by someone with an agenda?

Am I also right in thinking that unused modules don't contribute to the kernel's resource usage? Or does the kernel scan through all the modules in its "inventory" and hold that inventory in memory somewhere?

Thanks for all your help.

LocoMojo
 
Old 12-19-2005, 06:52 PM   #11
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Quote:
Originally Posted by LocoMojo
Now what about the alsa-lib, alsa-utils, and alsa-oss packages? I still need those, right?
Yep, they're always good to have around .
Quote:
Originally Posted by LocoMojo
Am I right in thinking that unused modules don't pose any security holes? I mean, if there's a security hole with X module, but I'm not using it, then there's no security problems with that particular module? Or as long as that module is sitting around it could be used maliciously by someone with an agenda?
As far as I know, if it ain't being used it ain't a threat. I'm not sure about someone hacking into your PC and gaining access to any spare modules laying around. I suppose it *could* happen, I've learned a long time ago to never say never, but I can't really say for sure.
Quote:
Originally Posted by LocoMojo
Am I also right in thinking that unused modules don't contribute to the kernel's resource usage? Or does the kernel scan through all the modules in its "inventory" and hold that inventory in memory somewhere?
If it ain't needed then it ain't used so they don't consume memory/cpu resources, just hard drive space.

Later,
MMYoung
 
Old 12-19-2005, 07:20 PM   #12
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Rep: Reputation: 30
So in such case everything needs to get recompiled to ensure everything functions properly, right? If so, it would be tedious to do so since you may left some libraries compiled against the old one.

Correct me if I am wrong.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware's a bit ... overwhelming Mr. Hill Linux - Newbie 6 02-11-2005 04:29 AM
Slackware's FILELIST.TXT DaHammer Slackware 5 09-26-2004 04:29 AM
Slackware's beautiful fonts t2701 Slackware 2 09-04-2004 09:59 PM
Mouse in Slackware's KDE Manarius Slackware 3 11-06-2003 10:28 PM
I broke slackware's keyboard Tech1 Slackware 6 05-07-2003 06:52 AM


All times are GMT -5. The time now is 01:34 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration