Page MenuHomePhabricator

FTBFS with -Dlua-interpreter=lua and lua 5.2
Closed, ResolvedPublic

Description

1.24.0 fails to build on non-luajit arches that need lua5.2:

/usr/bin/ld: src/lib/evas/388a850@@evas@sha/filters_evas_filter_parser.c.o: in function `_lua_class_create':
./obj-aarch64-linux-gnu/../src/lib/evas/filters/evas_filter_parser.c:2434: undefined reference to `luaL_register'
collect2: error: ld returned 1 exit status

Sample full build log: https://buildd.debian.org/status/fetch.php?pkg=efl&arch=arm64&ver=1.24.0-1&stamp=1589011545&raw=0

ProhtMeyhet edited projects, added Restricted Project; removed efl (efl-1.24).May 10 2020, 12:19 AM
ProhtMeyhet added subscribers: bu5hm4n, ProhtMeyhet.

1.24.0 fails to build on non-luajit arches that need lua5.2:

Could you please elaborate what non-luajit arches means?

ProhtMeyhet updated the task description. (Show Details)May 10 2020, 12:20 AM

Architectures where luajit is not supported (eg s390x) or broken (e.g. amd64, ppc64el). In these cases, I build against lua 5.2.

I think`luaL_register` was removed in 5.2 - https://www.lua.org/manual/5.2/manual.html#8.3.

@jpeg could you please have a look? Reassign if needed, but the line is from your commit f3e16bc4854 -- seemingly some API change in Lua-jit.

@rvandegrift Thank you!

ProhtMeyhet triaged this task as Showstopper Issues priority.May 10 2020, 10:52 PM
ProhtMeyhet added a subscriber: stefan_schmidt.
stefan_schmidt added a subscriber: q66.

@rvandegrift As far as I understand the situation it is either luajit or lua 5.1 (they change API on minor versions, so 5.2 broke) for building efl.
For the CI testing on s390x for example I am installing liblua5.1-dev.

With the new luaffi stuff @q66 is working on we will be able to use newer lua versions, but this is not ready yet and nothing that can be fixed in 1.24.

@q66 did I summarize this correctly?

q66 added a comment.May 11 2020, 6:20 AM

The new ffi stuff has nothing to do with evas filters, the code for that will need to be fixed separately, but yes, right now you need 5.1

q66 added a comment.EditedMay 11 2020, 6:22 AM

Also, there are luajit patchsets for both ppc64(le) and s390x, most distros ship them. As for amd64, why would that be broken?

I actually think that this is just a regression introduces in D10965. All that is needed config_h.set('ENABLE_LUA_OLD', '1') somewhere in the lua detection logic.

@rvandegrift I put Marcel's idea in code and having it run through CI to see if it breaks something.
If you could also test it and confirm it fixes your issue that would be appreciated.
https://git.enlightenment.org/core/efl.git/commit/?h=devs/stefan/lua52-fix&id=f81800ece543b61737ab10c2994a419269087128

@stefan_schmidt @bu5hm4n confirmed that ENABLE_LUA_OLD fixes build on arm64.

@q66 sorry, meant that luajit is broken on arm64 - amd64 is fine.

If I should be using 5.1 everywhere, that's cool - the README still says 5.1 or 5.2 though :)

@rvandegrift Thanks for confirming. Yeah, I was a bit mislead about 5.2. But with this simple fix I am ok to have it supported along 5.1 and luajit. This will change in the future when the luaffi stuff from q66 lands, but we can go through the README and other places to correct the deps at that point.

I will backport this to the 1.24.x branch and it will be in an upcoming 1.24.2.

q66 added a comment.May 12 2020, 6:48 AM

@rvandegrift arm64 should also be okay in most distros

ppc64le should be okay for sure, it's my daily driver and i'm not experiencing any issues beyond the lack of JIT (luajit runs in interpreted mode)