[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel 2.4.x compiling in Woody traced to Makefile+bash

On Mon, Dec 03, 2001 at 01:17:01PM -0700, Josh Hansen wrote:
> I have had errors like this for a long time under testing and unstable. I am 
> forced to leave out certain parts of the kernel (such as MTD's and many SCSI 
> drivers) to get a successful compile. I have this problem coming from a 
> totally clean source, straight out of the tarball. GCC version is 2.95.4 
> 20011006 (Debian prerelease). Kernels this has happened with include (I 
> think) 2.4.14, 2.4.15, 2.4.16, 2.5.1-pre4

OK everyone, thanks for the help; I think I've got it.  The
biggest help was actually "I have been compiling under Woody for
some time, it has to be something about your setup."  That gave
me the inspiration to look very deep.

For the record, I am working from the 2.4.16 sources.

The error is in the way the standard Makefile interacts with
bash, and it occurs in the symlinks rule:

        rm -f include/asm
        ( cd include ; ln -sf asm-$(ARCH) asm)
        @if [ ! -d include/linux/modules ]; then \
                mkdir include/linux/modules; \

The problem is, if you run /bin/sh (which is a symlink to bash),
then the command
	( cd include ; echo ln -sf asm-$(ARCH) asm)
fails with an error:
  sh: cd: include: No such file or directory
If you run bash as "bash" that kind of thing works fine.

So the include/asm link is never created.  This missing link
would seem to be the cause of my problems under most of the
situations I described.  After fixing this, I was able to build
my kernel without problem.

Now, I'm not a shell expert.  Does the Makefile need a bug
report, or does bash?

Don Bindner <dbindner@truman.edu>

Reply to: