From ArchWiki
Jump to navigation Jump to search

Why are these options commented out?

First of all, I don't want to force anything on anyone. Secondly, as pointed out in Configuration's warning, not all optimizations are sane for all packages.

Although makepkg-optimize is intended to simplify enabling some complex optimization routines, users should make informed decisions about the optimizations they enable just as much as they should by any other means. I'd rather not have to explicitly say all of that in the article, and I don't think it is necessary to do so; the existing warning should be sufficient. quequotion (talk) 17:42, 24 October 2018 (UTC)

"Redundant" configuration file

It is not required to use the configuration file generated by makepkg-optimize; any of the supplementary options can be specified in the default configuration file. Providing a separate file allows me to ship inline documentation on the supplementary options, avoid modifying the config file that belongs to (and could be replaced by) pacman, and make a clear procedural distinction between building ordinary packages and building optimized packages.

If none of the supplementary options are specified in /etc/makepkg.conf, running makepkg without specifying a config file will build ordinary packages. As the warning states, some packages do not optimize well; specifying the makepkg-optimize config file to build an optimized package or no config file to build an ordinary package is more convenient than editing a shared configuration file before each build. quequotion (talk) 03:10, 28 November 2018 (UTC)


Considering adding this somewhere on the page, but it is something that could reasonably be deduced. quequotion (talk) 16:28, 10 March 2019 (UTC)

Note: Like the other *DEST variables, the default location is the build directory. If you are building a package that requires a reboot to produce profiles, such as systemd, you should set this somewhere outside your home directory (which will not be available until login or after logout).

Simplify installation of makepkg-optimize in a clean chroot

Only makepkg-optimizeAUR has to be installed in the base chroot (to create /etc/makepkg-optimize.conf); the backends could be installed at build time by preinstalling them. quequotion (talk) 18:45, 28 October 2019 (UTC)

Install makepkg-optimize

Warning: This voids the warranty on your "clean" chroot!

Download and build makepkg-optimizeAUR, then copy its package file into the base chroot and install it by calling pacman via arch-nspawn:

# cp makepkg-optimize-14-1-any.pkg.tar.xz "$CHROOT"/root/root/
$ arch-nspawn "$CHROOT"/root pacman -U /root/makepkg-optimize-14-1-any.pkg.tar.xz
Note: The optional backends in can similarly be installed in the base chroot, or preinstalled at build time as needed.

Misleading statement in "Installation"

Need to think of a better wording for "to make optimizations available", as these packages are only needed for some optimizations while others work out-of-the-box. quequotion (talk) 18:45, 28 October 2019 (UTC)

PGO packages repeatedly build in "generate" mode although they should build in "apply" mode

Depending on the package, it may attempt to rebuild from object files left in an existing $srcdir, bypassing the changes in the PGO flags.

I have had this problem most especially in the case where a src/ directory exsists in the same directory as a PKGBUILD when building with makechrootpkg.

The old $srcdir (or at least the object files in it) must be cleared before rebuilding in "apply" mode. quequotion (talk) 12:16, 6 July 2020 (UTC)

Note to self: this was the issue solved by passing -c to makepkg. quequotion (talk) 12:20, 6 July 2020 (UTC)