# Error while loading shared libraries: Internal Error

**URL:** https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286
**Category:** mangOH Green
**Created:** [May 9, 2023, 2:04pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286 "2023-05-09T14:04:22Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![aruna](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aruna](https://mangoh.discourse.group/u/aruna)
#### Post date: [May 12, 2023, 2:04pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/21 "2023-05-12T14:04:14Z")

</div>

Hi i have done it is able to load file,

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [May 12, 2023, 2:22pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/22 "2023-05-12T14:22:21Z")

</div>

See if it works for unsandboxed app

> [@Sandbox prevent file read?](https://mangoh.discourse.group/t/sandbox-prevent-file-read/6349/2):
>
> does it work when unsandboxed? You might see here on how to change the permission for accessing file outside sandbox:

Btw, which line in the lib is making the SMACK error?

---

<div class="post-metadata">

### Author: ![aruna](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aruna](https://mangoh.discourse.group/u/aruna)
#### Post date: [May 12, 2023, 2:46pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/23 "2023-05-12T14:46:12Z")

</div>

Hi ,

This is the error ,message i am getting

May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘myfirstappComponentExe’  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 102400.  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 102400.  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2550]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.  
May 12 20:14:10 swi-mdm9x28-wp user.err Legato: =ERR= | myfirstappComponentExe[2550] | myfirstappComponentExe: **error while loading shared libraries: libcustom\_Arm.so: cannot open shared object file: No such file or directory**  
May 12 20:14:10 swi-mdm9x28-wp user.info Legato: INFO | supervisor[876]/supervisor T=main | proc.c proc\_SigChildHandler() 2079 | Process ‘myfirstappComponentExe’ (PID: 2550) has exited with exit code 127.  
May 12 20:14:10 swi-mdm9x28-wp user.notice kernel: [192.186730] audit: type=1400 audit(1683902650.814:4): **lsm=SMACK fn=smack\_inode\_permission action=denied subject=“app.myfirstapp” object=“files1” requested=r pid=2550 comm=“myfirstappCompo” name=“libcustom\_Arm.so” dev=“ubifs” ino**  
May 12 20:14:11 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[876]/supervisor T=main | app.c app\_SigChildHandler() 4165 | Process ‘myfirstappComponentExe’ in app ‘myfirstapp’ faulted: Ignored.

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [May 12, 2023, 2:49pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/24 "2023-05-12T14:49:07Z")

</div>

See if it works for unsandboxed app

> [@Sandbox prevent file read?](https://mangoh.discourse.group/t/sandbox-prevent-file-read/6349/2):
>
> does it work when unsandboxed? You might see here on how to change the permission for accessing file outside sandbox:

Btw, which line in the lib is making the SMACK error?

---

<div class="post-metadata">

### Author: ![aruna](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aruna](https://mangoh.discourse.group/u/aruna)
#### Post date: [May 12, 2023, 2:50pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/25 "2023-05-12T14:50:55Z")

</div>

Followed same sandboxed is false,

tried by setting xattr also

May 12 20:18:58 swi-mdm9x28-wp user.info Legato: INFO | supervisor[876]/supervisor T=main | app.c CreateFileLink() 2183 | Skipping file link ‘/home/root/lib\_custom/libcustom\_Arm.so’ to ‘/legato/systems/current/appsWriteable/myfirstapp/lib/ libcustom\_Arm.so’: Already exists

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [May 12, 2023, 2:56pm UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/26 "2023-05-12T14:56:14Z")

</div>

What is the full error log for unsandboxed app

---

<div class="post-metadata">

### Author: ![aruna](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aruna](https://mangoh.discourse.group/u/aruna)
#### Post date: [May 24, 2023, 8:07am UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/27 "2023-05-24T08:07:35Z")

</div>

HI jyijyi,

Due to some emergency work i couldnt send the log data, please check the log data below, i have fixed the permission issues, no it is loading

Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | app.c CreateFileLink() 2253 | Created file link ‘/dev/urandom’ to ‘/legato/systems/current/appsWriteable/myfirstapp/dev/urandom’.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | resourceLimits.c GetCfgResourceLimit() 207 | Configured resource limit maxStackBytes is not available. Using the default value 0.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | proc.c proc\_Start() 1403 | Starting process ‘myfirstappComponentExe’ with pid 20029  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | supervisor.c SigChildHandler() 877 | Reaping unconfigured child process 20025.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘myfirstappComponentExe’  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 102400.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 102400.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[20029]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.  
**Jan 6 07:26:06 swi-mdm9x28-wp user.err Legato: =ERR= | myfirstappComponentExe[20029] | myfirstappComponentExe: error while loading shared libraries: /legato/apps/7618ecbb168bc980d0c4f2cca97a086e/read-only/bin/…/lib/ libcustom\_Arm.so: internal error**  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | proc.c proc\_SigChildHandler() 2079 | Process ‘myfirstappComponentExe’ (PID: 20029) has exited with exit code 127.  
Jan 6 07:26:06 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[873]/supervisor T=main | app.c app\_SigChildHandler() 4165 | Process ‘myfirstappComponentExe’ in app ‘myfirstapp’ faulted: Ignored.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | app.c app\_StopComplete() 4862 | app ‘myfirstapp’ has stopped.  
Jan 6 07:26:06 swi-mdm9x28-wp user.info Legato: INFO | supervisor[873]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘myfirstapp’ has stopped.

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [May 24, 2023, 8:30am UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/28 "2023-05-24T08:30:20Z")

</div>

do you know why there is a space character just before “libcustom\_Arm.so”?

**/legato/apps/7618ecbb168bc980d0c4f2cca97a086e/read-only/bin/…/lib/ libcustom\_Arm.so: internal error**

You also get this space character here:

> [@Error while loading shared libraries: Internal Error](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/25):
>
> Followed same sandboxed is false, tried by setting xattr also May 12 20:18:58 swi-mdm9x28-wp user.info Legato: INFO | supervisor[876]/supervisor T=main | app.c CreateFileLink() 2183 | Skipping file link ‘/home/root/lib\_custom/libcustom\_Arm.so’ to ‘/legato/systems/current/appsWriteable/myfirstapp/lib/ libcustom\_Arm.so’: Already exists

Normally for this message of “Skipping file link…”, you should not have this space character:

> **[Wp77 gpsApp gives libssl.so.1.1 error](https://forum.legato.io/t/wp77-gpsapp-gives-libssl-so-1-1-error/6503)**
>
> Hello, I have a mangoH yellow device. I was able to successfully build and install sample gpsApp from legato-af. But now I have another problem which gives me this as an output. I am guessing something to do with versions. Urgent help needed....

---

<div class="post-metadata">

### Author: ![aruna](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aruna](https://mangoh.discourse.group/u/aruna)
#### Post date: [May 24, 2023, 9:05am UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/29 "2023-05-24T09:05:50Z")

</div>

sorry when i tried to make bold it has happened, earlier i made only file name then changed whole line

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)
#### Post date: [May 24, 2023, 9:41am UTC](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286/30 "2023-05-24T09:41:24Z")

</div>

I diff your libcustom\_Arm.so and standard library like libssl.so.1.0.2 , it seems to be a bit different to a normal library, not sure if it is related to the **internal error** when loading the library:

**libcustom\_Arm.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=7aac04ea29ab20ac8de64e31d9295, with debug\_info, not stripped**

```auto

owner@ubuntu:~$ file /opt/swi/y22-ext/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libssl.so.1.0.2 
/opt/swi/y22-ext/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libssl.so.1.0.2: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=8ec623fe775f879f2a4e32cad24d38ee7bc4e71e, stripped

```

BTW, here has an example on how to load 3rd party library libsqlite3.so in the application, it should be similar to your situation.  
You can see whether it has problem to load the 3rd party libarary.

> [@Database Support](https://mangoh.discourse.group/t/database-support/93/15):
>
> Hi Nila , Please download the Source code present [https://sqlite.org/download.html](https://sqlite.org/download.html) i.e sqlite-amalgamation-3190300.zip Make a folder structure for Sqlite3 as mkdir third-party cd third-party mkdir inc mkdir src mkdir lib Copy sqlite3.h in third-party/inc/ sqlite3.c in third-party/src/ Create a Makefile in path third-party/src/ vi Makefile add following lines export TOOLCHAIN\_DIR:=/opt/swi/y17-ext/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi GCC = ${TOOLCHAIN…

[testsql.7z](https://mangoh.discourse.group/uploads/short-url/tn2oWXZ1erj0pYtLXb8huriztPx.7z) (2.8 MB)

If it works, try to port your code to this application

[Previous page](https://mangoh.discourse.group/t/error-while-loading-shared-libraries-internal-error/10286.md?page=1)
