Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-17-2011, 04:32 PM
|
#1
|
|
LQ Newbie
Registered: Nov 2011
Posts: 1
Rep: 
|
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
|
|
|
|
11-17-2011, 04:48 PM
|
#2
|
|
Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,817
|
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.
|
|
|
|
11-17-2011, 04:51 PM
|
#3
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 14,938
|
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 ...
|
|
|
|
11-18-2011, 05:00 AM
|
#4
|
|
ELF Statifier author
Registered: Oct 2007
Posts: 648
Rep: 
|
Quote:
Originally Posted by kaduu
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
|
If you are lucky (== both distributions have nearly same libraries), then you can just copy your application and it will work.
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
|
|
|
|
11-18-2011, 09:41 AM
|
#5
|
|
Senior Member
Registered: May 2005
Location: boston, usa
Distribution: fc-12/ fc-11-live-usb/ aix
Posts: 2,664
|
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
the major difference 'tween redhat based distros and debian based distros is the package manager; how the system downloads and installs programs (yum *.rpm vs. apt-get *.deb)
|
|
|
|
11-18-2011, 02:26 PM
|
#6
|
|
ELF Statifier author
Registered: Oct 2007
Posts: 648
Rep: 
|
Quote:
Originally Posted by schneidz
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
the major difference 'tween redhat based distros and debian based distros is the package manager; how the system downloads and installs programs (yum *.rpm vs. apt-get *.deb)
|
It's not correct. First, for any Linux executable exist minimal kernel version required to run it. In your example it's 2.6.32 Dbus launch-will not run on an system with kernel < 2.6.32
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.
Last edited by Valery Reznic; 11-18-2011 at 03:00 PM.
|
|
|
|
11-18-2011, 02:37 PM
|
#7
|
|
Member
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows xp
Posts: 776
Rep:
|
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?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:14 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|