public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config
@ 2005-11-11 15:43 John Davis
  2005-11-11 15:52 ` Wolfgang Denk
  2005-11-11 17:29 ` Andrew Wozniak
  0 siblings, 2 replies; 3+ messages in thread
From: John Davis @ 2005-11-11 15:43 UTC (permalink / raw)
  To: u-boot

Hello

I managed to build the lib_generic/libgeneic.a file by manually performing a
make at the top-level by
specifing make lib_generic/libgeneric.a.

However, I do not get this library included when I try to build the examples
directory. Even if I hardcode the
examples directory Makefile so that it includes the lib_generic directory,
it still fails to build the examples
directory. See below.

I have similar results if I change the order of the libgeneric specifier.
ie.
-L../lib_generic -lgeneric
-L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc

Please advise. Its scary that putc does even work.

-----------------------------------

ppc-linux-ld -g -Ttext 0x40000 \
-o hello_world -e hello_world hello_world.o libstubs.a \
-L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc
-L../lib_generic -lgeneric
hello_world.o(.text+0x48): In function `hello_world':
/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:36: undefined
reference to `printf'
hello_world.o(.text+0x4c):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:37:
undefined reference to `get_version'
hello_world.o(.text+0x58):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:37:
undefined reference to `printf'
hello_world.o(.text+0x64):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:39:
undefined reference to `printf'
hello_world.o(.text+0x70):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:41:
undefined reference to `printf'
hello_world.o(.text+0x9c):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:44:
undefined reference to `printf'
hello_world.o(.text+0xac):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:49:
undefined reference to `printf'
hello_world.o(.text+0xb0):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:50:
undefined reference to `tstc'
hello_world.o(.text+0xbc):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:53:
undefined reference to `getc'
hello_world.o(.text+0xc4):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:55:
undefined reference to `printf'
../lib_generic/libgeneric.a(vsprintf.o)(.text+0x424): In function `panic':
/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:376: undefined
reference to `vprintf'
../lib_generic/libgeneric.a(vsprintf.o)(.text+0x42c):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/vsprintf.c:377: undefined reference to `putc'
../lib_generic/libgeneric.a(vsprintf.o)(.text+0x438):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/vsprintf.c:382: undefined reference to `udelay'
../lib_generic/libgeneric.a(vsprintf.o)(.text+0x44c):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/vsprintf.c:383: undefined reference to `do_reset'
../lib_generic/libgeneric.a(string.o)(.text+0x474): In function `strrchr':
/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:208: undefined
reference to `strlen'
../lib_generic/libgeneric.a(string.o)(.text+0x4d0): In function `strstr':
/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:542: undefined
reference to `strlen'
../lib_generic/libgeneric.a(string.o)(.text+0x4e4):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/string.c:545: undefined reference to `strlen'
../lib_generic/libgeneric.a(string.o)(.text+0x500):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/string.c:548: undefined reference to `memcmp'
../lib_generic/libgeneric.a(string.o)(.text+0x554): In function `strdup':
/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:253: undefined
reference to `strlen'
../lib_generic/libgeneric.a(string.o)(.text+0x55c):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/string.c:253: undefined reference to `malloc'
../lib_generic/libgeneric.a(string.o)(.text+0x578):/home/davis/cvs/mcp4/u-
boot-1.1.2/lib_generic/string.c:258: undefined reference to `strcpy'
make[1]: *** [hello_world] Error 1
make[1]: Leaving directory `/home/davis/cvs/mcp4/u-boot-1.1.2/examples'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20051111/bf09b027/attachment.htm 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config
  2005-11-11 15:43 [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config John Davis
@ 2005-11-11 15:52 ` Wolfgang Denk
  2005-11-11 17:29 ` Andrew Wozniak
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2005-11-11 15:52 UTC (permalink / raw)
  To: u-boot

In message <6a7ac2300511110743s18a579fh89cc76927259769c@mail.gmail.com> you wrote:
>
> I managed to build the lib_generic/libgeneic.a file by manually performing a
> make at the top-level by
> specifing make lib_generic/libgeneric.a.
> 
> However, I do not get this library included when I try to build the examples
> directory. Even if I hardcode the
> examples directory Makefile so that it includes the lib_generic directory,
> it still fails to build the examples
> directory. See below.

Your toolchain must be *seriously* broken. Which environment are  you
working in?

Find a PC with a somewhat recent version of Linux installed, download
and install the ELDK, and forget about your problems ;-)

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A committee is a life form with six or more legs and no brain.
                              -- Lazarus Long, "Time Enough For Love"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config
  2005-11-11 15:43 [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config John Davis
  2005-11-11 15:52 ` Wolfgang Denk
@ 2005-11-11 17:29 ` Andrew Wozniak
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Wozniak @ 2005-11-11 17:29 UTC (permalink / raw)
  To: u-boot

John Davis wrote:
> 
> Hello
> 
> I managed to build the lib_generic/libgeneic.a file by manually 
> performing a make at the top-level by
> specifing make lib_generic/libgeneric.a.

I may be wrong, but libgeneric.a is only used by U-Boot and NOT by 
examples. Examples use the U-Boot ABI which provides access to 
libgeneric.a level functions as defined by include/exports.h

> However, I do not get this library included when I try to build the 
> examples directory.  Even if I hardcode the
> examples directory Makefile so that it includes the lib_generic 
> directory, it still fails to build the examples
> directory.  See below.
> 
> I have similar results if I change the order of the libgeneric 
> specifier.  ie.
>         -L../lib_generic -lgeneric 
> -L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc
> 
> Please advise.  Its scary that putc does even work.

Its not scary, its done through the ABI.

> -----------------------------------
> 
> ppc-linux-ld -g  -Ttext 0x40000 \
>         -o hello_world -e hello_world hello_world.o libstubs.a  \
> -L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc 
> -L../lib_generic -lgeneric

ppc_405-ld -g  -Ttext 0x40000 \
         -o hello_world -e hello_world hello_world.o libstubs.a \ 
  -L/lib/gcc-lib/powerpc-hardhat-linux/3.2.1 -lgcc

This is my 1.1.2 build command - there is NO generic lib linked in! It 
is NOT needed because U-Boot ABI provides those library functions.

> hello_world.o(.text+0x48): In function `hello_world':
> /home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:36: undefined 
> reference to `printf'
> hello_world.o(.text+0x4c):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:37: 
> undefined reference to `get_version'
> hello_world.o(.text+0x58):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:37: 
> undefined reference to `printf'
> hello_world.o(.text+0x64):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:39: 
> undefined reference to `printf'
> hello_world.o(.text+0x70):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:41: 
> undefined reference to `printf'
> hello_world.o(.text+0x9c):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:44: 
> undefined reference to `printf'
> hello_world.o(.text+0xac):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:49: 
> undefined reference to `printf'
> hello_world.o(.text+0xb0):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:50: 
> undefined reference to `tstc'
> hello_world.o(.text+0xbc):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:53: 
> undefined reference to `getc'
> hello_world.o(.text+0xc4):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:55: 
> undefined reference to `printf'
> ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x424): In function `panic':
> /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:376: undefined 
> reference to `vprintf'
> ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x42c):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:377: 
> undefined reference to `putc'
> ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x438):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:382: 
> undefined reference to `udelay'
> ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x44c):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:383: 
> undefined reference to `do_reset'
> ../lib_generic/libgeneric.a(string.o)(.text+0x474): In function `strrchr':
> /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:208: undefined 
> reference to `strlen'
> ../lib_generic/libgeneric.a(string.o)(.text+0x4d0): In function `strstr':
> /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:542: undefined 
> reference to `strlen'
> ../lib_generic/libgeneric.a(string.o)(.text+0x4e4):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:545: 
> undefined reference to `strlen'
> ../lib_generic/libgeneric.a(string.o)(.text+0x500):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:548: 
> undefined reference to `memcmp'
> ../lib_generic/libgeneric.a(string.o)(.text+0x554): In function `strdup':
> /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:253: undefined 
> reference to `strlen'
> ../lib_generic/libgeneric.a(string.o)(.text+0x55c):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:253: 
> undefined reference to `malloc'
> ../lib_generic/libgeneric.a(string.o)(.text+0x578):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:258: 
> undefined reference to `strcpy'
> make[1]: *** [hello_world] Error 1
> make[1]: Leaving directory `/home/davis/cvs/mcp4/u-boot-1.1.2/examples'
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-11 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 15:43 [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config John Davis
2005-11-11 15:52 ` Wolfgang Denk
2005-11-11 17:29 ` Andrew Wozniak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox