<br><br><div class="gmail_quote">On Sat, Oct 15, 2011 at 5:06 PM, Michael S. Zick <span dir="ltr"><<a href="mailto:minimod@morethan.org">minimod@morethan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sat October 15 2011, Bjørn Forsman wrote:<br>
> On 15 October 2011 22:12, Jed Evnull <<a href="mailto:jedevnull@gmail.com">jedevnull@gmail.com</a>> wrote:<br>
> > I need to compile packages for arm with uclibc and statically link them. Am<br>
> > I selecting the right tool with buildroot?<br>
><br>
> I haven't done static linking with Buildroot. Is your reason for wanting static<br>
> linking that you will not use the rest of the rootfs Buildroot gives you?<br>
><br>
> > I compiled  buildroot-2011.08<br>
> > with qemu_arm_versatile_defconfig.  The generated cross-compiler compiles<br>
> > simple hello world programs w/o problems, but fails with typical autoconf<br>
> > source packages.<br>
><br>
> How did you try to build those packages? You will probably have most success<br>
> if you integrate the package in Buildroot. This is done by (typically)<br>
> writing two<br>
> small files in packages/<yourpackage>/. See the buildroot docs for the details.<br>
><br>
> > I tried to chroot into the generated image (chroot myimage /bin/sh --login)<br>
> > to compile from there, but chroot fails with /bin/sh not found.<br>
><br>
<br>
</div>???<br>
<br>
If your __not__ building on non-ARM, why do you need a cross-compiler?<br>
<br>
If you __are__ building on non-ARM, how did you expect your host<br>
machine to execute the ARM binaries inside of the chroot?<br>
<br>
Me-thinks you need QEMU or such like to do that.<br>
<br>
Mike<br>
<div class="im">> AFAIK, few people use Buildroot to build a compiler into the rootfs,<br>
> so this is not<br>
> that well supported. It's better to use Buildroot as a cross-compile system, not<br>
> native-compile.<br>
><br>
> Best regards,<br>
> Bjørn Forsman<br>
</div><br></blockquote><div><br>Sorry, I was probably incoherent. My goal is to produce arm binaries for my tablet. I want them as small as possible, so I want statically linked packages with uclibc, rather than glibc.<br>
<br>My first try was to use just the buildroot cross-compile toolchain with ./configure CC=arm-linux-gcc, LDFLAGS=-static, etc. A 'normal'  cross-compile, I guess. This is how I use the sourcery arm toochain to produce kernels for my device.  That didn't work for anything but simple hello world programs. Lots of different errors with autoconf.<br>
<br> So I thought I would set up qemu for chroot and directly compile from within the root_fs produced by buildroot, as worked with scratchbox/qemu.  But chroot into the image fails.chroot: failed to run command `/bin/su'. <br>
<br>Thanks for the replies. I'm re-reading docs. <br></div></div>