Am I in the right place?

Matthias B. msbREMOVE-THIS at winterdrache.de
Tue Aug 24 07:43:55 PDT 2004


On Tue, 24 Aug 2004 10:13:08 -0400 Ed Leafe <ed at leafe.com> wrote:

> 	I have a rather ambitious goal: I want to be able to create an 
> executable program along with all of the libraries it needs so that I 
> can distribute it to any Linux system and have it run. 

That's not really an ambitious goal. It's a standard procedure when
distributing binaries. The process is called "static linking". A
statically linked executable is self-contained and doesn't require special
libraries or a dynamic linker. 

> 	One of the people who has helped on other parts of this project
> 	stated 
> that what I was trying to do was essentially building my own distro of 
> Linux, albeit one that could only do the few things I need. 

I'm confused. Do you want to create only a self-contained binary of 1
application that other people can copy to their existing Linux systems for
running or do you want to produce a bootable medium such as a CD that
people can use without even possessing Linux. Unless you want to do the
latter, you don't need to create your own Linux distro.

So, if all you need is a self-contained executable of your application,
then you are wrong here. You need to learn about static linking. The
mailing list gcc-help at gcc.gnu.org should be the right place to inquire
about using GCC to link applications statically.
Alternatively you can try using ELF statifier
(http://statifier.sourceforge.net/). This program takes a binary and its
libraries and combines them to form a self-contained statically linked
binary.

If, however, you really want to produce a CD or floppy that will boot
right into your application so that people can use it without even having
Linux installed on their system, then you are in the right place and
should look into LFS.

MSB

-- 
The early bird gets the worm, but the second mouse gets the cheese.




More information about the lfs-support mailing list