Gcc cannot find -lm, -lc

I am compiling C code from another person, using gcc
and getting error messages

/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lc

This is in a new install of RHEL 8.4.

How to resolve this problem?