List all Gentoo packages built against the old Lua or specific version

After similar articles about Python (List all Gentoo packages built against the old python or specific version) under Gentoo and Ruby List all Gentoo packages built against the old ruby or specific version, the Lua upgrade in Gentoo may have similar problems, so this article shows how to list old Lua modules and packages built against old Lua environments. Despite a clean upgrade without any blockers or masked packages, sometimes, on old machines, there might be packages left still built against an old version of Lua, which is even no longer available on the system!

main menu
equery USE lua_targets_lua5-4

On Gentoo, there are two important flags in the configuration make.conf file:

LUA_SINGLE_TARGET="lua5-4"
LUA_TARGETS="lua5-1 lua5-4"

The LUA_TARGETS controls the support of multiple Lua versions installed on the system. When the Gentoo package has a use flag lua, the builder emerge will build the Lua module for all the Lua versions in LUA_TARGETS. Some programs or libraries may not support multiple versions to be installed on the system and they may require to specify just one Lua library target, against which they are going to be built and that’s why LUA_SINGLE_TARGET exists. In most cases, the LUA_SINGLE_TARGET should be the active (default in the system) Lua version.
Keep on reading!

List all Gentoo packages built against the old ruby or specific version

After a similar article about Python (List all Gentoo packages built against the old python or specific version) under Gentoo, the Ruby upgrade in Gentoo may have similar problems, so this article shows how to list old Ruby modules and packages build against old ruby environments. Despite a clean upgrade without any blockers or masked packages, sometimes, on old machines, there might be packages left still built against an old version of Ruby, which is no longer available on the system!

main menu
equery with USE ruby_targets_ruby26

On Gentoo, there is one important flag in the configuration make.conf file:

RUBY_TARGETS="ruby30 ruby31"

The RUBY_TARGETS controls the support of multiple Ruby versions installed on the system. When the Gentoo package has a use flag ruby, the builder emerge will build the Ruby module for all the Ruby versions in RUBY_TARGETS.
Keep on reading!

List all Gentoo packages built against the old python or specific version

Updating python under Gentoo is not always straightforward work. Despite a clean upgrade without any blockers or masked packages, sometimes, on old machines, there might be packages left still built against an old version of python, which is no longer available on the system!

main menu
Query for USE with python_targets_python3_4, python_targets_python3_5 and python_targets_python3_6.

On Gentoo, there are two important flags in the configuration make.conf file:

PYTHON_TARGETS="python3_8 python3_10"
PYTHON_SINGLE_TARGET="python3_8"

The PYTHON_TARGETS and PYTHON_SINGLE_TARGET control the support of multiple Python versions installed on the system. When the Gentoo package has a use flag python, the builder emerge will build the python module for all the Python versions in PYTHON_TARGETS. Some programs or libraries may not support multiple versions to be installed on the system and they may require to specify just one Python library target, against which they are going to be built and that’s why PYTHON_SINGLE_TARGET exists. In most cases, the PYTHON_SINGLE_TARGET should be the active (default in the system) Python version.
Keep on reading!

more than the default 4 parallel processes using distributed compiling with distcc

Distributed compilation could greatly speed the build process of Gentoo packages (and not only Gentoo, of course). If you tend to use Gentoo on a laptop or a relatively old CPU you may want to build packages distributively across multiple hosts.
Different (Linux) distributions use different configurations and environment scheme and sometimes it is difficult to sift the configuration, which could be applied to your setup. This is not a tutorial on how to enable parallel processing in Gentoo but it is just our client-site setup.

By default, there is a limit of 4 parallel processes, which is utterly insufficient, because nowadays most servers have more than 8 cores/logical compute units (not to mention that probably most would have 16 and above cores compute units).

The environment variable DISTCC_HOSTS controls, which hosts will receive files for the compilation of what they support and what is the limit of parallel processes.

In Gentoo we set this variable in the /etc/portage/make.conf. Here what you may include in make.conf to have 16 parallel remote processes and up to maximum 4 local (if the remote fails):

MAKEOPTS="-j16 -l4"
FEATURES="distcc"
DISTCC_HOSTS="192.168.0.101/16"

We use the environment DISTCC_HOSTS (here in Gentoo put in the make.conf, but in another Linux distribution an environment variable with this name should be set) because it is easy to set up and control globally for the Gentoo emerge system.
According to the documents:

In order, distcc looks in the $DISTCC_HOSTS environment variable, the user’s $DISTCC_DIR/hosts file, and the system-wide host file.

So when using emerge to build the packages, the emerge will rely on $DISTCC_HOSTS in make.conf (/etc/portage/make.conf or /etc/make.conf if you still use the old path), “/var/tmp/portage/.distcc/” (the build process uses “portage” user and group, not root!) and “/etc/distcc/hosts”. The first option used in the order above will be set the hosts and the limitation for the distributed processing. So if you use $DISTCC_HOSTS in make.conf (or environment) you wouldn’t need to set the “hosts” file.
Separate the different hosts with white space if you have more than one and always use the notation “/LIMIT” for each host. The default value is only 4 parallel processes (i.e it is implicitly added /4 to each hosts in the configuration!)
Keep on reading!