I cannot run my programs on different platforms. For example I cannot run a program on an x86_64 Linux if the program has been created on an i686 Linux platform. Besides if I run "pkg" command without any commands, it creates 3 files for each 3 platform (macos, win, linux) but again I cannot run them on different platforms. I get a "Segmentation Fault" error or a "cannot execute binary file : Exec format." error.
I converted my NodeJS app into an exe with PKG on MacOS (x64). I get a "Segmentation fault" on a x86_64 Linux (CentOS) and "cannot execute binary file : Exec format error" on a i686 Ubuntu.
It is not possible to compile a binary that runs cross platform.
Segmentation fault had happened to me after I used FTP to deploy binaries on server due to ASCII transfer mode. I'd recommend not to use FTP for apps deploying to prevent any possibility of that kind of error.
Most helpful comment
Segmentation fault had happened to me after I used FTP to deploy binaries on server due to ASCII transfer mode. I'd recommend not to use FTP for apps deploying to prevent any possibility of that kind of error.