-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xamarin/Android: dlopen liblua53.so fails #53
Comments
Looks like re-defining a few things in src/liolib.c fixes this for us. I added #define l_fseek(f,o,w) fseek(f,o,w) in line 131, which sets l_fseek to fseek unconditionally. This gives a few warnings about redefined macros in the build. Of course this is an ugly "fix". But it might help to fix this in a proper way. Until then, we can use a patched version of liblua53.so in our app. |
You will need to use platform >= 24. |
We build our app with targetSdkVersion=27, but must support Android 4.1.x (minSdkVersion=16) still. Most users of our app are using Android 6.x. If I understand all of this correctly, any KeraLua/NLua that uses Lua>=5.3 will only run on Android>=7.0? If so, we will have to use a patched version without large file support. |
I've enabled the |
No worries :) I did some changes to Android,mk and Application.mk in our fork (https://github.com/MichaelSB/lua/tree/master) and this seems to do the job without changing the source of lua. Our app is B2B running on pretty expensive devices, so we are forced to support ancient versions of Android forever. I'm closing this, it's solved for us. Many thanks for your feedback, it pushed me in the right direction :) |
@MichaelSB do you mind share you solution? I can try to bump to official NLua nuget this way you could consume from NuGet (and this may benefit other Xamarin.Android users). |
No, not at all. Everything we changed is in the fork mentioned above and in https://github.com/MichaelSB/KeraLua for the KeraLua-Changes: lua submodule pointing to our lua and I bumped the version number in AssemblyInfo.cs today to make VS2019 shut up about some conflict we got. Feel free to use (and/or change) whatever you want. I'd be very happy, if we could use an official package again some time in the future :) |
Thank you, I think worth remove the large file support in order to support a more broad base of Android versions. |
I think so too. I can't imagine anyone running scripts this large on phones :) We sure don't. Our scripts are a few hundred lines max. When we started our app, I was very happy to find this package. I'm a fan of lua since ages and being able to customize our app with lua is the best thing since sliced bread. When I'm able to give at least something back, I'm more than happy to do so. |
The large file support is not for the scripts, is for the io library. if you use |
Ah ok, thanks for the clarification :) You see, I have no idea what I did here :) |
Great! Many thanks :) |
We're using KeraLua/NLua with Xamarin/Android and our application fails to start since KeraLua Version 1.0.4 at least. The error we get is (name of app obfuscated):
07-22 13:26:16.210 D/Mono (22457): DllImport attempting to load: 'liblua53.so'.
07-22 13:26:16.214 D/Mono (22457): DllImport error loading library './liblua53.so': 'dlopen failed: cannot locate symbol "fseeko64" referenced by "/data/app/myapp/lib/arm64/liblua53.so"...'.
07-22 13:26:16.215 D/Mono (22457): DllImport error loading library './liblua53.so': 'dlopen failed: cannot locate symbol "fseeko64" referenced by "/data/app/myapp/lib/arm64/liblua53.so"...'.
07-22 13:26:16.215 D/Mono (22457): DllImport error loading library '/system/lib/liblua53.so': 'dlopen failed: library "/system/lib/liblua53.so" not found'.
07-22 13:26:16.215 D/Mono (22457): DllImport error loading library '/system/lib/liblua53.so': 'dlopen failed: library "/system/lib/liblua53.so" not found'.
It works on selected devices (eg Nexus 5x), but fails for most. I think it might be related to android/ndk#364 in one way or another.
The text was updated successfully, but these errors were encountered: