Possible to compile applications for a different system?
Linux - NewbieThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.