I successfully compile the legato app with developer studio with wp76 r10.1 package, maybe you can try the same.
Iâm not entirely sure what change made it work. Iâve tried a bunch. I know for sure that Iâm using a modified version of this command:
mkapp -t wp750x testdata.adef -i â${LEGATO_ROOT}/third-party/sqlite3/lib /third-party/sqlite3/incâ -L â${LEGATO_ROOT}/third-party/sqlite3/lib/sqlite3.soâ
I removed the bold portion of the -i parameter because that directory doesnât exist on my machine and I obviously changed the target to wp77xx. Iâm not sure if that helps.
I tried with VSCode on your testsql, and got this:
.
.
.
Apr 1 22:43:05 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[5111]/ T=main | _componentMain.c _testsqlComponent_Init() 26 | Initializing testsqlComponent component library.
Apr 1 22:43:05 swi-mdm9x28-wp user.debug Legato: DBUG | testsql[5111]/framework T=main | mem.c InitPool() 400 | Memory pool name âframework.msgs-LogControlProtocolâ is truncated to âframework.msgs-LogControlProtocâ
Apr 1 22:43:05 swi-mdm9x28-wp user.debug Legato: DBUG | testsql[5111]/framework T=main | messagingSession.c le_msg_SetSessionRecvHandler() 2078 | SetSessionRecv: Unix socket session
Apr 1 22:43:05 swi-mdm9x28-wp user.debug Legato: DBUG | testsql[5111]/framework T=main | mem.c le_mem_ForceAlloc() 1172 | Memory pool âframework.SigMonitorâ overflowed. Expanded to 1 blocks.
Apr 1 22:43:05 swi-mdm9x28-wp user.debug Legato: DBUG | testsql[5111]/framework T=main | mem.c le_mem_ForceAlloc() 1172 | Memory pool âframework.SigHandlerâ overflowed. Expanded to 1 blocks.
Apr 1 22:43:05 swi-mdm9x28-wp user.debug Legato: DBUG | testsql[5111]/testsql_exe T=main | _main.c main() 60 | == Starting Event Processing Loop ==
Apr 1 22:43:05 swi-mdm9x28-wp user.info Legato: INFO | testsql[5111]/testsqlComponent T=main | testsqlComponent.c _testsqlComponent_COMPONENT_INIT() 134 | Component SQLAppComponent started.
Apr 1 22:43:05 swi-mdm9x28-wp user.info Legato: INFO | testsql[5111]/testsqlComponent T=main | testsqlComponent.c createDb() 27 | Error in Opening / creating DB :unable to open database file
I guess itâs successfully running as I didnât get any compilation error, isnât it?
Do I need to install sqlite3 on wp7702 to avoid that âDB creationâ error?
(âmake sure you define macro with path where you want to create databaseâ Iâm not sure what does this mean⌠Do I need to run apt-get install sqlite3 on my dev machine, then use sqlite3 command to create a .db file?)
-----------------------------------------------------Update---------------------------------------------------------
Actually, I think there is a compilation error:
Apr 1 17:51:56 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1048]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link â/legato/systems/current/apps/testsql/read-only/lib/libsqlite3.soâ to '/legato/systems/current/appsWriteable/testsql/lib/libsqlite3.s
the sqlite3 library didnt get linked successfully I guess?
Iâm using VSCode BTWâŚ
You can try to create the database in /tmp folder
I actually have tried manually to create a db in data/Database/internal.db, but it didnt work.
I just found out VSCode doesnât prompt compilation errors.
I intentionally removed the â;â after LE_INFO("Successfully Created ") and the app was installed successfullyâŚ
Executing task: update /home/chenweiz/myWorkspace/testsql/Target_Legato_Debug/testsql.wp76xx.update <
Applying update from file â/home/chenweiz/myWorkspace/testsql/Target_Legato_Debug/testsql.wp76xx.updateâ to device at address â192.168.2.2â.
root@192.168.2.2âs password:
Unpacking package: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
Applying update: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
SUCCESS
Done
You need to bundle it in .adef file
I think I already did, did you mean to add another line here?
bundles:
{ file: { [r] third-party/lib/libsqlite3.so /lib/ }}
something I just found very strange is that, the app that had been reinstalled on the device over and over again through VSCode was not the ones I modified, it just keeps reinstalling the very very original version of code despite of the changes I have made and savedâŚ
Maybe you delete the original one first
I think I got it running now. I figured out I have to compile it using leaf profile with legato version 18 and <= 19, otherwise I ran into the compilation errors. However, with legato 18 I canât run my other apps(especially the one with SMS APIs), it gave me:
Client (uid 1027 âappsmsAppâ, pid 14241) disagrees with server (uid 0 ârootâ, pid 1665) on max message size (205 vs. 201) of
I know that error is caused by the mismatch of leaf profile and firmware version, but how could I use both splite3 db and SMS APIs in one app though?
This is my firmware version: SWI9X06Y_02.35.02.00 5208b3 jenkins 2020/06/10 00:30:12
Legato version: 19.11.2_625c7d1acfd1ca45b2dbe189b4cb1ce7_modified
so far I have tested the following SDKs:
Leaf profiles that can compile sqlite3 but incompatible with smsApp:
p1_red77_18: swi-wp77_2.0.0 â SDK for WP77 (Release 11 + Legato 18.09.2)
p1_red77_R91_19: swi-wp77_1.9.0 â SDK for WP77 (Release 9.1 + Legato 19.01.0)
Compatible with smsApp, but canât compile sqlite3:
swi-wp77_1.11.0 â SDK for WP77 (Release 9.1 + Legato 19.04.0) â wp77xx,dev
swi-wp77_5.0.1 â SDK for WP77 (Release 14.1 + Legato 19.11.5) âlatest,wp77xx,stable
swi-wp77_4.0.0 â SDK for WP77 (Release 13 + Legato 19.11.2) â wp77xx,stable
You need to figure out why there is compilation error when legato version >19
Or you can compile other app with legato 18
BTW, I donât see problem to compile my testsql application with WP76 R13 which is using legato 19.2.0.
Hi,
I am currently trying to install sqlite3 on mangoh red with a wp76 following Ankitaâs instructions but I canât run the makefile.
By reading the different answers on this subject i have the impression that my problem comes from the toolchain, more precisely from the makefile line :
âexport TOOLCHAIN_DIR:=/opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabiâ
I donât understand what modification do i need to do to correct this issue and add sqlite3 to my application.
This is my leaf profile :
And this is my error :
Can someone please help me because i am new with mangoh Red and databases.
Regards,
Baptiste
seems you did not install the R9 toolchain in /opt/swi:
owner@ubuntu:~$ ls /opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
/opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc


