FS#64279 - [linux] Tweak PKGBUILD to separate compilation from HTML generation during SMP builds

Attached to Project: Arch Linux
Opened by David Ward (dpward) - Sunday, 27 October 2019, 00:30 GMT
Last edited by Jan Alexander Steffens (heftig) - Saturday, 22 February 2020, 00:46 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Jan Alexander Steffens (heftig)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

When the linux package is built, the "bzImage", "modules" and "htmldocs" targets are passed to "make" in the same invocation. For an SMP build, this means the HTML documentation will be generated while the kernel is being compiled. The output displayed during the build process can be somewhat difficult to discern as a result, since GCC and Sphinx both produce warnings on individual source code files that can look similar.

I would suggest invoking make separately for the HTML documentation, so that it is only generated after the kernel compilation is complete. A sample patch to the PKGBUILD file is attached.

Thank you!
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Saturday, 22 February 2020, 00:46 GMT
Reason for closing:  Implemented
Additional comments about closing:  Changed in trunk
Comment by Jensen McKenzie (your_doomsday) - Monday, 28 October 2019, 17:34 GMT
@dpward why did you changed "make bzImage modules" to "make all" without mentioning it? I think this lowers chance for this patch to be accepted.
Comment by David Ward (dpward) - Monday, 28 October 2019, 17:54 GMT
This was meant to be only an example of how the PKGBUILD could be modified. The maintainer may have another preference as to how to modify the PKGBUILD to achieve this; I'm not asking for my example patch to be accepted as-is necessarily.
Comment by Jensen McKenzie (your_doomsday) - Monday, 28 October 2019, 19:57 GMT
@dpward the point was that your example muddles what you wanted to achieve and maintainer may not understand what "make all" has to do with this issue. If you made a patch that matched description of this bugreport it would be crystal clear.
Comment by David Ward (dpward) - Monday, 28 October 2019, 20:51 GMT
Just to clear up any confusion, https://www.kernel.org/doc/makehelp.txt says:

Other generic targets:
all - Build all targets marked with [*]
* vmlinux - Build the bare kernel
* modules - Build all modules
[...]
Architecture specific targets (x86):
* bzImage - Compressed kernel image (arch/x86/boot/bzImage)

In other words, "make all" is the same as "make vmlinux bzImage modules". This is also the same as "make bzImage modules", since the vmlinux target is a dependency of the bzImage target:
https://git.archlinux.org/linux.git/tree/arch/x86/Makefile?h=v5.3.7-arch1#n280
Comment by Jan Alexander Steffens (heftig) - Friday, 21 February 2020, 21:49 GMT
The htmldocs build is a long and serial process and I'd rather have it in parallel with the rest to speed up the build.
Comment by David Ward (dpward) - Friday, 21 February 2020, 22:01 GMT
Are you sure it happens in serial? Sphinx supports SMP and at least appears to run in parallel during the build. Please see for example: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/sphinx/parallel-wrapper.sh

On my system, when I split these into two stages (parallelized kernel build, then parallelized documentation build), it doesn't seem to increase the overall build time, but it makes it a whole lot easier to follow the build process and understand the output when something goes wrong. How does the build time compare on the system that generates the official packages?

Loading...