LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-04-2005, 04:33 AM   #1
kewlemer
LQ Newbie
 
Registered: Apr 2005
Location: Los Angeles, CA
Posts: 20

Rep: Reputation: 0
Downgrading gcc


Folks,

I am trying to downgrade gcc to 3.2.2 from 3.4 since I have to comiple a 2.4 kernel for some application I am testing.

Unfortunately, this is proving to be extremely painful. Here is the probllem:

I tried installing gcc from .rpm and .src.rpm, without any success. I then tried building gcc from the sources. Some of the links I used were:-

[Please note that I have stripped off the URLs' h t t p : / / w w w since I am a new member and this site would not let me post URLs]

.tellurian.com.au/whitepapers/multiplegcc.php
This is pretty much what I did.

gcc.gnu.org/faq.html#multiple
faqs.org/docs/Linux-HOWTO/GCC-HOWTO.html

When I finally had a 3.2.2 gcc running, I tried doing the bzImage and these errors came up :-


Code:
.
.
.gmake[2]: Entering directory `/usr/src/linux-2.4.21/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno
-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686
 -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched  -fno-omit-frame-pointer -c -o sched.o sch
ed.c
In file included from /usr/src/linux-2.4.21/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.21/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.21/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.21/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.21/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.21/include/linux/mm.h:4,
                 from sched.c:23:
/usr/src/linux-2.4.21/include/linux/kernel.h:10:20: stdarg.h: No such file
In file included from /usr/src/linux-2.4.21/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.21/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.21/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.21/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.21/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.21/include/linux/mm.h:4,
                 from sched.c:23:
/usr/src/linux-2.4.21/include/linux/kernel.h:74: parse error before "va_lis
/usr/src/linux-2.4.21/include/linux/kernel.h:74: warning: function declarat
/usr/src/linux-2.4.21/include/linux/kernel.h:77: parse error before "va_lis
/usr/src/linux-2.4.21/include/linux/kernel.h:77: warning: function declarat
/usr/src/linux-2.4.21/include/linux/kernel.h:81: parse error before "va_lis
/usr/src/linux-2.4.21/include/linux/kernel.h:81: warning: function declarat
gmake[2]: *** [sched.o] Error 1
gmake[2]: Leaving directory `/usr/src/linux-2.4.21/kernel'
gmake[1]: *** [first_rule] Error 2
gmake[1]: Leaving directory `/usr/src/linux-2.4.21/kernel'
gmake: *** [_dir_kernel] Error 2
[root@postel linux-2.4.21]#
Googling on this I found:
linux.derkeiler.com/Mailing-Lists/Kernel/2004-03/5707.html
linux.derkeiler.com/Newsgroups/comp.os.linux.development.system/2003-10/0304.html

This indicates that the problem may still be with gcc.

Since I used the --prefix for gcc compilation, I figured the problem may be the one specified in :-
gcc.gnu.org/faq.html
and in particular, "How to install multiple versions of GCC". This also says the solution would be:-
gcc.gnu.org/faq.html#gas

I have no clue what this is saying and I hope you guys can shed some light on it.

Thanks,
Kewlemer
 
Old 04-04-2005, 10:50 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
stdarg.h is a standard c header and should come with you glibc install ( some distro's split this package (glibc-devel)).

For downgrading gcc, you shouldn't as there are alot easier ways than what you just did. not to mention if you downgraded g++ and it's associated libs, anything c++ related on your system probably doesn't work anymore. The easiest way ( this is my opinion, and there is multiple ways to do this) is to get the source for the older gcc, configure it with a prefix of something like /opt/gcc-3 or whatever ( dont forget to configure it correctly - gcc is NOT a ./configure, make, make install) and either set CC or PATH to pick up the new compiler when you want to use it instead of your system supplied compiler.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
downgrading gcc and other libraries on FC3 kernelnayyer Fedora 1 02-14-2005 09:49 PM
what happen on downgrading gcc vijaysh Debian 1 01-01-2005 01:12 PM
Downgrading from 3.3 to 3.2 Niumex Linux - Distributions 0 09-02-2004 04:00 PM
downgrading gcc, gentoo cheater1034 Linux - Software 4 08-07-2004 07:05 AM
Downgrading MamaDoll Linux - General 1 04-11-2003 04:17 PM


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