[uClibc]Undefined __libc_start_main

Erik Andersen andersen at codepoet.org
Tue Nov 20 21:58:14 UTC 2001


On Tue Nov 20, 2001 at 01:24:24PM -0700, Victor Odhner wrote:
> Thanks!  I had not realized my "make" of uClibc had created
> a customized copy of gcc.  Works like a dream.
> 
> I might not have seemed as confused as I was, because of
> a typo:
> 
> > > I have built a uClibc compiler on my RedHat 7.1 box, ...
> 
> Should have said:
> > > I have built a uClibc LIBRARY on my RedHat 7.1 box, ...
> 
> ... I didn't know I'd built a compiler.
> 
> Is there any place I should have found all this in
> the documentation?
> 
> Could I help with documentation?  If someone would
> point me at stuff I should pull together, I'd be happy
> to build some HowTos.  But I'd need pointers to raw
> material since it's not in my head ...

You sure could!  I'd love to get some better docs together.
But I've been too lazy to write them.  I've often wanted to
start an FAQ...  Here is the beginning of one...

Some good FAQ questions:
    Q: Why are you doing this?  Whats wrong with glibc?
    A: To quote from Ulrich Drepper, the maintainer of GNU libc:
	"...glibc is not the right thing for [an embedded OS]. It
	is designed as a native library (as opposed to embedded).
	Many functions (e.g., printf) contain functionality which
	is not wanted in embedded systems." 
	    Ulrich Drepper <drepper at gnu.org> 24 May 1999

    Q: Why should I use uClibc?
    A: Because it is a C library designed for embedded Linux and
	designed for maximum compatibilty with GNU libc.  

    Q: I want to create a closed source commercial application
	using uClibc.  Is that legal?
    A: Yes.  If you are using uClibc as a shared library, you are
	all set.  If you are staticly linking, then you must make
	an object file for your closed source application available 
	so it can be linked vs updated versions of the C library.

    Q: I want to create a closed source commercial application and  
	I want to protect my intellectual property.  If I use
	uClibc, don't I have to release my source code?
    A: No.

    Q: How do I compile stuff?
    A: Use /usr/i386-linux-uclibc/usr/bin/i386-uclibc-gcc 

    Q: How do I make autoconf and automake behave?
    A: First run
	    export PATH=/usr/i386-linux-uclibc/bin:$PATH
	then run autoconf/automake.

    Q: When I run ldd it [segfault|runs the app|doesn't work].  What 
	should I do?
    A: Use the uClibc ldd, not your system's one.  The uClibc one
	is cross platform and doesn't actually try to run the target
	program like your system one does.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list