Find the answer to your Linux question:
Results 1 to 6 of 6
Hi all, Will be developing a daemon for Linux systems which will unfortunatley be proprietary. I would love to make it open source, but alas my company and I do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    3

    Portability of binaries between various linux distro's


    Hi all,

    Will be developing a daemon for Linux systems which will unfortunatley be proprietary. I would love to make it open source, but alas my company and I do not agree on this matter. This brings me to my question. How portable will a binary version of the application be between various linux distro's and installations? Also, what could I do to improve/ensure this portability. As I am rather new to Linux development I have no idea as to what hurdles lay ahead in such an endevour.

    Thanks for any assistance.

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Portability depends on the language you use, the libraries you link to, the packaging system you use, and any number of other things. The only way I can think of to make something truly portable (meaning no recompilation at all) is to do it in Java.

    Barring that, make sure your code is ANSI standard, that you link only to libraries that are very common and therefore likely to already be installed on your target machines, and insist on manual compilation (or a generic shell script) rather than any particular packaging scheme to install it.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  3. #3
    Just Joined!
    Join Date
    Feb 2006
    Posts
    3
    Thanks for the help, but unfortunately Java poses a bit of a problem. I will be needing access to the systems hardware for various tasks, such as obtaining the MAC address. This is, to the best of my understanding, not possible with Java.

  4. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by Greebocat
    Thanks for the help, but unfortunately Java poses a bit of a problem. I will be needing access to the systems hardware for various tasks, such as obtaining the MAC address. This is, to the best of my understanding, not possible with Java.
    I would do a bit more research before counting Java out. I've not dealt with accessing network hardware in Java, but you might be surprised.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  5. #5
    Linux User DThor's Avatar
    Join Date
    Jan 2006
    Location
    Ca..na...daaa....
    Posts
    319
    Of course, speed may be a concern for some apps, which makes Java an issue.

    Typically most apps can be compiled only being concerned about the version of gcc you're using. If you anticipate people running older systems, I'd consider running a 2.9x version from RH7.3, although of course this is becoming less and less relevant with each passing year, to say nothing of the fact that this compiler had major issues and your code may not compile trivially. After that, if you compile, say, a version with gcc3.2 and gcc3.4, that would cover a pretty wide range of platforms. TM is right in that there could well be lots of other issues that enter into this, but for most apps IMHO this covers an awful lot of endusers. We run a very sophisticated app here that compiles along those lines and it's run under numerous distros(even those not featuring those specific versions of gcc) without troubles.

    DT

  6. #6
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    You can do anything in Java that you can do in C, just not as fast.

    How is this possible? Through the Java Native Interface.

    Example:
    Code:
    public native String getMacAddress();
    java.sun.com has a great tutorial on using the native interface.
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •