Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 754141 - dev-lang/lua-5.1.5-r104: dev-db/redis-6.0.9 fails to build due to missing lua.h
Summary: dev-lang/lua-5.1.5-r104: dev-db/redis-6.0.9 fails to build due to missing lua.h
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
Depends on:
Reported: 2020-11-12 12:19 UTC by Stefan Huber
Modified: 2020-12-30 16:53 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

build.log (build.log,15.67 KB, text/x-log)
2020-11-12 12:19 UTC, Stefan Huber
emerge --info (emerge-info.txt,6.67 KB, text/plain)
2020-11-12 12:19 UTC, Stefan Huber

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2020-11-12 12:19:08 UTC
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.
Comment 1 Stefan Huber 2020-11-12 12:19:38 UTC
Created attachment 671005 [details]
Comment 2 Stefan Huber 2020-11-12 12:19:56 UTC
Created attachment 671008 [details]
emerge --info
Comment 3 Stefan Huber 2020-11-12 12:31:38 UTC
Ok, the problem is the output of pkg-config by lua-5.1:
  # pkg-config --cflags lua5.1  

This again is because /usr/lib64/pkgconfig/lua5.1.pc contains these two lines:
  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).
Comment 4 Stefan Huber 2020-11-12 12:34:18 UTC
After manually changing
  Cflags: -I${includedir}/lua5.1

  Cflags: -I${includedir}

in /usr/lib64/pkgconfig/lua5.1.pc, dev-db/redis emerged fine.
Comment 5 Ionen Wolkens 2020-11-12 13:40:22 UTC
May want to edit the summary for clarity, this is indeed a dev-lang/lua-5.1.5-r104 issue from commit:

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.
Comment 6 William Hubbs gentoo-dev 2020-12-30 16:53:58 UTC
This is fixed in lua-5.1.5-r106.