Crystal 1.12.1 + CentOS7 - undefined reference to `__gmpf_cmp_z'

Hello, I updated Crystal on CentOS7 to the 1.12.1 and when I run my crystal script, this error occurs:

B-igF-loat.o0.o: In function `<=>':
/usr/share/crystal/src/big/ undefined reference to `__gmpf_cmp_z'
collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /home/monitor/.cache/crystal/crystal-run-snow_notify.tmp  -rdynamic -L/usr/lib64/crystal -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lgmp -lpcre2-8 -lgc -lpthread -levent   -lrt -lpthread -ldl

GMP details:

# yum list installed | grep gmp
gmp.x86_64                  1:6.0.0-15.el7    @anaconda                         
gmp-devel.x86_64            1:6.0.0-15.el7    @xxx
gmp-static.x86_64           1:6.0.0-15.el7    @xxx

From what I can tell, this symbol was added in GMP 6.1.0. So likely just need to upgrade?

FWIW CentOS7 was EoL like almost 4 years ago, so might be worth getting on a more up to date OS.

Ref: CentOS |

1 Like