Current code call canonicalize_file_name without prior declaration in system with musl libc. Thus the return value of canonicalize_file_name is truncated from char* to int. Use realpath instead. Fix #25531