2001-02-02 20:58:41

by Ken Moffat

[permalink] [raw]
Subject: Every Make option ends in error.

Hi guys,
I guess I'm doing something stupid, so please can somebody point it out
and put me out of my misery ?

Copied a plain 2.4.0 tree to a new directory, patched it to 2.4.1 without
any errors. Then I realised it had all the object files from my last
compile, so I thought "make mrproper" was called for. It did a little,
then

rm: include/asm: is a directory
make: *** [mrproper] Error 1

"make clean" and "make oldconfig" stop with similar errors, "make
clean" is in "symlinks" at the time.

This piece of makefile looks to be the same as in 2.4.0, which worked.

I'm running make 3.77.

Any comments, please ?

Ken


2001-02-02 21:15:31

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Every Make option ends in error.

On Fri, 2 Feb 2001, Ken Moffat wrote:

> Hi guys,
> I guess I'm doing something stupid, so please can somebody point it out
> and put me out of my misery ?
>
> Copied a plain 2.4.0 tree to a new directory, patched it to 2.4.1 without
> any errors. Then I realised it had all the object files from my last
> compile, so I thought "make mrproper" was called for. It did a little,
> then
>
> rm: include/asm: is a directory
> make: *** [mrproper] Error 1
>
This link file got changed to a directory, probable because your
new directory was copied! You should have used `tar`. Copy will
follow the sym-links and copy the underlying data, i.e., a whole
directory.

Not to worry. In your new Linux directory tree do:

cd include
mv asm /tmp # or /usr/src, someplace temporary.

cd .. # Back to Linux
cp .config .. # Save your configuration
make mrproper # Make like a distribution
cp ../.config . # Restore configuration
make oldconfig # Re-do configuration
make dep # Re-do dependencies
make bzImage # Doit toit

After everything works, recursively delete the saved 'asm'
directory that was moved outside the kernel tree.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


2001-02-02 21:19:51

by Ken Moffat

[permalink] [raw]
Subject: Re: Every Make option ends in error.

On Fri, 2 Feb 2001, Mark Hahn wrote:

> > I guess I'm doing something stupid, so please can somebody point it out
> > and put me out of my misery ?
>
> don't use cp to copy kernel trees unless you use -s.
>
Thanks for the advice, Mark. I'll give it a go in a minute (got to log off
this box and connect the monitor to the test box). I figured that since
I've got a 1.5Gb partition for kernels, putting a third one in there
wouldn't cause any grief.
Ken

2001-02-02 21:51:21

by Ken Moffat

[permalink] [raw]
Subject: Re: Every Make option ends in error.

Dick, and Mark, thanks. It's compiling nicely now. We learn by experience.
Cheers, Ken

> Not to worry. In your new Linux directory tree do:
>
> cd include
> mv asm /tmp # or /usr/src, someplace temporary.
>
> cd .. # Back to Linux
> cp .config .. # Save your configuration
> make mrproper # Make like a distribution
> cp ../.config . # Restore configuration
> make oldconfig # Re-do configuration
> make dep # Re-do dependencies
> make bzImage # Doit toit
>
> After everything works, recursively delete the saved 'asm'
> directory that was moved outside the kernel tree.
>

2001-02-02 21:52:31

by Alan

[permalink] [raw]
Subject: Re: Every Make option ends in error.

> Copied a plain 2.4.0 tree to a new directory, patched it to 2.4.1 without
> any errors. Then I realised it had all the object files from my last
> compile, so I thought "make mrproper" was called for. It did a little,
> then

You copied the link and turned it into its contents

> rm: include/asm: is a directory
> make: *** [mrproper] Error 1

do rm -rf include/asm and then rerun the makes

2001-02-03 00:12:26

by J.A. Magallon

[permalink] [raw]
Subject: Re: Every Make option ends in error.


On 02.02 Ken Moffat wrote:
> Hi guys,
> I guess I'm doing something stupid, so please can somebody point it out
> and put me out of my misery ?
>
> Copied a plain 2.4.0 tree to a new directory, patched it to 2.4.1 without
> any errors. Then I realised it had all the object files from my last
> compile, so I thought "make mrproper" was called for. It did a little,
> then

Do a 'cp -a linux-2.4.0 linux-2.4.1', and symlinks (asm...) will not be
de-referenced.

Or even better, if you are going to patch, do a 'cp -rl', and your new
tree will not waste almost any space (hard-links all the files, so space
only is duplicated when patch changes some file - and if you remove the
old kernel tree, the space just goes to the new).

--
J.A. Magallon $> cd pub
mailto:[email protected] $> more beer

Linux werewolf 2.4.1-ac1 #2 SMP Fri Feb 2 00:19:04 CET 2001 i686

2001-02-04 06:02:48

by Rusty Russell

[permalink] [raw]
Subject: Re: Every Make option ends in error.

In message <[email protected]> you write:
> Or even better, if you are going to patch, do a 'cp -rl', and your new

ITYM cp -al, and the main benifit (for me) is that diff -urN takes ~10
seconds (cold cache), rather than minutes.

Rusty.
--
Premature optmztion is rt of all evl. --DK