Two related issues: 1. If ldoc is not installed, it will not be called. If it is installed, it will be called. 2. If the version of ldoc the version is <1.4.6-r100 the build can fail if LUA_TARGETS includes something other than lua5-1 (see below). This does not occur when ldoc-1.4.6-r100 is installed. ldoc -c build-aux/config.ld . lua: /usr/share/lua/5.1/ldoc.lua:19: module 'pl.class' not found: no field package.preload['pl.class'] no file '/usr/share/lua/5.2/pl/class.lua' no file '/usr/share/lua/5.2/pl/class/init.lua' no file '/usr/lib64/lua/5.2/pl/class.lua' no file '/usr/lib64/lua/5.2/pl/class/init.lua' no file './pl/class.lua' no file '/usr/lib64/lua/5.2/pl/class.so' no file '/usr/lib64/lua/5.2/loadall.so' no file './pl/class.so' no file '/usr/lib64/lua/5.2/pl.so' no file '/usr/lib64/lua/5.2/loadall.so' no file './pl.so' stack traceback: [C]: in function 'require' /usr/share/lua/5.1/ldoc.lua:19: in main chunk [C]: in ? * ERROR: dev-lua/luaposix-35.0-r100::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 125: Called src_compile * environment, line 1543: Called lua_foreach_impl 'lua_src_compile' * environment, line 1156: Called multibuild_foreach_variant '_lua_multibuild_wrapper' 'lua_src_compile' * environment, line 1258: Called _multibuild_run '_lua_multibuild_wrapper' 'lua_src_compile' * environment, line 1256: Called _lua_multibuild_wrapper 'lua_src_compile' * environment, line 459: Called lua_src_compile * environment, line 1203: Called die * The specific snippet of code: * ./build-aux/luke package="${PN}" version="${PV}" PREFIX="${ED}/usr" INST_LIBDIR="${ED}/$(lua_get_cmod_dir)" INST_LUADIR="${ED}/$(lua_get_lmod_dir)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" || die; * * If you need support, post the output of `emerge --info '=dev-lua/luaposix-35.0-r100::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-lua/luaposix-35.0-r100::gentoo'`. * The complete build log is located at '/tmp/portage/dev-lua/luaposix-35.0-r100/temp/build.log'. * The ebuild environment file is located at '/tmp/portage/dev-lua/luaposix-35.0-r100/temp/environment'. * Working directory: '/tmp/portage/dev-lua/luaposix-35.0-r100/work/luaposix-35.0-lua5-2' * S: '/tmp/portage/dev-lua/luaposix-35.0-r100/work/luaposix-35.0' Reproducible: Always
If I understand https://github.com/luaposix/luaposix/commit/8d58ea97ebddafb6470679082529a8292bed6de9 correctly, should src_prepare() remove or comment out the line beginning with "ldocs" in ${S}/lukefile should take care of ldocs automagic. That said, it is up to the maintainer of this package to decide whether they want to disable documentation generation altogether, wrap it in a USE flag, or have it generated unconditionally.
There more elegant way to disable ldoc invocation. See my PR https://github.com/gentoo/gentoo/pull/18884.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6b3068f84b219767c87dd5a8d894dad561a55ea commit c6b3068f84b219767c87dd5a8d894dad561a55ea Author: Azamat H. Hackimov <azamat.hackimov@gmail.com> AuthorDate: 2020-12-30 16:28:56 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-01-20 14:13:39 +0000 dev-lua/luaposix: fix #762340 Disable ldoc automagic update. ldoc force update not needed as docs are in actual state. Closes: https://bugs.gentoo.org/762340 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org> dev-lua/luaposix/luaposix-35.0-r101.ebuild | 76 ++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)