Hey @sergey-safarov ,
So this was a weird one. For ubuntu it builds fine as it was. For testing i used `rockylinux` which is a flavour of RHEL and found that it produced the same error as yours.
After debugging, a lot of...., i found that for some reason cmake was quoting the `${PERL_C_EXTRA_FLAGS}` and so compiler error out. I'm not sure why it happened or if this a very specific bug on cmake on RHEL based.
I transformed the string to list for now and it seems to work correct and appending correctly. There is a duplication of flags here since perl is already compiled with those but i guess it's correct still.
Can you maybe verify this and i ll probably adjust the fix to be rhel specific or if it works for most OS leave it as is.