love2d / love-android

Android build setup for LÖVE.
https://love2d.org
Other
200 stars 70 forks source link

LuaJIT failed to start in 12.0 #234

Closed er2off closed 2 years ago

er2off commented 2 years ago

When trying to start any game, SDL error message appears:

Error: dlopen failed: could not load library "libluajit-5.1.so.2" needed by "liblove.so"; caused by library "libluajit-5.1.so.2" not found

Android 5.0, armv7a

MikuAuahDark commented 2 years ago

Oh no, looks like soname issue. I'll take a look ASAP.

er2off commented 2 years ago

Trouble in shared library, using static library (reverting this commit) fixes the problem with LuaJIT loading but in no-game screen blue screen appears for me, even without D/GameActivity: started in logcat.

er2off commented 2 years ago

Oh, I'm was stupid and forgot to remove MainActivity filter :flushed: In no-game screen it crashes with lua error about shaders:

I/SDL/APP: [LOVE] Error: [love "boot.lua"]:344: Cannot link shader program object:
    L0010 Uniform 'love_UniformsPerDraw' differ on precision
    stack traceback:
        [love "boot.lua"]:410: in function <[love "boot.lua"]:406>
        [C]: in function 'setMode'
        [love "boot.lua"]:344: in function <[love "boot.lua"]:143>
        [C]: in function 'xpcall'
        [love "boot.lua"]:420: in function <[love "boot.lua"]:413>
        [C]: in function 'xpcall'
slime73 commented 2 years ago

Which phone / GPU are you testing with?

er2off commented 2 years ago

GPU is Mali-400 MP2, no-game screen and other games works normally in 11.4

slime73 commented 2 years ago

That's a ~14 year old GPU. Right now love 12 needs 32 bit float support in pixel shaders (for its built-in uniforms), which that GPU doesn't support apparently.

MikuAuahDark commented 2 years ago

Does that mean GLES3 is requirement?

slime73 commented 2 years ago

No, most GLES2 devices support that feature.

It might be possible to restructure love's built in uniforms to behave a bit more like 11.x, but it was changed in the first place to allow non-OpenGL backends to more easily implement shaders (and to improve performance a bit), I'm not sure if it's possible to have our cake and eat it too in this case.

It's also worth mentioning that ES2 devices which don't support 32 bit floats in pixel shaders would still fail to run a shader that tries to use a uniform in both the vertex and pixel shader stages in love 11, love's default shaders just didn't do that on their own before. For example if you have a vertex shader in love 11 that uses love_ScreenSize, I think it wouldn't run on your phone.

MikuAuahDark commented 2 years ago

Alright, I fixed the actual issue. It should work fine without reverting love2d/megasource@27eff7a94c1038ac16112fc1ae1f109fc1174585 now.

Please let me know if it doesn't.

slime73 commented 2 years ago

I committed a potential workaround for the shader error, let me know if it works for you: https://github.com/love2d/love/commit/db1bf47