Independent Developer Kit

Innovate on the Roku platform. Reimagine your TV.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Corendos
Level 7

Error in the documentation about dynamic libraries

Jump to solution

Hello everyone !

In the IDK (version 11.0.811), the documentation says :

+ lib: This is the default library directory in which we will search for any required shared libraries. You can customize search path with manifest entry idk_lib_path

However, whatever I try I get the following error:

pkg_/sample: error while loading shared libraries: libXXX.so: cannot open shared object file: No such file or directory

This is what I tried:

  • Setting the "idk_lib_path" explicitly to "lib/", "/pkg:/lib/"
  • Putting the "libXXX.so" in the "/pkg:/lib/" and "/pkg:/" folder
  • Setting the runtime path explicitly in the executable ELF file with "-Wl,-rpath=/pkg:/lib"

Unfortunately, nothing seems to work. I successfully managed to load the library with "dlopen" but that's not quite equivalent and I would like to not rely on it.

Is this a known issue or am I missing something ?

Thanks for your help !

0 Kudos
1 Solution

Accepted Solutions
Corendos
Level 7

Re: Error in the documentation about dynamic libraries

Jump to solution

Small updates for people looking for a solution :

It appears that the correct path to give to the linker is "/pkg_/lib" (Note the underscore replacing the colon).

Putting your dynamic library in the "lib/" folder of the package and setting the runtime path of the ELF executable to "/pkg_/lib" using "-Wl,-rpath=/pkg_/lib" will do the trick.

View solution in original post

0 Kudos
1 REPLY 1
Corendos
Level 7

Re: Error in the documentation about dynamic libraries

Jump to solution

Small updates for people looking for a solution :

It appears that the correct path to give to the linker is "/pkg_/lib" (Note the underscore replacing the colon).

Putting your dynamic library in the "lib/" folder of the package and setting the runtime path of the ELF executable to "/pkg_/lib" using "-Wl,-rpath=/pkg_/lib" will do the trick.

0 Kudos