So I managed to compile with cmake3 on Centos 6+ but trying to do the same on ClearOS, I am geting an error that g++ must be 5.1 or above?
My plan is to upload the compiled centos program to the clearos and see if it runs?
Thanks!
So I managed to compile with cmake3 on Centos 6+ but trying to do the same on ClearOS, I am geting an error that g++ must be 5.1 or above?
My plan is to upload the compiled centos program to the clearos and see if it runs?
Thanks!
Your binary should run on other Linux distros as long as its requirements are met (which only you can know). There might be problems if you (or the compiler) use new features from the libraries or the kernel.
But if both distro versions have been released at a similar time then I would not expect problems.
A binary running in CentOS is supposed to run in other Linux distributions also provided processor architecture (x86 or x86-64 etc) is same.
Some other condition to consider is shared libraries. If the program is build with static libraries it'll definitely work on any other Linux distributions on same architecture. However, most of the program nowadays build with dynamic Libraries. In that case the required libraries must be present in both systems.
In my experience same executable binary of simple terminal based programs like vim, nano, top etc works in all Linux distributions although they use shared libraries. Because most Linux distributions manage some libraries in similar way.
The error you're getting is probably due to shared library. It may so happen that the program is compiled against a higher version of glibc or other libraries which is absent in destination system.