[OpenWrt-Devel] Why does perl get compiled even if it not selected by any package?
Hannu Nyman
hannu.nyman at iki.fi
Sun Nov 4 12:21:44 EST 2018
Why does the presence of perl in a larger multi-package Makefile force the
compilation of perl even if the specific package depending on perl is not
even selected. (compilation of perl takes long, so it is rather annoying...)
I have stumbled into two cases, where my package selection leads into perl
compilation during build, although perl is not a dependency of my package
selection, and the final perl package .ipk is not even produced.
* xtables-addons Makefile has geoip components that depend on perl, but even
if those are not selected and only e.g. rstp is selected, perl is still
compiled for the xtables-addons.
* lm-sensors Makefile defines several packages, of which only
"lm-sensors-detect" depends on perl. Selecting only some other package like
libsensors still leads into perl compilation.
My hunch is that this is related to perl having a host build component. That
apparently gets evaluated in any case, regardless of the package needing perl
actually being selected, or something like that.
Is this just a limitation of the dependency parsing, and is caused by the
presence of a host build in the package Makefile ??
Could this be mitigated somehow?
E.g. by saying " +PACKAGE_lm-sensors-detect:perl " instead of just "+perl" ???
Any input from the dependency gurus?
https://github.com/openwrt/packages/blob/master/utils/lm-sensors/Makefile
Looking at the tmp/.packagedeps, perl likely gets into the dependency tree
this way:
package-$(CONFIG_PACKAGE_lm-sensors) += feeds/packages/lm-sensors
package-$(CONFIG_PACKAGE_lm-sensors-detect) += feeds/packages/lm-sensors
package-$(CONFIG_PACKAGE_libsensors) += feeds/packages/lm-sensors
$(curdir)/feeds/packages/lm-sensors/compile +=
$(curdir)/feeds/packages/perl/compile $(curdir)/libs/sysfsutils/compile
$(curdir)/libs/toolchain/compile $(if
$(CONFIG_GCC_LIBSSP),$(curdir)/libs/toolchain/compile) $(if
$(CONFIG_USE_GLIBC),$(curdir)/libs/toolchain/compile)
perus at ub1810:/Openwrt/wrt3200$ grep sensor .config
# CONFIG_PACKAGE_libupm-pulsensor is not set
CONFIG_PACKAGE_libsensors=y
CONFIG_PACKAGE_collectd-mod-sensors=y
# CONFIG_PACKAGE_lm-sensors is not set
# CONFIG_PACKAGE_lm-sensors-detect is not set
perus at ub1810:/Openwrt/wrt3200$ grep perl .config# CONFIG_PACKAGE_perl is not set
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list