Displaying data in a table

Questions and information about using Lua scripting with Storyboard

Moderator: jamiev

Re: Displaying data in a table

Postby garry » Tue Mar 20, 2018 6:02 am

Hi Andrea,

it seems you were still having issues with the Android armle lua sqlite libraries with the new version of Storyboard. I have rebuilt the shared library against our latest Storyboard 5.2 release and our libsblua.so file for you which should hopefully resolve your error.

The zip file is attached containing luasql_sqlite3.so.

Let us know if this fixes the issue.

Regards,
Garry
Attachments
android-armle.zip
(267.26 KiB) Downloaded 90 times
garry
 
Posts: 7
Joined: Wed Jan 31, 2018 5:22 am
Location: Bath, UK

Re: Displaying data in a table

Postby Andrea » Tue Mar 20, 2018 8:10 am

Hi Garry, thank you for your fast reply. Yes, I solved my problems with linux, but later I wanted to try with Android, and the problem arised again. Now I tried using your fresh complied library, but the engine refuse to start and displays this error:

E/sbengine: ERROR [0.076]:Problem loading Lua script [dbManager.lua] error loading module '(null)' from file '/data/user/0/com.storyboard.LDC100/files/libs/usrlibs/scripts/android_armle/luasql_sqlite3.so':
dlopen failed: cannot locate symbol "__bswapsi2" referenced by "/data/user/0/com.storyboard.LDC100/files/libs/usrlibs/scripts/android_armle/luasql_sqlite3.so"...

Do you have any tip to solve it?

PS: If it is not too complicate, could you please explain me how you compiled the library for android? just to avoid to bother you in case of new releases or other modules
Andrea
 
Posts: 9
Joined: Wed Jun 21, 2017 10:19 am

Re: Displaying data in a table

Postby garry » Tue Mar 20, 2018 9:27 am

Hi Andrea,

I'll need to check with the team on this. Are you using the latest Storyboard 5.2 release and runtime binaries as part of your APK export?

The android-armle release is built with android-ndk-r10e and toolchain arm-linux-androideabi-4.8 as part of our build system but it is not very simple to replicate.

Looking at dependencies for the shared library they are minimal but will be sensitive to versions:

Code: Select all
user@linux:~/usr/share/crank/runtime/android-armle-opengles_2.0-obj/lua/luasql/android-armle$ readelf -d luasql_sqlite3.so | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libsblua.so]


I did not yet get the chance to test this on a target to see if it is the same here.

Regards,
Garry
garry
 
Posts: 7
Joined: Wed Jan 31, 2018 5:22 am
Location: Bath, UK

Re: Displaying data in a table

Postby Andrea » Wed Mar 21, 2018 3:57 am

Hi Garry. Yes, before using the library I have installed the latest Storyboard release just downloaded from the web site. The new installation was made on a different folder (because the setup installed the 64bit version on my PC, while before I was using the 32 bit version). So I could completely delete the previous Storyboard folder and, for this reason, I suppose that the librararies are the right ones..
Andrea
 
Posts: 9
Joined: Wed Jun 21, 2017 10:19 am

Re: Displaying data in a table

Postby garry » Wed Mar 21, 2018 11:05 am

Hi Andrea,

understood. Which version of Android are you running and on which hardware?

I have been trying to test this myself and have found similar issues on my Android 7.0 device with missing symbol "__bswapsi2" which is an intrinsic function for 32 bit integers (https://gcc.gnu.org/onlinedocs/gccint/I ... tines.html). I suspect this is an NDK toolchain mismatch with the target runtime. My test app is also failing to load the luasql_lite3.so module required by the libsblua.so in the same way as yours so we can at least reproduce this.

There have been changes to the way Android runs with private libraries since Android 7.0 which may be contributing to the issue:
https://developer.android.com/about/ver ... s.html#ndk

At this stage we will need to do some more investigation internally for a workaround and i'll raise a problem report.

Regards,
Garry
garry
 
Posts: 7
Joined: Wed Jan 31, 2018 5:22 am
Location: Bath, UK

Re: Displaying data in a table

Postby Andrea » Thu Mar 22, 2018 1:23 am

Hi Garry. Glad that you could replicate the problem. I use Android 6.0 on a LG G3 phone.
Andrea
 
Posts: 9
Joined: Wed Jun 21, 2017 10:19 am

Re: Displaying data in a table

Postby garry » Thu Mar 22, 2018 1:05 pm

Hi Andrea,

I have filed a problem report for the R&D team on your behalf for consideration in the next maintenance release. I have made a patched version of the shared library which includes a local implementation of the missing function which seems to have resolved the issue in my tests. Hopefully this is a good workaround for you in the short term.

Can you check with the attached version ?

Regards,
Garry
Attachments
android-armle.zip
(267.56 KiB) Downloaded 83 times
garry
 
Posts: 7
Joined: Wed Jan 31, 2018 5:22 am
Location: Bath, UK

Re: Displaying data in a table

Postby Andrea » Fri Mar 23, 2018 9:28 am

Hi Garry! This version works perfectly either on Android 6 and on Android 7. Thank you!
Andrea
 
Posts: 9
Joined: Wed Jun 21, 2017 10:19 am

Previous

Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron