I am using MangOH green with WP76 module, I have a application which use shared library files to fetch the data from client devices. The shared library file is compiled for arm7 architecture. Able to compile the code successfully but while executing the app it is throwing the below mentioned error
“error while loading shared libraries: Internal Error”
Getting one warning message while compiling also
"
/home/wimate/.leaf/wp76-toolchain_SWI9X07Y_02.37.10.04-linux64/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/7.3.0/real-ld: warning: ld-linux-armhf.so.3, needed by /home/wimate/Sierra_Wireless/Trial_Sierra/components/melpcnc//libcustom_Arm.so, not found (try using -rpath or -rpath-link)"
Please let me know how to solve this warning and what could be the cause for that internal error?
For the warning, did you try to put liblinux-armhf.so.3 in the same location as
libcustom_Arm.so while compiling?
Or here shows you might need to copy the required libraries in /sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/
For running the app, did you put the required libraries (liblinux-armhf.so.3) in the module /usr/lib folder?
Here says “The dynamic linker will typically look in the /lib and /usr/lib directories for libraries at runtime.”
You might need to enter the following to copy libraries to this folder:
mkdir /tmp/tmp_usr_lib;mkdir /tmp/tmp_usr_lib_wr;
mount -t overlay overlay /usr/lib -o lowerdir=/usr/lib,upperdir=/tmp/tmp_usr_lib,workdir=/tmp/tmp_usr_lib_wr;
Hi i have tried it earlier there was an error couldn’t open shared library file. Now it is solved and there is no warning while compiling the code, Still facing the same issue
“error while loading shared libraries: /lib/libcustom_Arm.so: internal error”
Please find the library file details below
libcustom_Arm.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=7aac04ea29ab20ac8de64e31d9295, with debug_info, not stripped
It is shared by client, they are using the same library file in Raspberry pi and Debian10.10. Due to some issue with Raspberry pi they want the system to migrate for sierra device
My .cdef file
// myfirstappComponent
//
// This is component definition file that specifies the internal content and external interfaces
// of reusable software components.
//
// For more details on the component definition (.cdef) file format see:
// Component Definition .cdef - Legato Docs
// Bind resources from the target module into your application.
requires:
{
component:
{
${LEGATO_ROOT}/components/3rdParty/paho.mqtt.c
}
// IPC APIs used by this component.
api:
{
le_data.api
}
// File paths local to your target module.
file:
{
/usr/lib/libssl.so.1.0.2 /lib/
/usr/lib/libcrypto.so.1.0.2 /lib/
/lib/libutil.so.1 /lib/
[rx]/home/root/lib_custom/libcustom_Arm.so /lib/
[rx]/home/root/lib_custom/ld-linux-armhf.so.3 /lib/
}
// Directories on your target module to make accessible to the app.
dir:
{
}
// Linux filesystem device paths.
device:
{
}
// Shared libraries pre-installed on the module.
lib:
{
libpaho-mqtt3cs.so
libcustom_Arm.so
ssl
crypto
}