undefined reference to `getentropy’

I was building software for an older target platform (Ubuntu 16.04 Xenial), when I got this one.

After some research I’ve figured that as the name suggests this call simply returns some random bytes, and the error occurs because the target platform has an older GLIBC version (2.23) than necessary (2.25) for this system call to be available.

The solution in my case was simply modifying the header of the software before re-building as it had alternative implementations for the call that was using getentropy. Had this not been the case I could have just emulated the call…

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.