How to compile Phobos with other D code to create a shared library?
Steven Schveighoffer
schveiguy at gmail.com
Wed Jun 2 17:49:49 UTC 2021
On 6/1/21 2:18 PM, data pulverizer wrote:
> Doing `Runtime.initialize` is working with Julia but not yet R, I'm
> getting a clock/GLIBC error
>
> ```
> Error in dyn.load("rbasic.so") :
> unable to load shared object 'code/rbasic.so':
> lib/x86_64-linux-gnu/librt.so.1: undefined symbol: __clock_nanosleep,
> version GLIBC_PRIVATE
> ```
>
> do I need to import anything else?
What's happening is that the dynamic linker is trying to resolve that
symbol, but cannot find it in the given library.
Try `ldd code/rbasic.so` and see if it tells you the things it is
looking for. Many times, you will see "Not found" or something and you
know what library to install/look for.
Otherwise, it might be that librt.so.1 seemed to have __clock_nanosleep
when it was built, but the librt.so.1 it is loading during runtime does
not have it. Are you building on one machine and then running on another?
-Steve
More information about the Digitalmars-d-learn
mailing list