I happen to install model sim VHDL simulator on Linux. The manual says it only supports RedHat or Suse, but I just tried to install it on Ubuntu. And, I could install it without any problem.
- Is linux binary universal to all kinds of distribution? I mean, if I make a program on distrubution A, can I be sure it will run on any linux?
- Why most of the commercial program vendor says the program is running on specific distribution? (mostly Redhat and Suse, not ubuntu)
This is two questions:
Is a Linux binary universal to all distributions?
It depends:
Why do many commercial programs say that they only work on one or a few distributions?
Because there is a very large number of Linux distributions, and nobody wants to test their program on all of them.
A commercial vendor will normally say that they support only the distributions they have tested their software on. It may or may not work on other distributions, from the vendor's perspective the point is just that you can't complain if it does not work on a distribution they don't support.
Which distributions are selected for testing depends on what the vendor expects their customers to be using. Commercial/professional programs commonly pick enterprise distributions, possibly through a reasoning similar to "people who paid for their OS are more likely to pay for our software", possibly simply by counting the distributions used by their existing customers.
See also Mark Shuttleworth (the guy that is the reason we have an Ubuntu in the first place) on binary compatibility between Ubuntu and Debian - Debian is the closest distribution relative of Ubuntu.
Both RedHat and SUSE have long enterprise Linux tradition and managed to get those packages produced and tested for them. As time passes, there will be more examples of packages that have been tested to work on Ubuntu. In fact, many such packages since last year come as tested to work with Ubuntu. As Canonical makes agreements with more vendors, there will be more Ubuntu-certified packages.
For your first question: If you want to make a program that runs on all distributions, create a static (compared to dynamic) executable. A
statically-linked
executable does not depend on the system libraries, therefore can work between distributions, as long as the architecture (such as Intel/AMD) is the same.Here is a program,
Let's compile as normal,
So, what can you do with that VHDL program? Get the .rpm file and convert it to .deb using alien. Then, install. If it worked, you are ok. If it does not work, use
ldd
to figure out which library file is missing. On the worst case scenario, create a virtual machine for those other Linux distributions and run the program there.I second j-g-faustus' reply, but, you also need to be careful about the package format. Even if the executables themselves are portable and all necessary libraries are present, different distros put files in different places and use different tools to manage installed packages.If the vendor packages their product as an RPM package, you will have to use a package like 'alien' to convert and install it under a DEB based distribution like Ubuntu.
If they distribute their software as source code, then you may also be able to compile it yourself, at which point the executable will be tailored for your specific system (but the ubuntu package manager won't know about it).