Porting application from Redhat to Ubuntu
Hi,
Does anybody have any pointers on what are the steps necessary to be done to port an application from RedHat Linux to Ubuntu 10.04. For example can I take an application that is compiled on Redhat and run it directly on an Ubuntu box. I do understand that I would need to recompile the application on Redhat but was wondering if anybody has tried to run an app compiled one distro on another distro without recompiling. Also any pointers to articles which list info on porting from Redhat to Ubuntu. Thanks Kaduu |
There is really nothing to "port", the differences between distributions are not so great that you have to go through any special steps to make it work on a specific distribution.
The only issue you may have is if the application, when compiled on Red Hat, was built against libraries which are not the same version on Ubuntu. But this isn't really a difference in distributions exactly, as the same issue could come up when trying to use a program compiled for a newer version of a particular distribution on an older version of the same distribution. If course, if your application is compiled statically and doesn't link to any libraries in the system, then it won't matter. |
IF the processor is the same basic type eg x86 (intel/amd) and kernel is same base version eg 2.6.x and same bit size ie 32 or 64, THEN you can probably get away with copying the binary across from RH->Ubuntu.
Otherwise, copy the src and re-compile. For src code langs like bash, Perl etc, should be no problem anyway. FYI, RH has 'multi-lib', which means that a x86-64 OS also includes the libs for 32 bit and will use (ie be able to run an app) whichever is appropriate. Don't know about Ubuntu ... |
Quote:
If not you can re-build application on Ubuntu from source, as was chrism01 suggested, or use statifier (http://statifier.sf.net) or Ermine (http://magicErmine.com) to create on RedHat self-contained executable, that can be copied to any Linux distribution with recent enough kernel |
all linux executables should be able to run on any distribution. however a 32-bit kernel cant run a 64-bit program.
Code:
/usr/bin/dbus-launch: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped |
Quote:
Second - shared libraries. All needed shared libraries should be present on "target" distribution and those libraries should be compatible with libraries that your executable was linked against during build time. There are times when both of those conditions are satisfied and then executable will happily run on "foreign" distribution. But there are also times when they are not. |
Bring over the binaries might work but you might end of with endless amount of trouble with libraries, etc. Why not just get teh source code and compile it?
|
All times are GMT -5. The time now is 10:43 PM. |