Asterisk trap invalid opcode issues when building with different CPU


I have the special case of building Asterisk on an AMD Ryzen machine, but running it on an Intel Xeon system.

This results in issues like the following ones:
asterisk[676328] trap invalid opcode ip:7f898fa1db3e sp:7f8976b4b310 error:0 in[7f898fa1d000+4000]

asterisk[1580556] trap invalid opcode ip:7fa570594f83 sp:7ffdf4700580 error:0 in[7fa57058e000+a000]

My assumption is that this happens due to the compiler taking some optimizations which are just working on the AMD machine.

Is there a workaround for this, or is the only proper workaround to build and run on an as similar as possible machine?

Turn off the BUILD NATIVE option. You may also have to specify an explicit, lowest common denominator, architecture, but I’m not sure of the details, never having done it.

Thanks! Disabling BUILD_NATIVE fixed the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.