Subject: Is it possible to compile on one Linux and run on another
Linux?
Usually, different Linux version will have a lot of libraries version
changed (Of course, I just mean the situation that both environments
have related libraries, but version changed.). So is it possible to
compile on one Linux and run on another Linux?
If it's impossible or very hard, then how could so many products which
only provide one binary for installation and can be installed on
several systems like Redhat4 and Redhat5?
How they achieved this? Or what shall we do to ensure that? I have
tried, it seems normal dynamic/static link is not the right solution.
|
|
0
|
|
|
|
Reply
|
billdavidcn (24)
|
9/19/2008 12:18:39 PM |
|
On 2008-09-19, Bill David <billdavidcn@gmail.com> wrote:
> Subject: Is it possible to compile on one Linux and run on another
> Linux?
As long as they have the same architecture and reasonably closer
libraries versions.
Davide
--
PC's are designed by a committee of people who are in different companies
in different countries and who never talk to each other.
And nobody speaks the same language and they hate each other...
-- Derick Siddoway & Chris Adams
|
|
0
|
|
|
|
Reply
|
davideyeahsure (1281)
|
9/19/2008 12:19:33 PM
|
|
On 2008-09-19, Davide Bianchi <davideyeahsure@onlyforfun.net> wrote:
> On 2008-09-19, Bill David <billdavidcn@gmail.com> wrote:
>> Subject: Is it possible to compile on one Linux and run on another
>> Linux?
>
> As long as they have the same architecture and reasonably closer
> libraries versions.
They don't have to be the same architecture or have the same
library versions if you've installed a cross-compiler and the
proper target libraries.
--
Grant Edwards grante Yow! I like your SNOOPY
at POSTER!!
visi.com
|
|
0
|
|
|
|
Reply
|
grante (5411)
|
9/19/2008 2:07:56 PM
|
|
On Fri, 19 Sep 2008 05:18:39 -0700, Bill David wrote:
> Subject: Is it possible to compile on one Linux and run on another
> Linux?
>
> Usually, different Linux version will have a lot of libraries version
> changed (Of course, I just mean the situation that both environments
> have related libraries, but version changed.). So is it possible to
> compile on one Linux and run on another Linux? If it's impossible or
> very hard, then how could so many products which only provide one binary
> for installation and can be installed on several systems like Redhat4
> and Redhat5? How they achieved this? Or what shall we do to ensure that?
> I have tried, it seems normal dynamic/static link is not the right
> solution.
Compile what? If you're talking about a simple program - yes. If you're
talking about the kernel - more problematic.
|
|
0
|
|
|
|
Reply
|
ray65 (5398)
|
9/19/2008 3:03:41 PM
|
|
It is possible, we do it at work, but it is not always easy. You may
have to carry some libraries with you.
i
On 2008-09-19, ray <ray@zianet.com> wrote:
> On Fri, 19 Sep 2008 05:18:39 -0700, Bill David wrote:
>
>> Subject: Is it possible to compile on one Linux and run on another
>> Linux?
>>
>> Usually, different Linux version will have a lot of libraries version
>> changed (Of course, I just mean the situation that both environments
>> have related libraries, but version changed.). So is it possible to
>> compile on one Linux and run on another Linux? If it's impossible or
>> very hard, then how could so many products which only provide one binary
>> for installation and can be installed on several systems like Redhat4
>> and Redhat5? How they achieved this? Or what shall we do to ensure that?
>> I have tried, it seems normal dynamic/static link is not the right
>> solution.
>
> Compile what? If you're talking about a simple program - yes. If you're
> talking about the kernel - more problematic.
--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/
|
|
0
|
|
|
|
Reply
|
Ignoramus18195
|
9/19/2008 3:08:10 PM
|
|
Bill David <billdavidcn@gmail.com> wrote:
> Subject: Is it possible to compile on one Linux and run on another
> Linux?
>
> Usually, different Linux version will have a lot of libraries version
> changed (Of course, I just mean the situation that both environments
> have related libraries, but version changed.). So is it possible to
> compile on one Linux and run on another Linux?
Compile with the -static switch, which prevents linking
with shared libraries, and the resulting executable
image is usually portable to other linux boxes, e.g.,
gcc -static program.c -lm -o program
builds program with any needed library routines statically
linked into the image.
--
John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
|
|
0
|
|
|
|
Reply
|
john42 (309)
|
9/20/2008 1:07:08 AM
|
|
On Sep 20, 9:07=A0am, JohnF <j...@please.see.sig.for.email.com> wrote:
> Bill David <billdavi...@gmail.com> wrote:
> > Subject: Is it possible to compile on one Linux and run on another
> > Linux?
>
> > Usually, different Linux version will have a lot of libraries version
> > changed (Of course, I just mean the situation that both environments
> > have related libraries, but version changed.). So is it possible to
> > compile on one Linux and run on another Linux?
>
> Compile with the -static switch, which prevents linking
> with shared libraries, and the resulting executable
> image is usually portable to other linux boxes, e.g.,
> =A0 =A0gcc -static program.c -lm -o program
> builds program with any needed library routines statically
> linked into the image.
> --
> John Forkosh =A0( mailto: =A0j...@f.com =A0where j=3Djohn and f=3Dforkosh=
)
I am sure I have try my best to link to libraries statically. But it
seems libraries I have static-linked have dynamically linked to other
dynamic libraries. Now, my program will complain that some libraries
with minor version number like 'libldap-2.2.so.7' can't be found
(because the existing ldap library has version number as 2.3.0).
I am afraid I have no choice but to deliver some libraries with my
program. Terrible thing.
|
|
0
|
|
|
|
Reply
|
billdavidcn (24)
|
9/22/2008 5:09:28 AM
|
|
|
6 Replies
25 Views
(page loaded in 2.751 seconds)
Similiar Articles: Possible to run Solaris binaries on Linux/Sparc? - comp.unix ...If you're just compiling on Solaris and running on Linux, you might ... compile under Solaris and run on Linux. I don't think that's (reliably) possible. WHy not compile ... mount xfs with 64kb blocksize - comp.os.linux.miscThus, compile and run this program to show you what page ... and while you're at it, develop another kind of ... ones I've read about were running GNU/Linux, it is possible ... Howto synchronize a ntp client (Linux) with a server running ...Howto synchronize a ntp client (Linux) with a server running ... of tests, I installed YATS (Yet Another ... an NTP client with a server running w32time? It is possible with ... Using/Porting C libraries from Windows to Linux - comp.unix ...It hasn't been that simple (or possible for all I know). ... :-( Get the lib's source code and compile it on Linux, then compile ... be recognized as object files/libraries by another OS. Safe script to kill processes - comp.unix.solarisA is used as a software server, and running other ... the fact that I can't upgrade the OS, is it possible ... ve no idea about if this source will directly compile on 2.5.1 ... Stand-alone compiled on 64-bit machine to run on 32-bit? - comp ...I now have another instance of Matlab running on 32-bit so I can distribute ... Stand-alone compiled on 64-bit machine to run on 32-bit? - comp ... Compile 32-bit ... Filemaker runs in Linux! - comp.databases.filemakerEditing structure is another issue. If it's one of your own ... and ask if this is something that is possible ... comp.lang ... 10 seconds under GNU/Linux running ... HP64000 ASM - comp.lang.asm.x86... PC and I'd like to know if it is possible to compile the file with a recent pc (windows, linux, ...) ? If not possible, is there something like a 64000 emulator (running ... netbackup (Veritas) question - comp.sys.sun.adminIs it possible to have a system (running netbackup, the veritas client) and collect data from another server, and push all the ... CCNA/CCDA Guy Powered by Linux ... Cross-compiler mex files on Windows 7 64 bit - comp.soft-sys ...... for mex it look like it is possible to cross-compile 32 ... MEX-files, then you need to 1) Start MATLAB with the -win32 flag. 2) Re-run ... find entry point in 64-bit linux ... compiling .exe in linux - LinuxQuestions.orgIt should run most win32 ... It is possible to cross compile on one platform an executable for another platform. For instance, with gcc on linux you could compile a ... How To Compile Linux Software With Debian Linux... files or the Linux kernel source code and compiling a ... In Linux, the make utility handles compiling and linking. When you run the make utility ... /whois another ... 7/29/2012 11:20:34 PM
|