LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Possible to compile applications for a different system? (https://www.linuxquestions.org/questions/linux-newbie-8/possible-to-compile-applications-for-a-different-system-666569/)

Daravon 08-30-2008 09:16 PM

Possible to compile applications for a different system?
 
I have an old laptop with no internet connection. It's running DSL. So it's kernal 2.4. I want to install the program feh.

Is there any way that I can compile feh on my normal Hardy Heron desktop computer, so that I can just put it on a flashdrive and copy it to my laptop?

I don't suppose I can apt-get install feh on my Hardy Heron desktop, and copy the files over, because apt would install an feh that won't run on the DSL installation. But I really don't know how all this stuff works.

jiml8 08-30-2008 09:41 PM

I don't know what feh is so I can't give a definitive answer.

You more than likely can do what you want, if you deploy a development environment that is compatible with the 2.4 kernel that is on the target system.

Doing this would be non-trivial, but *should* be possible. You will have to find the gcc sources (or else a binary that will run on your system) that are old enough to go with a 2.4 kernel, and you also would have to locate all the relevant libraries. Then you would have to set up an appropriate environment, and go for it. Probably this would be a lot of work.

Seems to me it would be easier to update the laptop using a CD or DVD.

pinniped 08-30-2008 09:51 PM

It's possible (and people do it all the time) but it's not trivial; if you've never done it before, give yourself about a month to learn how to do it.

Basically, you need to build the libc and other libraries that you'll use on DSL on your other computer - but before you do that you need to build a cross-compiler (even if the target CPUs are the same). The reason for building the cross-compiler is to ensure that the libs and so on are built to work with your 2.4 kernel (which you also have to build) and aren't accidentally 'contaminated' by libs on your build computer.

The easiest way is to set up PPP over the serial port so you can use another computer connected to the internet to provide internet on that notebook. If the notebook supports USB memory sticks, you can download and transfer files via the stick.

Daravon 08-30-2008 09:53 PM

How can I update the laptop using a CD/DVD, though? Do you mean update the OS to one that uses the 2.6 kernal?

DSL uses the 2.4 kernel and it always has and always will. I could change distros on the laptop and in fact I have tried, but for whatever reason the Puppy linux liveCDs wouldn't boot on the target laptop, even though they booted on my other system. I need a disto that can install onto a 1GB compact flash drive preferably with some to spare.

feh is a picture-viewing program. The laptop's sole purpose is showing slideshows of my photographs with feh.

pinniped 08-30-2008 10:02 PM

You don't have to change the kernel if there are packages made for DSL. You just need to get the packages (and dependencies) from the computer on the network and transfer it to the DSL computer - by USB stick or CD or whatever. You might also consider linking the laptop to your desktop via ppp, that way your DSL machine can get internet access whenever you connect via your desktop.

Valery Reznic 08-31-2008 02:24 AM

In order to move executable complied on one Linux disro to another you can use
statifier (http://statifier.sf.net) or Ermine (http://magicErmine.com)


All times are GMT -5. The time now is 01:57 AM.