My program can't work on redhat enterprise AS 4 - Linux

This is a discussion on My program can't work on redhat enterprise AS 4 - Linux ; hello all: I have a puzzle now. my program compiled on Fedora 7, version of kenel is 2.6.20-2925.9.fc7xen, but when I run it on our sever, wich is runing Redhat enterprise as4 whose kernel version is 2.6.9-42, it doesn't work, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: My program can't work on redhat enterprise AS 4

  1. My program can't work on redhat enterprise AS 4

    hello all:
    I have a puzzle now. my program compiled on Fedora 7, version of
    kenel is 2.6.20-2925.9.fc7xen, but when I run it on our sever, wich
    is runing Redhat enterprise as4 whose kernel version is 2.6.9-42, it
    doesn't work, and floating point exception happened, however,
    strangely the program work normally in my machine(fedora7). what's
    wrong with it? something about kernel, gcc? My program is a network
    server program.
    thanks in advance, I'm confused with it for two days, please help me.


  2. Re: My program can't work on redhat enterprise AS 4

    Peter wrote:
    > I have a puzzle now. my program compiled on Fedora 7, version of
    > kenel is 2.6.20-2925.9.fc7xen, but when I run it on our sever, wich
    > is runing Redhat enterprise as4 whose kernel version is 2.6.9-42, it
    > doesn't work, and floating point exception happened, however,
    > strangely the program work normally in my machine(fedora7). what's
    > wrong with it? something about kernel, gcc? My program is a network
    > server program.
    > thanks in advance, I'm confused with it for two days, please help me.


    It usually isn't a good idea to simply copy a compiled program
    from one machine to another. There are lots of things that can
    go wrong. If the architectures aren't identical it won't work
    all. Then there could exist different versions of the libraries
    required by the program (which can be avoided by static lin-
    king but which has it's own drawbacks). Finally, if you have
    similar but slightly different processors and compiled with
    optimizations for the process on the first machine you're
    also getting into trouble. The only thing which is rather
    unlikely to make a difference is the kernel version.

    So the best way to solve your problem is compile the program
    on your server. Otherwise you have to make sure that all nee-
    ded libraries have the same versions on both machines (or use
    static linking). If the processor types aren't identical on
    both machines but similar (like having a Pentium M on one and
    a Pentium III on the other machine) make sure that you compile
    with optimization for only the smallest common denominator (and,
    if you resort to static linking, also the libraries were com-
    piled that way). Or you have to set up a cross-compiler for
    the target machine.

    BTW: if you think that your post is relevant to two or more
    dfferent newsgroups please crosspost instead of posting in
    all the groups individually. That way one can see the replies
    made in all the groups. But normally you should only post in
    a single group, crosspost only if you're absolutely sure it
    makes sense.
    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  3. Re: My program can't work on redhat enterprise AS 4

    jt@toerring.de (Jens Thoms Toerring) writes:
    > Peter wrote:
    >> I have a puzzle now. my program compiled on Fedora 7, version of
    >> kenel is 2.6.20-2925.9.fc7xen, but when I run it on our sever, wich
    >> is runing Redhat enterprise as4 whose kernel version is 2.6.9-42, it
    >> doesn't work, and floating point exception happened, however,
    >> strangely the program work normally in my machine(fedora7). what's
    >> wrong with it? something about kernel, gcc? My program is a network
    >> server program.
    >> thanks in advance, I'm confused with it for two days, please help me.

    >
    > It usually isn't a good idea to simply copy a compiled program
    > from one machine to another.


    I 'usually' copy compiled programs between computers running different
    Linux-distributions on different x86-processors (for instance, because
    I don't necessarily have all of the development infrastructure
    available on some production server) and have yet to encounter a
    problem with doing so (since 2000). Except if a program is purposely
    developed such that it is tied to a particular computer, there
    shouldn't be any issues wrt 'binary compatibility between different
    Linuxen'.

+ Reply to Thread