LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 10-17-2006, 08:56 AM   #1
bohemistanbul
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Rep: Reputation: 0
kernel compilation on Mandriva 2006


hi all,
i couldnt compile 2.6.7 and older kernel on Mandriva 2006. is the reason that Mandriva has gcc 4.0.1.
what can i do? is there any solution for kernel compilation with gcc 4.0.1?
thanks.
 
Old 10-17-2006, 09:09 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
May I ask why you're looking to use that old of a kernel version?

Mandriva 2006 ships with 2.6.12. Also, keep in mind, that any kernel for Mandriva needs to have a few, special modules loaded into it. I don't know where you can get these modules, other than from the Mandriva 2.6.12-12mdk kernel source (which is included on the install DVD/CDs).
 
Old 10-17-2006, 09:47 AM   #3
bohemistanbul
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Original Poster
Rep: Reputation: 0
i m trying to install rtlinux. in order to install rtlinux, first of all, i have to install kernel 2.4 or 2.6.9prepatched ones. in order to compile them, i need gcc 2.95.3 otherwise $make menuconfig command does not work.
 
Old 10-18-2006, 07:29 AM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
hmmm....

I'm not saying this is the best idea, or the fastest, but I would maybe suggest installing a secondary linux distro onto another partition - an older version of a linux distro, or even Debian! I'm pretty sure Debian uses the 2.4 kernel. So, just install an older version of a distro, and then use that distro's older version of gcc.

OH, I just had another idea (I'm sorry, I just woke up ), go to the GCC download page and download an older version, and change the $PREFIX= value when installing it.

I hope this helps in some way. I'm not even fully awake yet.
 
Old 10-18-2006, 01:27 PM   #5
bohemistanbul
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Original Poster
Rep: Reputation: 0
sorry about that but i m a newbie on linux. what is $PREFIX= value and how can i change it. also is there any easy way to install gcc 2.95.3 .
thanks
 
Old 10-19-2006, 08:12 AM   #6
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
oh that's fine.
I'd never heard of rtlinux until I read this post (then I googled it).

If you download a source tarball from http://gcc.gnu.org/releases.html you will need your currently existing gcc. I'm not sure how much you know about compiling from source, but it's pretty much a four step process:
1. Download the tarball and unpackage it. If it's *.tar.gz, type "tar -zxf tarball.tar.gz. If it's *.tar.bz2, type "tar -jxf tarball.tar.bz2.
2. Inside the new folder (created from unpackaging the tarball), run
Code:
./configure
Here you can set options like PREFIX, and other pre-compilation settings.
3. Run make.
Code:
$ make
4. Now, install it.
Code:
$ make install
For a list of all pre-compile options available to you type: ./configure --help

When you set PREFIX, you are telling where to install the compiled program to. I'm saying to set this yourself so that there aren't any conflicts with your existing gcc, and so that it's easier to remove when you should no longer need it.

Personally, I like setting my prefix to /opt. (PREFIX=/opt/)
It's an unused directory - pretty much.
 
Old 10-26-2006, 03:31 PM   #7
bohemistanbul
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Original Poster
Rep: Reputation: 0
hii
sory for late,
after $make command the following error occurs.

decl.c: In function 'start_struct':
decl.c:4451: error: argument 'code' doesn't match prototype
ch-tree.h:736: error: prototype declaration
make[2]: *** [decl.o] Error 1
make[2]: Leaving directory `/home/celil/Desktop/gcc-2.95.3/gcc/ch'
make[1]: *** [cc1chill] Error 2
make[1]: Leaving directory `/home/celil/Desktop/gcc-2.95.3/gcc'
make: *** [all-gcc] Error 2


how can i handle it ?
thanks.
 
Old 10-27-2006, 06:09 AM   #8
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
do you really need RTlinux or can you do with
a multimedia kernel or some performance patches (Koliva?)
or even just tweaking kernel?
 
Old 10-27-2006, 12:43 PM   #9
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Try running make and make install as root.
 
  


Reply



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
no AGP kernel modules in Mandriva 2006?? NobeyamaGP Linux - Hardware 2 06-27-2006 07:24 PM
later kernel for Mandriva 2006 possible? turnbui Linux - Software 4 06-22-2006 11:11 AM
cdrecord problems, mandriva 2006 kernel 2.6.x psymole Linux - Software 1 06-18-2006 07:16 PM
mandriva 2006 kernel sources path pencil Mandriva 3 06-16-2006 12:13 PM
Mandriva 2006.0 need kernel 2.6.13 turnbui Linux - Software 2 06-09-2006 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 06:52 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