Undefined reference to `getrandom' in GLIBC 2.26

Dear Support team,

I have a linker issue and hope you can help me.

I work with:
Colibri VF61
Linux BSP 2.8.6b

The used glibc version is 2.26

*** terminal output ****
ldd (GNU libc) 2.26
Copyright (C) 2017 Free Software Foundation, Inc

Now I get a linker error “undefined reference” with getrandom' (see error message below). .../sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libuuid.so : error : undefined reference to getrandom@GLIBC_2.25’

I try to use getrandom in my own application but i get also an undefinded reference error (see error message below).
error : undefined reference to `getrandom’

Can you help me to solve this issue?

Best regards

Hi @Andre !

I just tried to compile the following getrandom example that I found online:

Here are the steps I took after installing the toolchain and saving the getrandom source code as getrandom-test.c:

$ source environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi
$ ${CC} getrandom-test.c -o getrandom-test

The compilation was successful and I could run it using a container (important: I have already enabled virtualization with bin_fmt for ARM):

$ docker run --rm -it -v $(pwd):/getrandom/ --entrypoint=/bin/bash arm32v7/debian
# root@87af02ece012:/# ./getrandom/getrandom-test

Please share more details about your toolchain and compilation setup.

Best regards,

Thank you for the test source.
I can also compile the test source, with your description. In my opinion it is a problem with the path to the comiler on my site.

Hi @Andre !

That’s good!

Ok. Let us know how it goes. :slight_smile:

Best regards,