[uClibc] can't build buildroot

Alex King alex at king.net.nz
Sun Sep 14 21:56:13 UTC 2003


On Sun, Sep 14, 2003 at 08:44:58AM +0200, Martin Volf wrote:
> Hello,
> 
> I'm trying to build my own buildroot, but I can't. Am I doing something wrong? What?
> 
I am tried to do the same thing, several times, until I got it to work.
I'm not really sure what I did right or wrong, but my advice in general
would be to stick as close as possible to the makefile as distributed.


> I have the latest version from CVS. Running 'make', it downloaded some stuff, built binutils and complained about missing uClibc-locale-030818.tgz. I downloaded it, rerun make and it complained about missing i386-uclibc-gcc (no surprise, gcc has not been built yet):

Hmm, I got no requirement for any locale file.  Perhaps because I got an
earlier cvs version?

I suspect that i386-uclibc-gcc should be able to be found before the gcc
build though.  I suspect there are at least two gcc builds, first the
wrapper for your system compiler is probably built with uClibc which is
used to compile stuff for the target system, then a gcc is compiled for
the target system later.

Looking at the errors below though, I would have thought it should be
looking for i386-uclibc-gcc under toolchain_build_i386 rather than
build_i386?

Anyway, my advice would be to nuke the build_i386 and
toolchain_build_i386 directories, cvs up, put the Makefile options back
as close to the orig as possible and try again.  make clean didn't work
well for me, it was often trying to uninstall system commands
(/usr/bin/patch etc) or calling non-existant targets in the package's
makefile & so bombing and not completing.
> 
> <make output>
> 
> make -C /var/src/buildroot/build_i386/uClibc/extra/locale pregen 
> /bin/sh: line 1: /var/src/buildroot/build_i386/staging_dir/bin/i386-uclibc-gcc: No such file or directory
> make[1]: /var/src/buildroot/build_i386/staging_dir/bin/i386-uclibc-gcc: Command not found
> make[1]: Entering directory `/var/src/buildroot/build_i386/uClibc/extra/locale'
> /var/src/buildroot/build_i386/staging_dir/bin/i386-uclibc-gcc  -D__WCHAR_ENABLED=1 -c locale_data.c
> make[1]: /var/src/buildroot/build_i386/staging_dir/bin/i386-uclibc-gcc: Command not found
> make[1]: *** [pregen] Error 127
> make[1]: Leaving directory `/var/src/buildroot/build_i386/uClibc/extra/locale'
> make: *** [/var/src/buildroot/build_i386/uClibc/.configured] Error 2
> 
> </make output>
> 
> Here is the diff between original makefile and the my one:
> 
> --- Makefile.orig	2003-09-14 08:25:48.000000000 +0200
> +++ Makefile	2003-09-13 08:07:47.000000000 +0200
> @@ -61,8 +61,8 @@
>  WGET:=wget --passive-ftp
>  
>  # Optimize toolchain for which type of CPU?
> -OPTIMIZE_FOR_CPU=$(ARCH)
> -#OPTIMIZE_FOR_CPU=i486
> +#OPTIMIZE_FOR_CPU=$(ARCH)
> +OPTIMIZE_FOR_CPU=i586
>  #OPTIMIZE_FOR_CPU=strongarm
>  #OPTIMIZE_FOR_CPU=whatever
>  
I don't know whether this is significant, but I had trouble when I
specified an optimisation other than the default ($(ARCH) = i386?)


> @@ -88,24 +88,24 @@
>  # kernel you have already configured and you want to use that?
>  #TARGETS+=linux
>  #TARGETS+=user-mode-linux
> -#TARGETS+=system-linux
> -TARGETS+=kernel-headers
> +TARGETS+=system-linux
> +#TARGETS+=kernel-headers
>  
system-linux worked OK for me (I have kernel source installed and
configured under /usr/src/linux).  What does the default kernel-headers
mean?

>  # The default minimal set
>  TARGETS+=busybox tinylogin
>  
>  # Openssh...
> -#TARGETS+=zlib openssl openssh
> +TARGETS+=zlib openssl openssh
>  # Dropbear sshd is much smaller than openssl + openssh
> -#TARGETS+=dropbear_sshd
> +TARGETS+=dropbear_sshd
>  
Why are you specifing both openssh and dropbear?  I tried with:

TARGETS+=zlib dropbear_sshd

because dropbear seemed to require zlib, but in the end I commented out
both.  You are making a compiler for your target system, so you can
always compile them later (you are compiling for an i386 system, so you
could chroot, or use uml etc)

>  # Everything needed to build a full uClibc development system!
> -#TARGETS+=coreutils findutils bash make diffutils patch sed
> -#TARGETS+=ed flex bison file gawk tar grep gcc_target
> +TARGETS+=coreutils findutils bash make diffutils patch sed
> +TARGETS+=ed flex bison file gawk tar grep gcc_target
>  
>  # Of course, if you are installing a development system, you
>  # may want some header files so you can compile stuff....
> -#TARGETS+=ncurses-headers zlib-headers openssl-headers
> +TARGETS+=ncurses-headers zlib-headers openssl-headers
>  
>  # More development system stuff for those that want it
>  #TARGETS+=m4 autoconf automake libtool
> @@ -115,6 +115,7 @@
>  
>  # Some nice debugging tools
>  #TARGETS+=gdb strace
> +TARGETS+=strace
>  
>  # The Valgrind debugger (x86 only)
>  #TARGETS+=valgrind
> 
> 
> Thanks.
> 
> -- 
> Martin
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc



More information about the uClibc mailing list