As apt-get cmake's version is old so I had to download and install a new version of cmake by myself.
I ran make
after running the ./bootstrap
command, then it showed error:
/usr/bin/ld: cannot find /usr/lib/libc_nonshared.a.
However, I couldn't find any libc_nonshared.a
on my server, seemed like it was a quite old library.
I tried multiple cmake versions (3.25.1, 3.28.4, 3.29.0...) and they all required that static lib.