Independent Developer Kit

Learn how to innovate on the Roku platform with the Independent Developer Kit. Reimagine your TV with Roku app development! Join the community for help.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Corendos
Reel Rookie

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
Reel Rookie

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
Reel Rookie

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.