Discussion:
[uClibc] Undefined references to _stdout/_stderr
Jeremy Redburn
2005-05-17 17:39:22 UTC
Permalink
Hi there,

First off, thanks much for all your great work on uClibc -- everything
I've seen to this point is fantastic. I am currently trying to compile
LAME (an mp3 encoder) using the toolchain. At the moment, I am
getting the following error:

/usr/local/blackfin/lib/gcc/bfin-elf/3.4.1/../../../../bfin-elf/bin/ld.real:
warning: cannot find entry symbol start; defaulting to 00000000
main.o(.text+0xfe): In function `_init_files':
main.c: undefined reference to `_stderr'
main.o(.text+0x102):main.c: undefined reference to `_stderr'
main.o(.text+0x118):main.c: undefined reference to `_stderr'
main.o(.text+0x11c):main.c: undefined reference to `_stderr'
main.o(.text+0x1cc): In function `_lame_decoder':
main.c: undefined reference to `_stderr'
main.o(.text+0x1d4):main.c: more undefined references to `_stderr' follow

I'm still learning my way around here, so if this suggests a problem
elsewhere please let me know. Any help is much appreciated -- the only
references I saw to _stderr and _stdout appeared back in 2001 but
uClibc seems to have moved to stderr/stdout back then to conform to
what gnu libc expects.

Thanks much.
--
Jeremy Redburn
472 Commonwealth Ave. #8
Boston, MA 02215
***@gmail.com
Erik Andersen
2005-05-20 16:58:56 UTC
Permalink
Post by Jeremy Redburn
Hi there,
First off, thanks much for all your great work on uClibc -- everything
I've seen to this point is fantastic. I am currently trying to compile
LAME (an mp3 encoder) using the toolchain. At the moment, I am
warning: cannot find entry symbol start; defaulting to 00000000
main.c: undefined reference to `_stderr'
First, you seem to be trying to use the blackfin ld to link your
final application. Typically, gcc performs the final link so it
can merge in things like crt1.o, which provides the _start
symbol.

Secondly, I am not sure how you are compiling things (since you
omitted that part in your email) but I suspect you are either
using the wrong set of C library header files, or you are in fact
trying to use '_stderr' directly within your code. Either way,
something is horribly broken, and it is pretty much certain that
broken something is not uClibc.

-Erik

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

Loading...