[CentOS] recompiling kernel results in error: .../linux-2.6.18.i686/arch//Makefile: No such file or directory

Mon May 21 18:42:03 UTC 2007
Akemi Yagi <amyagi at gmail.com>

On 5/21/07, Akemi Yagi <amyagi at gmail.com> wrote:
> On 5/21/07, dcw <dwoody1 at charter.net> wrote:
> > When I use the i386 the compile continues.
> > However, I had to edit the SOURCE config file after running make xconfig.
> > That command altered the first line of the config file.

> Yes, I was about to say the same thing.  In fact, the arch name (i386)
> gets deleted twice.  First, when rpmbuild -bp is run.  But this is not
> a problem by itself, because in the next step .config is copied from
> SOURCE which has the correct first line.  Then the second time is when
> make menuconfig (or xconfig) is run as you noted.  This is the
> problem.  At this point, arch needs to be added back manually to
> .config as just you did.
>
> I really want to why menuconfig does not do it right.

I have done a bit of a search regarding this issue.  Turns out the
same problem was reported as early as Feb 2005 on a Fedora list.  So
this is not something new, nor CentOS specific. Bad news is that I
have yet to find an answer for this.  The only thing I saw in the
search was the same manual editing of .config as we already did as a
temporary solution.

http://linux.derkeiler.com/Mailing-Lists/Fedora/2005-05/0405.html

I am still trying to figure out why rpmbuild -bp messes up the first
line of .config.  And of course this problem never surfaces if you run
rpmbuild -ba in the beginning because the incorrect version of .config
is created but *not* used in this operation.

Akemi