LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Kernel compile problems (https://www.linuxquestions.org/questions/fedora-35/kernel-compile-problems-430060/)

halfwit 03-30-2006 11:40 AM

Kernel compile problems
 
This is starting to drive me nuts. I have a newly installed FC4 laptop. I have the kernel upgraded to 2.6.15 via yum. I also have the kernel devel packages installed. I copied the config file from /boot and into /usr/src/..../.config and ran make xconfig to make the one change I needed.

My problem is that when I attempt to compile my kernel here is what I get:
[root@machineA 2.6.15-1.1833_FC4-i686]# make bzImage
CHK include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.o
scripts/genksyms/lex.c:546:5: warning: "YY_STACK_USED" is not defined
scripts/genksyms/lex.c:1424:5: warning: "YY_ALWAYS_INTERACTIVE" is not defined
scripts/genksyms/lex.c:1427:5: warning: "YY_NEVER_INTERACTIVE" is not defined
scripts/genksyms/lex.c:1718:5: warning: "YY_MAIN" is not defined
HOSTCC scripts/genksyms/parse.o
/usr/lib/bison.simple:164:5: warning: "YYMAXDEPTH" is not defined
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'. Stop.
make: *** [init] Error 2


Any idea what I'm supposed to do about that? I had the same problem with FC3 on this laptop and another older laptop... So I don't think it is anything specific to this machine. I'm using the one that is "supposed" to go with my kernel.

I'm not new to linux and I have built a number of kernels, so I'm sure it is something either new to the 2.6 kernels or stupid that I'm missing.

Any help is appreciated.

Thanks.

gilead 03-30-2006 01:06 PM

I haven't seen that particular error, but if you've copied over your old .config file you should run make oldconfig before you run make xconfig to make sure that any new settings in the file are generated.

halfwit 03-30-2006 03:37 PM

I'm currently running 2.6.15 and trying to compile a new 2.6.15 kernel. I didn't think I had to run the make oldconfig. Please correct me if I'm wrong.

gilead 03-30-2006 04:47 PM

If we were talking about kernel sources downloaded from kernel.org I'd say you were right about not needing to run make oldconfig when you're just changing settings and not actually upgrading the kernel.

I don't know what Fedora does to a standard source tree - is there a readme file that comes with the Fedora sources?

halfwit 03-30-2006 08:34 PM

There could very well be one, but I don't see it. And I unfortunately don't know the answer to your other question about what (if anything) they did to the source tree.

I'm more or less throwing this out there to see what people know and to get suggestions on what could be causing this.

I guess I should try the kernel sources from kernel.org as a starting place.

I also noticed that my server is showing the same symptoms. It never used to do this, but I have not tried to compile the kernel since the days of FC2... a year or so ago. I don't even remember if that was successful or if I'm just making that up all together.

Lenard 03-30-2006 10:03 PM

Hmmmm.....

As a suggestion, start again (make mrproper) this time do not copy the config file from /boot go directly to make xconfig (it should "pull" the working config file for you) and make your change(s).

Ever since the 2.6.1 vanilla kernel came out I quit using make bzIamage, I'm now used to doing 'make -j2'. This takes the place of both 'make bzImage' and 'make modules', as a suggestion (also) try it.

halfwit 03-31-2006 06:38 AM

Here is what I get with a make mrproper command (it doesn't seem right to me):

[root@machineA 2.6.15-1.1831_FC4smp-i686]# make mrproper
scripts/Makefile.clean:17: /usr/src/kernels/2.6.15-1.1831_FC4-smp-i686/drivers/infiniband/ulp/srp/Makefile: No such file or directory
make[3]: *** No rule to make target `/usr/src/kernels/2.6.15-1.1831_FC4-smp-i686/drivers/infiniband/ulp/srp/Makefile'. Stop.
make[2]: *** [drivers/infiniband/ulp/srp] Error 2
make[1]: *** [drivers/infiniband] Error 2
make: *** [_clean_drivers] Error 2

The only thing I can think of is that I'm missing some essential package. I'll try out the kernel.org package today to see if that is any different.

I'm so supprised with how much I get this problem that no one else has seen this. I didn't even find anything in a google search.

halfwit 03-31-2006 06:41 AM

Off topic: How do I change the "newbie" label under my name? I can only assume that is newbie to this site as opposed to newbie to Linux.

Lenard 03-31-2006 07:56 AM

Keep posting!!! Try and help others wherever possible, yes the newbie is a reflection on how much you have participated on this site.

Check which gcc packages are installed, you might be missing one or more needed;

rpm -qa --queryformat="%{n}-%{v}-%{r}.%{arch}.rpm\n" '*gcc*' | sort

halfwit 03-31-2006 10:45 AM

Maybe I just don't know what I'm doing or what I have installed... I downloaded the kernel from kernel.org and that started to compile just fine. I did a du -hs on the 2 kernel directories and fedora's directory was 73M where kernel.org's version was 441M. Maybe all I have are headers. The package does say kernel-devel...

I guess I'll cut my losses and do the kernel.org version, keep my noobie status, and find a manual to RTFM... I did find something talking about building from /usr/src/redhat/BUILD instead of the /usr/src/kernels/... directories.

Regardless, I guess I found enough of my answer to stop bothering the people who know what they are doing.

Thanks for all your help.

:newbie:

gilead 03-31-2006 01:20 PM

It's been a while since I compiled a kernel under Fedora, but it may be that you need the src.rpm from http://download.fedora.redhat.com/pu...33_FC4.src.rpm.

The00Dustin 04-12-2006 02:21 PM

I had the same problem with CentOS 4.3. It turns out that gilead was right, at least in my case. I found my answer at this forum:
http://www.centos.org/modules/newbb/...#forumpost1318
I found a tarball of the source I wanted and went on to greater errors. If you're still having trouble, it may well be that your kernel-devel doesn't provide everything necessary to build the kernel...


All times are GMT -5. The time now is 05:14 PM.