Fedora Linux Support Community & Resources Center
  #1  
Old 16th June 2004, 06:00 AM
flaviusc Offline
Registered User
 
Join Date: Apr 2004
Location: Germany, Karlsruhe
Age: 35
Posts: 19
gcc version and kernel compilation problems

OK, I have to compile a 2.4.22 patched kernel but I get some errors. According to the patch maintainer the problem is generated by my compiler. I use Fedora Core 1 and the gcc version in it (after updates) is 3.3.2. In order to compile successful I must use gcc 2.96. So, I have installed compat-gcc and now I have gcc 2.96 in /usr/bin/gcc296.

The question is: how do I tell make to use this compiler???

This are the things that I have tried:

1.Before compilation I did:
#CC=gcc296
#export CC
#CXX=g++296
#export CXX
Then I followed the normal kernel compilation procedure but this did not helped.

2.I've tried passing CC=gcc296 to make, like “make CC=gcc296 bzImage” instead of “make bzImage”. No luck.

3.This one is inspired from an Oracle Application Server installation on Fedora Core 1. Basically I have renamed gcc and g++ to gcc332 and g++332 and made symbolic links to gcc296 and g++296
#mv /usr/bin/gcc /usr/bin/gcc332
#mv /usr/bin/g++ /usr/bin/g++332
#ln -s /usr/bin/gcc296 /usr/bin/gcc
#ln -s /usr/bin/g++296 /usr/bin/g++
Then a normal kernel compilation. But this does not help either.

I am stuck here and I would appreciate any help, hints or links that would help me solve the problem.
Reply With Quote
  #2  
Old 22nd June 2004, 11:12 PM
flaviusc Offline
Registered User
 
Join Date: Apr 2004
Location: Germany, Karlsruhe
Age: 35
Posts: 19
Lightbulb

Problem solved.

It was not the compiler but some of my configuration options. :o

The 3 methods of specifying another gcc compiler are correct according to the feedback received from the fedora-list.
Reply With Quote
  #3  
Old 11th August 2005, 10:04 AM
arurank Offline
Registered User
 
Join Date: Jun 2005
Posts: 18
2.2.26 kernel help

I went through your thread and I also have a similar kind of problem. Only thing is you have solved it and I don't.

I have a Fedora Core 1 2.4.22 kernel runing...

I want to install 2.2.26 kernel for testing purpose of my modem drivers. So as you said I downloaded the combat files and installed them. Then I gave following commands in terminal
#CC=gcc296
#export CC
#CXX=g++296
#export CXX

The make config command went ok, but I couldn't find the .config file where it is suppose to..
make dep..went smoothly.
make bzImage and make zImage gave me following error message...

[root@localhost linux-2.2.26]# make zImage
cc -D__KERNEL__ -I/usr/src/linux-2.2.26/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -c -o init/main.o init/main.c
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
In file included from /usr/src/linux-2.2.26/include/linux/string.h:37,
from /usr/src/linux-2.2.26/include/linux/signal.h:64,
from /usr/src/linux-2.2.26/include/linux/sched.h:23,
from /usr/src/linux-2.2.26/include/linux/mm.h:4,
from /usr/src/linux-2.2.26/include/linux/slab.h:14,
from /usr/src/linux-2.2.26/include/linux/malloc.h:4,
from /usr/src/linux-2.2.26/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.2.26/include/asm/string.h:476:17: missing terminating " character
In file included from /usr/src/linux-2.2.26/include/linux/string.h:37,
from /usr/src/linux-2.2.26/include/linux/signal.h:64,
from /usr/src/linux-2.2.26/include/linux/sched.h:23,
from /usr/src/linux-2.2.26/include/linux/mm.h:4,
from /usr/src/linux-2.2.26/include/linux/slab.h:14,
from /usr/src/linux-2.2.26/include/linux/malloc.h:4,
from /usr/src/linux-2.2.26/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.2.26/include/asm/string.h: In function `memscan':
/usr/src/linux-2.2.26/include/asm/string.h:477: error: syntax error before "repnz"
/usr/src/linux-2.2.26/include/asm/string.h:478: error: `scasb' undeclared (first use in this function)
/usr/src/linux-2.2.26/include/asm/string.h:478: error: (Each undeclared identifier is reported only once
/usr/src/linux-2.2.26/include/asm/string.h:478: error: for each function it appears in.)
/usr/src/linux-2.2.26/include/asm/string.h:478:21: invalid suffix "f" on integer constant
/usr/src/linux-2.2.26/include/asm/string.h:480:17: missing terminating " character
In file included from /usr/src/linux-2.2.26/include/linux/sched.h:23,
from /usr/src/linux-2.2.26/include/linux/mm.h:4,
from /usr/src/linux-2.2.26/include/linux/slab.h:14,
from /usr/src/linux-2.2.26/include/linux/malloc.h:4,
from /usr/src/linux-2.2.26/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.2.26/include/linux/signal.h: In function `siginitset':
/usr/src/linux-2.2.26/include/linux/signal.h:193: warning: deprecated use of label at end of compound statement
/usr/src/linux-2.2.26/include/linux/signal.h: In function `siginitsetinv':
/usr/src/linux-2.2.26/include/linux/signal.h:205: warning: deprecated use of label at end of compound statement
In file included from /usr/src/linux-2.2.26/include/linux/blkdev.h:6,
from /usr/src/linux-2.2.26/include/linux/blk.h:4,
from init/main.c:23:
/usr/src/linux-2.2.26/include/linux/genhd.h: In function `ptype':
/usr/src/linux-2.2.26/include/linux/genhd.h:83: warning: deprecated use of label at end of compound statement
init/main.c:251:8: warning: extra tokens at end of #endif directive
init/main.c:255:8: warning: extra tokens at end of #endif directive
init/main.c:258:8: warning: extra tokens at end of #endif directive
init/main.c:261:8: warning: extra tokens at end of #endif directive
init/main.c:264:8: warning: extra tokens at end of #endif directive
init/main.c:267:8: warning: extra tokens at end of #endif directive
init/main.c:270:8: warning: extra tokens at end of #endif directive
init/main.c:273:8: warning: extra tokens at end of #endif directive
init/main.c:276:8: warning: extra tokens at end of #endif directive
init/main.c:279:8: warning: extra tokens at end of #endif directive
init/main.c:282:8: warning: extra tokens at end of #endif directive
init/main.c:285:8: warning: extra tokens at end of #endif directive
init/main.c:294:8: warning: extra tokens at end of #endif directive
init/main.c:892:8: warning: extra tokens at end of #endif directive
init/main.c:895:8: warning: extra tokens at end of #endif directive
init/main.c:898:8: warning: extra tokens at end of #endif directive
init/main.c:901:8: warning: extra tokens at end of #endif directive
init/main.c:904:8: warning: extra tokens at end of #endif directive
init/main.c:907:8: warning: extra tokens at end of #endif directive
init/main.c:910:8: warning: extra tokens at end of #endif directive
init/main.c:913:8: warning: extra tokens at end of #endif directive
init/main.c:916:8: warning: extra tokens at end of #endif directive
init/main.c:919:8: warning: extra tokens at end of #endif directive
init/main.c:922:8: warning: extra tokens at end of #endif directive
make: *** [init/main.o] Error 1


Can You please help me. I would appreciate what are the procedures step by step you followed to make this work

thanking you
aruran
Reply With Quote
  #4  
Old 11th August 2005, 01:35 PM
flaviusc Offline
Registered User
 
Join Date: Apr 2004
Location: Germany, Karlsruhe
Age: 35
Posts: 19
My problem was due to incompatibilities between several options that I have selected during configuration stage for my kernel. The solution was to identify the options that lead to compilation error. Basically I did the flowing:
1. Download kernel from kernel.org and compile it.
2. Apply patch on kernel and compile it again.
3. Change some options and compile again.
4. Repeat 3 until I get compilation errors or I have my desired configuration.
As I was able to find out this way it had nothing to do with gcc version.
Reply With Quote
  #5  
Old 12th August 2005, 10:08 AM
arurank Offline
Registered User
 
Join Date: Jun 2005
Posts: 18
Are you saying that after installing the combat files it takes care of all the compilation problems. Only in the configuration process you have to change...If so what are the important options I have to consider..if you could remember.

after make config, I couldn't find the .config file anywhere ?
I downloaded only one patch which was available in kernel.org along with the 2.2.26 kernel. How to apply the patch.

Since you had successfully compiled it can you please let me know the steps you followed. It would be a great help.

thanks
aruran
Reply With Quote
  #6  
Old 12th August 2005, 12:08 PM
flaviusc Offline
Registered User
 
Join Date: Apr 2004
Location: Germany, Karlsruhe
Age: 35
Posts: 19
Quote:
Originally Posted by arurank
Are you saying that after installing the combat files it takes care of all the compilation problems.
No, I am saying that there was NO connection between the errors and the gcc version that I used in order to compile the kernel.
Quote:
Originally Posted by arurank
after make config, I couldn't find the .config file anywhere ?
Is this a statement or a question?
Quote:
Originally Posted by arurank
I downloaded only one patch which was available in kernel.org along with the 2.2.26 kernel. How to apply the patch.
Again, is this a statement or a question?
Quote:
Originally Posted by arurank
Since you had successfully compiled it can you please let me know the steps you followed. It would be a great help.
arurank, I recommend you to get your hands on a spare machine, that no one else uses or needs, backup all data that you may need from it and the have a lot of fun compiling the kernel. It took me a few days until I had a usable kernel (no USB, no sound), so be prepared to spend some time on this. For help on compiling the kernel have a look at http://www.digitalhermit.com/linux/K...ild-HOWTO.html I can't give you myself more details than what you'll find in the HOWTO.

Good luck!
Reply With Quote
  #7  
Old 13th August 2005, 07:37 AM
arurank Offline
Registered User
 
Join Date: Jun 2005
Posts: 18
I am sorry, Now I get it that you went through another problem. I just wanted to know

whether the problem is similar to mine. I have posted the make bzImage output in post#3
I thought you faced the same problem.

I also emailed this to fedora-list@redhat.com They seems to ignore it since FC1 has

become a legacy I think. And I went throgh the procedures told in Kernel-howto document.

They seems to work well for 2.6 and 2.4 kernels but not for the 2.2.26 kernel.
Reply With Quote
  #8  
Old 16th August 2005, 04:49 PM
arurank Offline
Registered User
 
Join Date: Jun 2005
Posts: 18
Hai...

Did you install the 2.2.26 kernel on FC1
If yes then did you just install the gcc combat files and changed the cc directive in Makefile to gcc296 ?

Is that all what you did. And then compiled successfully ?
Reply With Quote
  #9  
Old 17th August 2005, 08:59 AM
flaviusc Offline
Registered User
 
Join Date: Apr 2004
Location: Germany, Karlsruhe
Age: 35
Posts: 19
arurank,

please read once again my posts from this thread. As far as i remember there isn't anything else that I haven't already written. This is all the help you're going to get from me, because this is all I know and remember about kernel compilation.
Reply With Quote
Reply

Tags
compilation, gcc, kernel, problems, version

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel-devel package with version between the fedora and update repo version Cajga Installation and Live Media 2 13th September 2009 06:46 PM
Intel Modem Driver compilation problems & FC4 2.6.11 kernel RAGM Using Fedora 1 30th July 2005 08:03 PM
Intel Modem Driver compilation problems & FC4 2.6.11 kernel RAGM Programming & Packaging 1 30th July 2005 08:03 PM
Intel Modem Driver compilation problems & FC4 2.6.11 kernel RAGM Hardware & Laptops 0 30th July 2005 05:28 AM


Current GMT-time: 23:58 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat