Silent failure when missing bc
Hi,
A dependency on bc was added at some point during the 3.9 development.
My machines runs a git forest which contains both stable and Torvalds mainline. So any kernel version is only a:
git fetch --all && git checkout <tag> away
When switching from v3.8.5 to v3.9-rc7 i ran in to a odd thing.
It seemed to build fine, make install and modules_install was all fine as well but rebooting revealed that 3.8.5 had been installed again instead.
Doing make clean and rebuilding revealed that I was missing bc ;)
I have tried to find exactly where it's run since then, i have found the cmd_bc section but not found what triggers it... Due to lack of time and energy, I hearby report this bug!
This is about as far as i got:
kernel/Makefile:135:quiet_cmd_bc = BC $@
kernel/Makefile:136: cmd_bc = bc -q $(filter-out FORCE,$^) > $@
Is there any detaled information and or instructions on kbuild btw?
Quoted 6 lines · Ian Kumlien
Hi,
A dependency on bc was added at some point during the 3.9 development.
My machines runs a git forest which contains both stable and Torvalds mainline. So any kernel version is only a:
Quoted 8 lines
git fetch --all && git checkout <tag> awayWhen switching from v3.8.5 to v3.9-rc7 i ran in to a odd thing.
It seemed to build fine, make install and
modules_installwas all fine as well but rebooting revealed that 3.8.5 had been installed again instead.
Are you *sure* that the build didn't stop and you just didn't notice it?
That is what the above sounds like. Keep in mind that in a parallel
build there can be quite a few lines of output after the *** failure line...
Quoted 6 lines
Doing make clean and rebuilding revealed that I was missing bc ;)
I have tried to find exactly where it's run since then, i have found the
cmd_bcsection but not found what triggers it... Due to lack of time and energy, I hearby report this bug!
Quoted 6 lines
This is about as far as i got:
kernel/Makefile:135:quiet_cmd_bc = BC $@
kernel/Makefile:136:cmd_bc= bc -q $(filter-out FORCE,$^) > $@Is there any detaled information and or instructions on kbuild btw?
The disconcerting thing here, of course, is if the build would have looked like it completed without the file actually being generated. It should have failed either to generate the file, or it should have produced an empty header which would have caused a failure further down the line...
-hpa
Quoted 11 lines · H. Peter Anvin
Quoted 10 lines · Ian Kumlien
Hi,
A dependency on bc was added at some point during the 3.9 development.
My machines runs a git forest which contains both stable and Torvalds mainline. So any kernel version is only a:
git fetch --all && git checkout <tag> awayWhen switching from v3.8.5 to v3.9-rc7 i ran in to a odd thing.
Quoted 7 lines
Quoted 3 lines
It seemed to build fine, make install and
modules_installwas all fine as well but rebooting revealed that 3.8.5 had been installed again instead.Are you *sure* that the build didn't stop and you just didn't notice it?
That is what the above sounds like. Keep in mind that in a parallel
build there can be quite a few lines of output after the *** failure line...
Damn it, i didn't see it in the 30+ line window, but yes there is a error message.
Must have been more tired than i thought...
Quoted 10 lines
Quoted 10 lines
Doing make clean and rebuilding revealed that I was missing bc ;)
I have tried to find exactly where it's run since then, i have found the
cmd_bcsection but not found what triggers it... Due to lack of time and energy, I hearby report this bug!This is about as far as i got:
kernel/Makefile:135:quiet_cmd_bc = BC $@
kernel/Makefile:136:cmd_bc= bc -q $(filter-out FORCE,$^) > $@
Quoted 7 lines
Quoted 1 line
Is there any detaled information and or instructions on kbuild btw?
The disconcerting thing here, of course, is if the build would have looked like it completed without the file actually being generated. It should have failed either to generate the file, or it should have produced an empty header which would have caused a failure further down the line...
Imho it should have had bc as a dependency and failed to run that step.
Ie instead of "/bin/sh: bc: command not found"
Do we know which tools we need? could we add them as "make dependencies"?
Quoted 2 lines
-hpa
Sorry, that is not how it works with external tools. The point still holds: the job should have failed and make would have stopped.
Quoted 62 lines · Ian Kumlien
Quoted 4 lines · H. Peter Anvin
Quoted 3 lines · Ian Kumlien
Hi,
A dependency on bc was added at some point during the 3.9
development.
Quoted 2 lines
Quoted 2 lines
My machines runs a git forest which contains both stable and
Torvalds
Quoted 6 lines
Quoted 6 lines
mainline. So any kernel version is only a:
git fetch --all && git checkout <tag> awayWhen switching from v3.8.5 to v3.9-rc7 i ran in to a odd thing.
It seemed to build fine, make install and
modules_installwas allfine
Quoted 4 lines
Quoted 2 lines
as well but rebooting revealed that 3.8.5 had been installed again instead.
Are you *sure* that the build didn't stop and you just didn't notice
it?
Quoted 2 lines
That is what the above sounds like. Keep in mind that in a parallel
build there can be quite a few lines of output after the *** failureline...
Damn it, i didn't see it in the 30+ line window, but yes there is a error message.
Must have been more tired than i thought...
Quoted 3 lines
Quoted 3 lines
Doing make clean and rebuilding revealed that I was missing bc ;)
I have tried to find exactly where it's run since then, i have
found the
Quoted 1 line
Quoted 1 line
cmd_bcsection but not found what triggers it... Due to lack oftime and
Quoted 5 lines
Quoted 5 lines
energy, I hearby report this bug!
This is about as far as i got:
kernel/Makefile:135:quiet_cmd_bc = BC $@
kernel/Makefile:136:cmd_bc= bc -q $(filter-out FORCE,$^) >$@
Quoted 5 lines
Quoted 2 lines
Is there any detaled information and or instructions on kbuild btw?
The disconcerting thing here, of course, is if the build would have looked like it completed without the file actually being generated.
It
Quoted 2 lines
should have failed either to generate the file, or it should have produced an empty header which would have caused a failure further
down
Quoted 1 line
the line...
Imho it should have had bc as a dependency and failed to run that step.
Ie instead of "
/bin/sh: bc: command not found"Do we know which tools we need? could we add them as "make dependencies"?
Quoted 2 lines
-hpa
Signature · 1 line
Sent from my mobile phone. Please excuse brevity and lack of formatting.
Quoted 16 lines · Ian Kumlien
Hi,
A dependency on bc was added at some point during the 3.9 development.
My machines runs a git forest which contains both stable and Torvalds mainline. So any kernel version is only a:
git fetch --all && git checkout <tag> awayWhen switching from v3.8.5 to v3.9-rc7 i ran in to a odd thing.
It seemed to build fine, make install and
modules_installwas all fine as well but rebooting revealed that 3.8.5 had been installed again instead.Doing make clean and rebuilding revealed that I was missing bc ;)
Quoted 7 lines
I have tried to find exactly where it's run since then, i have found the
cmd_bcsection but not found what triggers it... Due to lack of time and energy, I hearby report this bug!This is about as far as i got:
kernel/Makefile:135:quiet_cmd_bc = BC $@
kernel/Makefile:136:cmd_bc= bc -q $(filter-out FORCE,$^) > $@
Could you try this patch. Untested but I think it required to catch this bug.
kernel/Makefile +1 -1
@@ -134,7 +134,7 @@ $(obj)/hz.bc: $(objtree)/include/config/hz.h FORCE $(call if_changed,hzfile) quiet_cmd_bc = BC $@ - cmd_bc = bc -q $(filter-out FORCE,$^) > $@ + cmd_bc = bc -q $(filter-out FORCE,$^) > $@ || (rm -f $@; false) targets += timeconst.h $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE
Quoted 2 lines
Is there any detaled information and or instructions on kbuild btw?
There is some docs in Documentation/kbuild/* - but I dunno if this is what you are after.
Sam