Emerging dev-db/redis-6.0.9 fails due to missing lua.h: deps/linenoise -I/usr/include/lua5.1/lua5.1 -DHAVE_LIBSYSTEMD -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -MMD -o server.o -c server.c In file included from server.c:30: server.h:50:10: fatal error: lua.h: No such file or directory 50 | #include <lua.h> | ^~~~~~~ compilation terminated. Reproducible: Always Note that the include path '/usr/include/lua5.1/lua5.1' does not exist, but lua.h would rather reside in '/usr/include/lua5.1'. Without further investigating, this might be related to the fact that I have sloted lua versions 5.1.5-r104 and 5.3.5-r2 installed rather than the stable non-sloted lua-5.1.5-r4.
Created attachment 671005 [details] build.log
Created attachment 671008 [details] emerge --info
Ok, the problem is the output of pkg-config by lua-5.1: # pkg-config --cflags lua5.1 -I/usr/include/lua5.1/lua5.1 This again is because /usr/lib64/pkgconfig/lua5.1.pc contains these two lines: includedir=${prefix}/include/lua5.1 Cflags: -I${includedir}/lua5.1 and hence, /lua5.1 is appended a second time. This again is because of these line in the lua-5.1.5-r104.ebuild: -e "/^includedir=/s,(/include)$,\1/lua${SLOT}," \ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \ I guess if the includedir has been fixed, then this should be fine for the cflags as well, not being fixed a second time. So this is not a bug of dev-db/redis, but rather of dev-lang/lua-5.1.5-r104 and (-r103, too).
After manually changing Cflags: -I${includedir}/lua5.1 to Cflags: -I${includedir} in /usr/lib64/pkgconfig/lua5.1.pc, dev-db/redis emerged fine.
May want to edit the summary for clarity, this is indeed a dev-lang/lua-5.1.5-r104 issue from commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0ec6727d673a6ac44c7ee7d82d2ebc609e1f511 Not that any guarantee for dev-db/redis to work with slotted versions until migrated (bug #752570), just nice if it happens to (like now). When ebuilds offer it, luajit doesn't conflict and makes a nice alternative meanwhile.
This is fixed in lua-5.1.5-r106.