Hi, I'm reposting because the message disappeared for a reason I can't explain.
Maybe an unseen captcha?
If not, I hope you didn't think it was a troll, or that there was nothing personal, or that someone wasn't afraid of technical information
(last time nobody bothered to reply to my offer of help with the packaging... maybe the response was also lost).
Or maybe the compilation flags are "confidential" information

.
I hope not.
In any case, the "illegal instruction" error is certainly not due to an installed network printer.
---
Hi, same problem on Rpi Zero WH here.
This is a well-known problem when using certain compilation flags.
The main differences here is the instruction set of the cpus in use.
Overview of RaspberryPi architectures:
5: ARMv8.2
3B, 3B+, 2B 1.2: ARMv8
2B: ARMv7
1A, 1A+, 1B, 1B+, Zero WH: ARMv6
Note that Rasbian targets the ARMv6 instruction set for the greatest compatibility (Debian ARM targets ARMv7).
Here, with version 3.20 of convert-escp2, gdb crashes with "illegal instruction" on the first assembly instruction of main(): movw, which is unknown on ARMv6 platforms.
Your binaries at least up to 3.16 worked on ARMv6.
You seem to be using flags like -O3, -Ofast or --ffast-math, so you're giving the compiler the information that the program is likely to run on THIS particular machine, and you allow it to generate aggressively optimized code that it will not be able to guarantee as "safe" in all situations.
Some optimizations will attempt to detect the instruction set of the CPU on which the program will run.
Obviously, we're not talking about the mtune, march or mcpu flags here, but it's a well-known fact that the use of such optimization flags (especially Ofast or ffast-math) should only be carried out in carefully studied and benchmarked use cases, in order to define whether the advantage is real and the calculations do not become erroneous, and all this on a rigorously written and mastered code base (things that break are often doubtful in the first place).
Most of the time, the code generated will be faster (but not always), but will frequently take longer to compile and even more memory to execute.
These optimizations may be worthwhile in very limited use cases, but they take you far away from a guaranteed compatibility on the platforms you're aiming for.
If the CPU is of a certain version (probably known only to the manufacturer, or it's a rebranded CPU as found on some non-genuine RaspberryPi) to break this compatibility.
I don't think these flags will be useful for the various retroprinter projects that don't do intensive calculations based on spaceship trajectories, celestial mechanics or AI...
The compiler won't make the code faster if it's badly written (or only to a limited extent).
In short, it's generally not something you want. Debian uses -O2 by default for all its programs.
TL;DR: Try an -O2 compilation :p
It will be understandable if you feel that exotic configurations are not your target.
Regards