Skip to contentSkip to conversation

Problems in make

uml-devel Bodo Stroesser 2 participants 5 messages Nov 22, 2004 – Nov 24, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

If arch/um/kernel/tt/include/mode-tt.h is changed, make doesn't compile tracer.c, the resulting kernel is inconsistent and crashes!

Bodo

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 2 lines · Bodo Stroesser

If arch/um/kernel/tt/include/mode-tt.h is changed, make doesn't compile tracer.c, the resulting kernel is inconsistent and crashes!

This is true for any dependency of files listed in USER_OBJS, which is broken. This problem is known and is pending fixing (and fixing requires designing a clean and Kbuild-supported replacement of USER_OBJS). I fixed it some time ago, around 2.6.1, but the fix was not integrated because it was too invasive.

So: use always make clean ARCH=um before rebuilding (this even holds for dependencies on CONFIG_*).

If that slows you down too much, then install ccache (I'm not explaining it here because there is nothing special on ccache with kernel compilation and because there is plenty of tutorials onto the net).

Bye

Signature · 13 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#2 lore raw
Quoted 6 lines · Blaisorblade
Quoted 2 lines · Bodo Stroesser

If arch/um/kernel/tt/include/mode-tt.h is changed, make doesn't compile tracer.c, the resulting kernel is inconsistent and crashes!

Quoted 7 lines

This is true for any dependency of files listed in USER_OBJS, which is broken. This problem is known and is pending fixing (and fixing requires designing a clean and Kbuild-supported replacement of USER_OBJS). I fixed it some time ago, around 2.6.1, but the fix was not integrated because it was too invasive.

So: use always make clean ARCH=um before rebuilding (this even holds for dependencies on CONFIG_*).

If that slows you down too much, then install ccache (I'm not explaining it here because there is nothing special on ccache with kernel compilation and because there is plenty of tutorials onto the net).

Bye

As a quick solution to guarantee a correct result of the build, would it be possible to remove all USER_OBJS, when starting to build? Or, if this isn't enough, even remove all objects in the arch/um subtree?

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
Quoted 14 lines · Bodo Stroesser
Quoted 13 lines · Blaisorblade
Quoted 2 lines · Bodo Stroesser

If arch/um/kernel/tt/include/mode-tt.h is changed, make doesn't compile tracer.c, the resulting kernel is inconsistent and crashes!

This is true for any dependency of files listed in USER_OBJS, which is broken. This problem is known and is pending fixing (and fixing requires designing a clean and Kbuild-supported replacement of USER_OBJS). I fixed it some time ago, around 2.6.1, but the fix was not integrated because it was too invasive.

So: use always make clean ARCH=um before rebuilding (this even holds for dependencies on CONFIG_*).

Quoted 8 lines
Quoted 5 lines

If that slows you down too much, then install ccache (I'm not explaining it here because there is nothing special on ccache with kernel compilation and because there is plenty of tutorials onto the net).

Bye

As a quick solution to guarantee a correct result of the build, would it be possible to remove all USER_OBJS, when starting to build?

This is not a so bad idea, however if I interrupt a build with Ctrl-C and restart it without changes, it shouldn't clean all USER_OBJS.

It is not also a one-liner (can be dumbly implemented easily, but some changes).

What about adding a target like "rebuildclean" (a better name is welcome)?

However, until I don't have the time to work on this, use the solution I suggested above.

Quoted 2 lines

Or, if this isn't
enough, even remove all objects in the arch/um subtree?

We don't need to be this aggressive.

Signature · 13 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#4 lore raw
Quoted 23 lines · Blaisorblade
Quoted 19 lines · Bodo Stroesser
Quoted 17 lines · Blaisorblade
Quoted 2 lines · Bodo Stroesser

If arch/um/kernel/tt/include/mode-tt.h is changed, make doesn't compile tracer.c, the resulting kernel is inconsistent and crashes!

This is true for any dependency of files listed in USER_OBJS, which is broken. This problem is known and is pending fixing (and fixing requires designing a clean and Kbuild-supported replacement of USER_OBJS). I fixed it some time ago, around 2.6.1, but the fix was not integrated because it was too invasive.

So: use always make clean ARCH=um before rebuilding (this even holds for dependencies on CONFIG_*).

If that slows you down too much, then install ccache (I'm not explaining it here because there is nothing special on ccache with kernel compilation and because there is plenty of tutorials onto the net).

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Bye

As a quick solution to guarantee a correct result of the build, would it be possible to remove all USER_OBJS, when starting to build?

This is not a so bad idea, however if I interrupt a build with Ctrl-C and restart it without changes, it shouldn't clean all USER_OBJS.

Is this really necessary? What's the time for a complete build and what's the time for building the USER_OBJS? Would not removing the USER_OBJS enable make to build consistent kernels in all cases without being as inefficient as make clean ARCH=um? Getting consistent kernels from make IMHO has the highest priority.
Even when using ccache, after make clean the build takes some time.

Quoted 5 lines

It is not also a one-liner (can be dumbly implemented easily, but some changes).

What about adding a target like "rebuildclean" (a better name is welcome)?

Quoted 7 lines

However, until I don't have the time to work on this, use the solution I suggested above.

Quoted 1 line

Or, if this isn't enough, even remove all objects in the arch/um subtree?

We don't need to be this aggressive.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel