“Illegal instruction” when run precompiled program on other machine
问题 I have to build my program on CentOS 7 and deploy on other Linux machine. The program required newer version glibc , and some library which was not (and will not be) installed on target machine. So I decided to ship the executable with dynamic library. I used patchelf to patch interpreter and rpath . I tested the executable on my machine and it work (also checked with ldd to make sure new rpath is used). But when I copy to other machine with libs, the program is failed to run. Only this line